From owner-svn-src-head@FreeBSD.ORG Thu Dec 18 01:36:47 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26E101065678; Thu, 18 Dec 2008 01:36:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E19C8FC14; Thu, 18 Dec 2008 01:36:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBI1aksH020723; Thu, 18 Dec 2008 01:36:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBI1aknu020722; Thu, 18 Dec 2008 01:36:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812180136.mBI1aknu020722@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Dec 2008 01:36:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186262 - head/sys/dev/fxp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 01:36:47 -0000 Author: yongari Date: Thu Dec 18 01:36:46 2008 New Revision: 186262 URL: http://svn.freebsd.org/changeset/base/186262 Log: It seems that we don't need to reserve a TBD to set total TCP payload length in TSO case. Leaving unused TBD also seem to cause SCB timeouts under certain conditions when TSO/non-TSO traffics are active at the same time. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Thu Dec 18 00:54:15 2008 (r186261) +++ head/sys/dev/fxp/if_fxp.c Thu Dec 18 01:36:46 2008 (r186262) @@ -1540,8 +1540,8 @@ fxp_encap(struct fxp_softc *sc, struct m * the chip is an 82550/82551 or not. */ if (sc->flags & FXP_FLAG_EXT_RFA) { - cbp->tbd[i + 2].tb_addr = htole32(segs[i].ds_addr); - cbp->tbd[i + 2].tb_size = htole32(segs[i].ds_len); + cbp->tbd[i + 1].tb_addr = htole32(segs[i].ds_addr); + cbp->tbd[i + 1].tb_size = htole32(segs[i].ds_len); } else { cbp->tbd[i].tb_addr = htole32(segs[i].ds_addr); cbp->tbd[i].tb_size = htole32(segs[i].ds_len); @@ -1550,13 +1550,13 @@ fxp_encap(struct fxp_softc *sc, struct m if (sc->flags & FXP_FLAG_EXT_RFA) { /* Configure dynamic TBD for 82550/82551. */ cbp->tbd_number = 0xFF; - cbp->tbd[nseg + 1].tb_size |= htole32(0x8000); + cbp->tbd[nseg].tb_size |= htole32(0x8000); } else cbp->tbd_number = nseg; /* Configure TSO. */ if (m->m_pkthdr.csum_flags & CSUM_TSO) { cbp->tbd[-1].tb_size = htole32(m->m_pkthdr.tso_segsz << 16); - cbp->tbd[1].tb_size = htole32(tcp_payload << 16); + cbp->tbd[1].tb_size |= htole32(tcp_payload << 16); cbp->ipcb_ip_schedule |= FXP_IPCB_LARGESEND_ENABLE | FXP_IPCB_IP_CHECKSUM_ENABLE | FXP_IPCB_TCP_PACKET |