aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/dc/if_dc.c
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2011-02-19 00:00:32 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2011-02-19 00:00:32 +0000
commit76d40c85935d10baf6dd9b0f02046c3d55ad0017 (patch)
tree1b02c896d0d41c946e397e02e7ef499d232496a8 /sys/dev/dc/if_dc.c
parenta5db292f7ba498007d039b0a1a6b550a7f47aba8 (diff)
downloadsrc-76d40c85935d10baf6dd9b0f02046c3d55ad0017.tar.gz
src-76d40c85935d10baf6dd9b0f02046c3d55ad0017.zip
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.
Notes
Notes: svn path=/head/; revision=218830
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 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;