PERFORCE change 117254 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Apr 3 07:17:11 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=117254
Change 117254 by hselasky at hselasky_mini_itx on 2007/04/03 07:16:39
Increase modem buffer sizes where possible, like
suggested by PR usb/74609 .
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/uark.c#3 edit
.. //depot/projects/usb/src/sys/dev/usb/ubsa.c#16 edit
.. //depot/projects/usb/src/sys/dev/usb/ucycom.c#11 edit
.. //depot/projects/usb/src/sys/dev/usb/ufoma.c#15 edit
.. //depot/projects/usb/src/sys/dev/usb/uftdi.c#15 edit
.. //depot/projects/usb/src/sys/dev/usb/umodem.c#17 edit
.. //depot/projects/usb/src/sys/dev/usb/umoscom.c#3 edit
.. //depot/projects/usb/src/sys/dev/usb/uplcom.c#18 edit
.. //depot/projects/usb/src/sys/dev/usb/uvscom.c#18 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/uark.c#3 (text+ko) ====
@@ -40,7 +40,7 @@
#define DPRINTF(...) { }
-#define UARK_BUF_SIZE 512
+#define UARK_BUF_SIZE 1024 /* bytes */
#define UARK_N_TRANSFER 4 /* units */
==== //depot/projects/usb/src/sys/dev/usb/ubsa.c#16 (text+ko) ====
@@ -93,7 +93,7 @@
#endif
#define UBSA_N_TRANSFER 6 /* units */
-#define UBSA_BSIZE 256 /* bytes */
+#define UBSA_BSIZE 1024 /* bytes */
#define UBSA_CONFIG_INDEX 1
#define UBSA_IFACE_INDEX 0
@@ -632,7 +632,8 @@
return;
}
- if(ucom_get_data(&(sc->sc_ucom), xfer->buffer, UBSA_BSIZE, &actlen)) {
+ if(ucom_get_data(&(sc->sc_ucom), xfer->buffer,
+ UBSA_BSIZE, &actlen)) {
xfer->length = actlen;
==== //depot/projects/usb/src/sys/dev/usb/ucycom.c#11 (text+ko) ====
@@ -52,7 +52,7 @@
__FBSDID("$FreeBSD: src/sys/dev/usb/ucycom.c,v 1.4 2005/10/16 20:22:56 phk Exp $");
-#define UCYCOM_MAX_IOLEN (256 + 2) /* bytes */
+#define UCYCOM_MAX_IOLEN (1024 + 2) /* bytes */
#define UCYCOM_ENDPT_MAX 3 /* units */
#define UCYCOM_IFACE_INDEX 0
==== //depot/projects/usb/src/sys/dev/usb/ufoma.c#15 (text+ko) ====
@@ -136,8 +136,7 @@
#define UFOMA_MAX_TIMEOUT 15 /* standard says 10 seconds */
#define UFOMA_CMD_BUF_SIZE 64 /* bytes */
-#define UFOMA_BULK_IBUFSIZE 64 /* bytes */
-#define UFOMA_BULK_OBUFSIZE 256 /* bytes */
+#define UFOMA_BULK_BUF_SIZE 1024 /* bytes */
#define UFOMA_CTRL_ENDPT_MAX 4 /* units */
#define UFOMA_BULK_ENDPT_MAX 4 /* units */
@@ -261,7 +260,7 @@
.type = UE_BULK,
.endpoint = -1, /* any */
.direction = UE_DIR_OUT,
- .bufsize = UFOMA_BULK_OBUFSIZE,
+ .bufsize = UFOMA_BULK_BUF_SIZE,
.flags = 0,
.callback = &ufoma_bulk_write_callback,
},
@@ -270,7 +269,7 @@
.type = UE_BULK,
.endpoint = -1, /* any */
.direction = UE_DIR_IN,
- .bufsize = UFOMA_BULK_IBUFSIZE,
+ .bufsize = UFOMA_BULK_BUF_SIZE,
.flags = USBD_SHORT_XFER_OK,
.callback = &ufoma_bulk_read_callback,
},
@@ -812,7 +811,7 @@
}
if (ucom_get_data(&(sc->sc_ucom), xfer->buffer,
- UFOMA_BULK_OBUFSIZE, &actlen)) {
+ UFOMA_BULK_BUF_SIZE, &actlen)) {
xfer->length = actlen;
usbd_start_hardware(xfer);
}
==== //depot/projects/usb/src/sys/dev/usb/uftdi.c#15 (text+ko) ====
@@ -83,12 +83,8 @@
#define UFTDI_IFACE_INDEX 0
#define UFTDI_ENDPT_MAX 4
-/*
- * These are the maximum number of bytes transferred per frame.
- * The output buffer size cannot be increased due to the size encoding.
- */
-#define UFTDI_IBUFSIZE 64
-#define UFTDI_OBUFSIZE 64
+#define UFTDI_IBUFSIZE 64 /* bytes, maximum number of bytes per frame */
+#define UFTDI_OBUFSIZE 64 /* bytes, cannot be increased due to do size encoding */
struct uftdi_softc {
struct ucom_super_softc sc_super_ucom;
==== //depot/projects/usb/src/sys/dev/usb/umodem.c#17 (text+ko) ====
@@ -120,13 +120,7 @@
{ 0, 0, 0 },
};
-/*
- * These are the maximum number of bytes transferred per frame.
- * If some really high speed devices should use this driver they
- * may need to be increased, but this is good enough for normal modems.
- */
-#define UMODEM_IBUFSIZE 64
-#define UMODEM_OBUFSIZE 256
+#define UMODEM_BUF_SIZE 1024
#define UMODEM_N_DATA_TRANSFER 4
#define UMODEM_N_INTR_TRANSFER 2
@@ -190,7 +184,7 @@
.type = UE_BULK,
.endpoint = -1, /* any */
.direction = UE_DIR_OUT,
- .bufsize = UMODEM_OBUFSIZE,
+ .bufsize = UMODEM_BUF_SIZE,
.flags = 0,
.callback = &umodem_write_callback,
},
@@ -199,7 +193,7 @@
.type = UE_BULK,
.endpoint = -1, /* any */
.direction = UE_DIR_IN,
- .bufsize = UMODEM_IBUFSIZE,
+ .bufsize = UMODEM_BUF_SIZE,
.flags = USBD_SHORT_XFER_OK,
.callback = &umodem_read_callback,
},
@@ -820,7 +814,8 @@
return;
}
- if(ucom_get_data(&(sc->sc_ucom), xfer->buffer, UMODEM_OBUFSIZE, &actlen)) {
+ if(ucom_get_data(&(sc->sc_ucom), xfer->buffer,
+ UMODEM_BUF_SIZE, &actlen)) {
xfer->length = actlen;
==== //depot/projects/usb/src/sys/dev/usb/umoscom.c#3 (text+ko) ====
@@ -42,7 +42,7 @@
#define DPRINTF(...) { }
#endif
-#define UMOSCOM_BUFSIZE 256 /* bytes */
+#define UMOSCOM_BUFSIZE 1024 /* bytes */
#define UMOSCOM_N_DATA_TRANSFER 6 /* units */
#define UMOSCOM_CONFIG_NO 0
==== //depot/projects/usb/src/sys/dev/usb/uplcom.c#18 (text+ko) ====
@@ -125,8 +125,7 @@
#define UPLCOM_INTR_INTERVAL 0 /* default */
#endif
-#define UPLCOM_IBUFSIZE 256
-#define UPLCOM_OBUFSIZE 256
+#define UPLCOM_BULK_BUF_SIZE 1024 /* bytes */
#define UPLCOM_N_DATA_TRANSFER 4
#define UPLCOM_N_INTR_TRANSFER 2
@@ -200,7 +199,7 @@
.type = UE_BULK,
.endpoint = -1, /* any */
.direction = UE_DIR_OUT,
- .bufsize = UPLCOM_OBUFSIZE,
+ .bufsize = UPLCOM_BULK_BUF_SIZE,
.flags = 0,
.callback = &uplcom_write_callback,
},
@@ -209,7 +208,7 @@
.type = UE_BULK,
.endpoint = -1, /* any */
.direction = UE_DIR_IN,
- .bufsize = UPLCOM_IBUFSIZE,
+ .bufsize = UPLCOM_BULK_BUF_SIZE,
.flags = USBD_SHORT_XFER_OK,
.callback = &uplcom_read_callback,
},
@@ -907,7 +906,8 @@
return;
}
- if(ucom_get_data(&(sc->sc_ucom), xfer->buffer, UPLCOM_OBUFSIZE, &actlen)) {
+ if(ucom_get_data(&(sc->sc_ucom), xfer->buffer,
+ UPLCOM_BULK_BUF_SIZE, &actlen)) {
xfer->length = actlen;
==== //depot/projects/usb/src/sys/dev/usb/uvscom.c#18 (text+ko) ====
@@ -125,8 +125,7 @@
#define UVSCOM_CTS 0x01
#define UVSCOM_USTAT_MASK (UVSCOM_NOCARD | UVSCOM_DSR | UVSCOM_CTS)
-#define UVSCOM_IBUFSIZE 512 /* bytes */
-#define UVSCOM_OBUFSIZE 512 /* bytes */
+#define UVSCOM_BULK_BUF_SIZE 1024 /* bytes */
#define UVSCOM_N_TRANSFER 6 /* units */
@@ -186,7 +185,7 @@
.type = UE_BULK,
.endpoint = -1, /* any */
.direction = UE_DIR_OUT,
- .bufsize = UVSCOM_OBUFSIZE,
+ .bufsize = UVSCOM_BULK_BUF_SIZE,
.flags = 0,
.callback = &uvscom_write_callback,
},
@@ -195,7 +194,7 @@
.type = UE_BULK,
.endpoint = -1, /* any */
.direction = UE_DIR_IN,
- .bufsize = UVSCOM_IBUFSIZE,
+ .bufsize = UVSCOM_BULK_BUF_SIZE,
.flags = USBD_SHORT_XFER_OK,
.callback = &uvscom_read_callback,
},
@@ -419,7 +418,8 @@
return;
}
- if(ucom_get_data(&(sc->sc_ucom), xfer->buffer, UVSCOM_OBUFSIZE, &actlen)) {
+ if(ucom_get_data(&(sc->sc_ucom), xfer->buffer,
+ UVSCOM_BULK_BUF_SIZE, &actlen)) {
xfer->length = actlen;
More information about the p4-projects
mailing list