Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2007 17:34:27 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 120505 for review
Message-ID:  <200705281734.l4SHYRo9032989@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=120505

Change 120505 by hselasky@hselasky_mini_itx on 2007/05/28 17:34:13

	Set Max Frame Burst to 2048 bytes, hence some chips do
	not support a higher value. This affects "AX88178" and
	"AX88772" based chips only.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/if_axe.c#26 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/if_axe.c#26 (text+ko) ====

@@ -243,7 +243,10 @@
       .type      = UE_BULK,
       .endpoint  = -1, /* any */
       .direction = UE_DIR_IN,
-      .bufsize   = AXE_BULK_BUF_SIZE,
+#if (MCLBYTES < 2048)
+#error "(MCLBYTES < 2048)"
+#endif
+      .bufsize   = MCLBYTES,
       .flags     = (USBD_USE_DMA|USBD_SHORT_XFER_OK),
       .callback  = &axe_bulk_read_callback,
       .timeout   = 0, /* no timeout */
@@ -698,12 +701,6 @@
 
 	sc->sc_flags |= AXE_FLAG_WAIT_LINK;
 
-	/* correct maximum bulk-receive length */
-
-	sc->sc_xfer[1]->length = 
-	  (sc->sc_flags & (AXE_FLAG_772|AXE_FLAG_178)) ?
-	  AXE_BULK_BUF_SIZE : MIN(MCLBYTES, AXE_BULK_BUF_SIZE);
-
 	/* start setup */
 
 	usbd_config_td_queue_command
@@ -1454,7 +1451,7 @@
 	/* Enable receiver, set RX mode */
 	rxmode = (AXE_RXCMD_MULTICAST|AXE_RXCMD_ENABLE);
 	if (sc->sc_flags & (AXE_FLAG_178|AXE_FLAG_772)) {
-	    rxmode |= AXE_178_RXCMD_MFB_16384; /* default */
+	    rxmode |= AXE_178_RXCMD_MFB_2048; /* chip default */
 	} else {
 	    rxmode |= AXE_172_RXCMD_UNICAST;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705281734.l4SHYRo9032989>