diff options
Diffstat (limited to 'drivers/net/fs_enet')
-rw-r--r-- | drivers/net/fs_enet/fs_enet-main.c | 8 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 9a51ec8293cc..9d461825bf4c 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -792,6 +792,10 @@ static int fs_enet_open(struct net_device *dev) | |||
792 | int r; | 792 | int r; |
793 | int err; | 793 | int err; |
794 | 794 | ||
795 | /* to initialize the fep->cur_rx,... */ | ||
796 | /* not doing this, will cause a crash in fs_enet_rx_napi */ | ||
797 | fs_init_bds(fep->ndev); | ||
798 | |||
795 | if (fep->fpi->use_napi) | 799 | if (fep->fpi->use_napi) |
796 | napi_enable(&fep->napi); | 800 | napi_enable(&fep->napi); |
797 | 801 | ||
@@ -1167,6 +1171,10 @@ static struct of_device_id fs_enet_match[] = { | |||
1167 | .compatible = "fsl,cpm1-scc-enet", | 1171 | .compatible = "fsl,cpm1-scc-enet", |
1168 | .data = (void *)&fs_scc_ops, | 1172 | .data = (void *)&fs_scc_ops, |
1169 | }, | 1173 | }, |
1174 | { | ||
1175 | .compatible = "fsl,cpm2-scc-enet", | ||
1176 | .data = (void *)&fs_scc_ops, | ||
1177 | }, | ||
1170 | #endif | 1178 | #endif |
1171 | #ifdef CONFIG_FS_ENET_HAS_FCC | 1179 | #ifdef CONFIG_FS_ENET_HAS_FCC |
1172 | { | 1180 | { |
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 |