diff options
author | Heiko Schocher <hs@denx.de> | 2008-08-25 21:20:53 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-27 05:16:38 -0400 |
commit | f4f62301c6f42127b7462274abfcbc278f84d59a (patch) | |
tree | a14dae94a6cbcdaf244e610725fe52aee74fa9ca /drivers/net/fs_enet/mac-scc.c | |
parent | 34a20e89739e9ac1cb89bdf430b694d2c946ebff (diff) |
fs_enet: Fix SCC Ethernet on CPM2, and crash in fs_enet_rx_napi()
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/fs_enet/mac-scc.c')
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 029b3c7ef29c..22f50dd8b277 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include "fs_enet.h" | 47 | #include "fs_enet.h" |
48 | 48 | ||
49 | /*************************************************/ | 49 | /*************************************************/ |
50 | |||
51 | #if defined(CONFIG_CPM1) | 50 | #if defined(CONFIG_CPM1) |
52 | /* for a 8xx __raw_xxx's are sufficient */ | 51 | /* for a 8xx __raw_xxx's are sufficient */ |
53 | #define __fs_out32(addr, x) __raw_writel(x, addr) | 52 | #define __fs_out32(addr, x) __raw_writel(x, addr) |
@@ -62,6 +61,8 @@ | |||
62 | #define __fs_out16(addr, x) out_be16(addr, x) | 61 | #define __fs_out16(addr, x) out_be16(addr, x) |
63 | #define __fs_in32(addr) in_be32(addr) | 62 | #define __fs_in32(addr) in_be32(addr) |
64 | #define __fs_in16(addr) in_be16(addr) | 63 | #define __fs_in16(addr) in_be16(addr) |
64 | #define __fs_out8(addr, x) out_8(addr, x) | ||
65 | #define __fs_in8(addr) in_8(addr) | ||
65 | #endif | 66 | #endif |
66 | 67 | ||
67 | /* write, read, set bits, clear bits */ | 68 | /* write, read, set bits, clear bits */ |
@@ -262,8 +263,13 @@ static void restart(struct net_device *dev) | |||
262 | 263 | ||
263 | /* Initialize function code registers for big-endian. | 264 | /* Initialize function code registers for big-endian. |
264 | */ | 265 | */ |
266 | #ifndef CONFIG_NOT_COHERENT_CACHE | ||
267 | W8(ep, sen_genscc.scc_rfcr, SCC_EB | SCC_GBL); | ||
268 | W8(ep, sen_genscc.scc_tfcr, SCC_EB | SCC_GBL); | ||
269 | #else | ||
265 | W8(ep, sen_genscc.scc_rfcr, SCC_EB); | 270 | W8(ep, sen_genscc.scc_rfcr, SCC_EB); |
266 | W8(ep, sen_genscc.scc_tfcr, SCC_EB); | 271 | W8(ep, sen_genscc.scc_tfcr, SCC_EB); |
272 | #endif | ||
267 | 273 | ||
268 | /* Set maximum bytes per receive buffer. | 274 | /* Set maximum bytes per receive buffer. |
269 | * This appears to be an Ethernet frame size, not the buffer | 275 | * This appears to be an Ethernet frame size, not the buffer |