From 76d40c85935d10baf6dd9b0f02046c3d55ad0017 Mon Sep 17 00:00:00 2001 From: Pyun YongHyeon Date: Sat, 19 Feb 2011 00:00:32 +0000 Subject: Send frames only when there is a valid link and driver is running as well as controller has enough free TX descriptors. Remove check for number of queued frames before attempting to transmit. I guess it was added to allow draining queued frames even if there is no link. I'm under the impression this type of check should be done in upper layer. No other drivers in tree do that. --- sys/dev/dc/if_dc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/dev/dc/if_dc.c') diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 75f10fcfad0b..5f12b7a48d0b 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -3375,10 +3375,8 @@ dc_start_locked(struct ifnet *ifp) DC_LOCK_ASSERT(sc); - if (!sc->dc_link && ifp->if_snd.ifq_len < 10) - return; - - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING || sc->dc_link == 0) return; idx = sc->dc_cdata.dc_tx_first = sc->dc_cdata.dc_tx_prod; -- cgit v1.2.3