Date: Sat, 19 Feb 2011 00:00:32 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218830 - head/sys/dev/dc Message-ID: <201102190000.p1J00Wop077275@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102190000.p1J00Wop077275>