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. */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to