Without this little dirty hack my USB 3g modem is unbearably slow:
I think it increases the size of a buffer. Obviously it would be better to find out where ed->wMaxPacketSize comes from and address the problem there, but I never bothered to.
Code:
--- src/sys/dev/usb/ubsa.c.orig 2008-05-02 14:10:18.000000000 +0200
+++ src/sys/dev/usb/ubsa.c 2008-05-02 14:19:21.000000000 +0200
@@ -362,15 +362,15 @@
if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) {
sc->sc_intr_number = ed->bEndpointAddress;
- sc->sc_isize = UGETW(ed->wMaxPacketSize);
+ sc->sc_isize = UGETW(ed->wMaxPacketSize) << 2;
} else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) {
ucom->sc_bulkin_no = ed->bEndpointAddress;
- ucom->sc_ibufsize = UGETW(ed->wMaxPacketSize);
+ ucom->sc_ibufsize = UGETW(ed->wMaxPacketSize) << 2;
} else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) {
ucom->sc_bulkout_no = ed->bEndpointAddress;
- ucom->sc_obufsize = UGETW(ed->wMaxPacketSize);
+ ucom->sc_obufsize = UGETW(ed->wMaxPacketSize) << 2;
}
}
I think it increases the size of a buffer. Obviously it would be better to find out where ed->wMaxPacketSize comes from and address the problem there, but I never bothered to.