From owner-svn-src-head@FreeBSD.ORG Mon Jun 24 05:18:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B11EFDDB; Mon, 24 Jun 2013 05:18:31 +0000 (UTC) (envelope-from yongari@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 A372A1DE1; Mon, 24 Jun 2013 05:18:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5O5IVYO041044; Mon, 24 Jun 2013 05:18:31 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5O5IVDB041043; Mon, 24 Jun 2013 05:18:31 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201306240518.r5O5IVDB041043@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Jun 2013 05:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252143 - head/sys/dev/usb/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 24 Jun 2013 05:18:31 -0000 Author: yongari Date: Mon Jun 24 05:18:31 2013 New Revision: 252143 URL: http://svnweb.freebsd.org/changeset/base/252143 Log: When RX checksum offloading is active, AX88772B will prepend a checksum header. The header contains a received frame length but the defined length for AX88772B is different with other ASIX controllers. When the RX checksum is off, AX88772B controller does not prepend a checksum header so driver has to use normal header length mask. This change should fix RX errors when RX checksum offloading is off. Tested by: kevlo MFC After: 1 week Modified: head/sys/dev/usb/net/if_axe.c Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Mon Jun 24 05:03:42 2013 (r252142) +++ head/sys/dev/usb/net/if_axe.c Mon Jun 24 05:18:31 2013 (r252143) @@ -1351,15 +1351,14 @@ axe_init(struct usb_ether *ue) if (AXE_IS_178_FAMILY(sc)) { sc->sc_flags &= ~(AXE_FLAG_STD_FRAME | AXE_FLAG_CSUM_FRAME); - if ((sc->sc_flags & AXE_FLAG_772B) != 0) - sc->sc_lenmask = AXE_CSUM_HDR_LEN_MASK; - else - sc->sc_lenmask = AXE_HDR_LEN_MASK; if ((sc->sc_flags & AXE_FLAG_772B) != 0 && - (ifp->if_capenable & IFCAP_RXCSUM) != 0) + (ifp->if_capenable & IFCAP_RXCSUM) != 0) { + sc->sc_lenmask = AXE_CSUM_HDR_LEN_MASK; sc->sc_flags |= AXE_FLAG_CSUM_FRAME; - else + } else { + sc->sc_lenmask = AXE_HDR_LEN_MASK; sc->sc_flags |= AXE_FLAG_STD_FRAME; + } } /* Configure TX/RX checksum offloading. */