diff options
author | Sriram <srk@ti.com> | 2009-06-29 03:50:57 +0530 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2009-10-21 16:46:34 -0400 |
commit | 3c4030225e1ef92b38dea2347b7c45fc0b1177b7 (patch) | |
tree | f68376db1fc332efeb12f5e108e5e224d42623e5 | |
parent | 02e1b8eb70fee78380d6f40e4a2645dae7ca8356 (diff) |
EMAC driver: Check for link status in packet send loop
-rw-r--r-- | drivers/net/ticpgmac.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/ticpgmac.c b/drivers/net/ticpgmac.c index 78a54d881d..0efd5ed75e 100644 --- a/drivers/net/ticpgmac.c +++ b/drivers/net/ticpgmac.c @@ -667,24 +667,18 @@ static int cpgmac_eth_send_packet (volatile void *packet, int length) EMAC_CPPI_OWNERSHIP_BIT | EMAC_CPPI_EOP_BIT); - if (!phy.get_link_status (active_phy_addr)) { - printf("Link down . Abort Tx - pHY %d\n",active_phy_addr); - cpgmac_eth_ch_teardown (EMAC_CH_TX); - return (ret_status); - } /* Send the packet */ adap_emac->TX0HDP = BD_TO_HW((unsigned int) emac_tx_desc); /* Wait for packet to complete or link down */ while (1) { - #if 0 if (!phy.get_link_status (active_phy_addr)) { printf("Link down . Abort Tx - pHY %d\n",active_phy_addr); cpgmac_eth_ch_teardown (EMAC_CH_TX); return (ret_status); } - #endif + if (adap_emac->TXINTSTATRAW & 0x01) { ret_status = length; break; |