summaryrefslogtreecommitdiffstats
path: root/sys/dev/dc/if_dc.c
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2011-02-19 00:00:32 +0000
committeryongari <yongari@FreeBSD.org>2011-02-19 00:00:32 +0000
commit7d573030437bc17da394ad067c98bcfa229f7dfb (patch)
tree1b02c896d0d41c946e397e02e7ef499d232496a8 /sys/dev/dc/if_dc.c
parentcb13a9a185695e6cf124ad0f9f93fb98cda5f329 (diff)
downloadFreeBSD-src-7d573030437bc17da394ad067c98bcfa229f7dfb.zip
FreeBSD-src-7d573030437bc17da394ad067c98bcfa229f7dfb.tar.gz
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.
Diffstat (limited to 'sys/dev/dc/if_dc.c')
-rw-r--r--sys/dev/dc/if_dc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 75f10fc..5f12b7a 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;
OpenPOWER on IntegriCloud