diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-25 15:28:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-25 15:28:28 -0400 |
commit | 2e561c7b7e705b619122e5386d6f99f28f2b6e5a (patch) | |
tree | be942c58cacd25c66cced37e1a82f269c37871de /drivers/net/ibm_newemac/mal.c | |
parent | 2cfed60cc24676d65e01278dbf10d0069de02592 (diff) | |
parent | 653252c2302cdf2dfbca66a7e177f7db783f9efa (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (48 commits)
net: Fix wrong interpretation of some copy_to_user() results.
xfrm: alg_key_len & alg_icv_len should be unsigned
[netdrvr] tehuti: move ioctl perm check closer to function start
ipv6: Fix typo in net/ipv6/Kconfig
via-velocity: fix vlan receipt
tg3: sparse cleanup
forcedeth: realtek phy crossover detection
ibm_newemac: Increase MDIO timeouts
gianfar: Fix skb allocation strategy
netxen: reduce stack usage of netxen_nic_flash_print
smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}
net drivers: fix platform driver hotplug/coldplug
forcedeth: new backoff implementation
ehea: make things static
phylib: Add support for board-level PHY fixups
[netdrvr] atlx: code movement: move atl1 parameter parsing
atlx: remove flash vendor parameter
korina: misc cleanup
korina: fix misplaced return statement
WAN: Fix confusing insmod error code for C101 too.
...
Diffstat (limited to 'drivers/net/ibm_newemac/mal.c')
-rw-r--r-- | drivers/net/ibm_newemac/mal.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 6869f08c9dcb..10c267b2b961 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
@@ -61,8 +61,8 @@ int __devinit mal_register_commac(struct mal_instance *mal, | |||
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | void __devexit mal_unregister_commac(struct mal_instance *mal, | 64 | void mal_unregister_commac(struct mal_instance *mal, |
65 | struct mal_commac *commac) | 65 | struct mal_commac *commac) |
66 | { | 66 | { |
67 | unsigned long flags; | 67 | unsigned long flags; |
68 | 68 | ||
@@ -136,6 +136,14 @@ void mal_enable_rx_channel(struct mal_instance *mal, int channel) | |||
136 | { | 136 | { |
137 | unsigned long flags; | 137 | unsigned long flags; |
138 | 138 | ||
139 | /* | ||
140 | * On some 4xx PPC's (e.g. 460EX/GT), the rx channel is a multiple | ||
141 | * of 8, but enabling in MAL_RXCASR needs the divided by 8 value | ||
142 | * for the bitmask | ||
143 | */ | ||
144 | if (!(channel % 8)) | ||
145 | channel >>= 3; | ||
146 | |||
139 | spin_lock_irqsave(&mal->lock, flags); | 147 | spin_lock_irqsave(&mal->lock, flags); |
140 | 148 | ||
141 | MAL_DBG(mal, "enable_rx(%d)" NL, channel); | 149 | MAL_DBG(mal, "enable_rx(%d)" NL, channel); |
@@ -148,6 +156,14 @@ void mal_enable_rx_channel(struct mal_instance *mal, int channel) | |||
148 | 156 | ||
149 | void mal_disable_rx_channel(struct mal_instance *mal, int channel) | 157 | void mal_disable_rx_channel(struct mal_instance *mal, int channel) |
150 | { | 158 | { |
159 | /* | ||
160 | * On some 4xx PPC's (e.g. 460EX/GT), the rx channel is a multiple | ||
161 | * of 8, but enabling in MAL_RXCASR needs the divided by 8 value | ||
162 | * for the bitmask | ||
163 | */ | ||
164 | if (!(channel % 8)) | ||
165 | channel >>= 3; | ||
166 | |||
151 | set_mal_dcrn(mal, MAL_RXCARR, MAL_CHAN_MASK(channel)); | 167 | set_mal_dcrn(mal, MAL_RXCARR, MAL_CHAN_MASK(channel)); |
152 | 168 | ||
153 | MAL_DBG(mal, "disable_rx(%d)" NL, channel); | 169 | MAL_DBG(mal, "disable_rx(%d)" NL, channel); |