Date: Mon, 24 Jun 2013 05:18:31 +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: r252143 - head/sys/dev/usb/net Message-ID: <201306240518.r5O5IVDB041043@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306240518.r5O5IVDB041043>