svn commit: r218830 - head/sys/dev/dc

Pyun YongHyeon yongari at FreeBSD.org
Sat Feb 19 00:00:33 UTC 2011


Author: yongari
Date: Sat Feb 19 00:00:32 2011
New Revision: 218830
URL: http://svn.freebsd.org/changeset/base/218830

Log:
  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.

Modified:
  head/sys/dev/dc/if_dc.c

Modified: head/sys/dev/dc/if_dc.c
==============================================================================
--- head/sys/dev/dc/if_dc.c	Fri Feb 18 23:47:58 2011	(r218829)
+++ head/sys/dev/dc/if_dc.c	Sat Feb 19 00:00:32 2011	(r218830)
@@ -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;


More information about the svn-src-all mailing list