ColdFire: Fix FEC transmit issue for MCF5275
PATCH 1/1 ColdFire: Fix FEC transmit issue for MCF5275
--- drivers/net/mcffec.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/net/mcffec.c +8 -0
@@ -166,6 +166,14 @@ int fec_send(struct eth_device *dev, volatile void *packet, int length)/* Activate transmit Buffer Descriptor polling */ fecp->tdar =0x01000000 ;/* Descriptor polling active */ +/* +* FEC fix for MCF5275, FEC unable to initial transmit data packet. +* A nop will ensure the descriptor polling active completed. +*/ +#ifdef CONFIG_M5275 + __asm__ ("nop" ); +#endif +#ifdef CFG_UNIFY_CACHE icache_invalid ();#endif
Signature · 1 line
1.5.4.1
PATCH 1/1 ColdFire: Fix FEC transmit issue for MCF5275
drivers/net/mcffec.c int fec_send(struct eth_device *dev, volatile void *packet, int length) · line 179
Quoted 11 lines · Tsi-Chung Liew
drivers/net/mcffec.c +8
-0+/* +* FEC fix for MCF5275, FEC unable to initial transmit data packet. +* A nop will ensure the descriptor polling active completed. +*/ +#ifdef CONFIG_M5275 + __asm__ ("nop" ); +#endif +#ifdef CFG_UNIFY_CACHE icache_invalid ();#endif
At the risk of being very picky, I think this should be written to have the comment inside the #ifdef so that the code and comment are not accidentally separated.
#if defined(CONFIG_M5275)
/*
* FEC ...
*/
__asm__("nop");#endif
But, that may be just me. Take it or leave it. :-)
jdl
PATCH 1/1 ColdFire: Fix FEC transmit issue for MCF5275
Quoted 17 lines · Jon Loeliger
drivers/net/mcffec.c int fec_send(struct eth_device *dev, volatile void *packet, int length) · line 179
Quoted 11 lines · Tsi-Chung Liew
drivers/net/mcffec.c +8
-0+/* +* FEC fix for MCF5275, FEC unable to initial transmit data packet. +* A nop will ensure the descriptor polling active completed. +*/ +#ifdef CONFIG_M5275 + __asm__ ("nop" ); +#endif +#ifdef CFG_UNIFY_CACHE icache_invalid ();#endif At the risk of being very picky, I think this should be written to have the comment inside the #ifdef so that the code and comment are not accidentally separated.
At the risk of being somewhat less picky, I think there should be more explanation of why a nop solves anything in a robust manner.
-Scott