diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2013-07-30 05:29:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-30 19:05:04 -0400 |
commit | a264b981f2c76e281ef27e7232774bf6c54ec865 (patch) | |
tree | 1875a691e59369b82ecad4dad563302aadbc1662 | |
parent | a0db856a95a29efb1c23db55c02d9f0ff4f0db48 (diff) |
net/fec: Don't let ndo_start_xmit return NETDEV_TX_BUSY without link
Don't test for having link and let hardware deal with this situation.
Without this patch I see a machine running an -rt patched Linux being
stuck in sch_direct_xmit when it looses link while there is still a
packet to be sent. In this case the fec_enet_start_xmit routine returned
NETDEV_TX_BUSY which makes the network stack reschedule the packet and
so sch_direct_xmit calls fec_enet_start_xmit again.
I failed to reproduce a complete hang without -rt, but I think the
problem exists there, too.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 0dda45481d16..77ea0db0bbfc 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c | |||
@@ -294,11 +294,6 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
294 | unsigned short status; | 294 | unsigned short status; |
295 | unsigned int index; | 295 | unsigned int index; |
296 | 296 | ||
297 | if (!fep->link) { | ||
298 | /* Link is down or auto-negotiation is in progress. */ | ||
299 | return NETDEV_TX_BUSY; | ||
300 | } | ||
301 | |||
302 | /* Fill in a Tx ring entry */ | 297 | /* Fill in a Tx ring entry */ |
303 | bdp = fep->cur_tx; | 298 | bdp = fep->cur_tx; |
304 | 299 | ||