From owner-svn-src-user@FreeBSD.ORG Fri Nov 16 13:35:54 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A30E458E; Fri, 16 Nov 2012 13:35:54 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 685688FC12; Fri, 16 Nov 2012 13:35:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGDZswD095365; Fri, 16 Nov 2012 13:35:54 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGDZsev095363; Fri, 16 Nov 2012 13:35:54 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201211161335.qAGDZsev095363@svn.freebsd.org> From: Andre Oppermann Date: Fri, 16 Nov 2012 13:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r243150 - user/andre/tcp_workqueue/sys/dev/fxp X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 13:35:54 -0000 Author: andre Date: Fri Nov 16 13:35:53 2012 New Revision: 243150 URL: http://svnweb.freebsd.org/changeset/base/243150 Log: Expand the scope of FXP_LOCK() again in fxp_ithread() to be on the safe side. Remove a call to fxp_txeof() from fxp_start_body(). Remove duplicate struct ip and tcp assignments from fxp_encap(). Modified: user/andre/tcp_workqueue/sys/dev/fxp/if_fxp.c Modified: user/andre/tcp_workqueue/sys/dev/fxp/if_fxp.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/fxp/if_fxp.c Fri Nov 16 12:31:43 2012 (r243149) +++ user/andre/tcp_workqueue/sys/dev/fxp/if_fxp.c Fri Nov 16 13:35:53 2012 (r243150) @@ -1333,8 +1333,6 @@ fxp_start_body(struct ifnet *ifp) IFF_DRV_RUNNING) return; - if (sc->tx_queued > FXP_NTXCB_HIWAT) - fxp_txeof(sc); /* * We're finished if there is nothing more to add to the list or if * we're all filled up with buffers to transmit. @@ -1444,8 +1442,6 @@ fxp_encap(struct fxp_softc *sc, struct m * Since 82550/82551 doesn't modify IP length and pseudo * checksum in the first frame driver should compute it. */ - ip = (struct ip *)(mtod(m, char *) + ip_off); - tcp = (struct tcphdr *)(mtod(m, char *) + poff); ip->ip_sum = 0; ip->ip_len = htons(m->m_pkthdr.tso_segsz + (ip->ip_hl << 2) + (tcp->th_off << 2)); @@ -1897,6 +1893,8 @@ fxp_ithread(void *xsc) struct mbuf *m, *n; uint8_t statack; + FXP_LOCK(sc); + /* * Loop while the chip indicates work. * The control status register is contiguously updated, @@ -1913,8 +1911,6 @@ fxp_ithread(void *xsc) } CSR_WRITE_1(sc, FXP_CSR_SCB_STATACK, statack); - FXP_LOCK(sc); - /* * Free any finished transmit mbuf chains. * @@ -1956,7 +1952,9 @@ fxp_ithread(void *xsc) (*ifp->if_input)(ifp, n); maybe_yield(); } + FXP_LOCK(sc); } + FXP_UNLOCK(sc); /* * Enable interrupts again.