Message ID | Pine.LNX.4.44L0.1804231644580.2054-100000@iolanthe.rowland.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello, On 04/23/2018 11:50 PM, Alan Stern wrote: >> >> In ZWO forums there was a suggestion to revert USB packet validation by applying a "break" >> to Linux kernel. With some changes to line locations I have applied the patch below and >> camera started to work on a desktop with USB 2.0 host. > > The patch you wrote isn't ideal; the one below is better. In fact, the > code should be like this already. It was an oversight. Well, that was not my patch. I have just updated line numbers. >> Question: can anyone point what lines should be commented out to ignore packet sizes for >> USB 2.0 device, when attached to USB 3.0 host? > > As far as I know, there is no way to do this. USB-3 xHCI host > controllers validate maxpacket sizes in the hardware, not in software, > and there isn't any way to change the hardware's behavior. But I am > not an expert on xHCI. > > Does the camera work when attached to a USB-3 host controller on a > computer running Windows or Mac OS X? It looks you are right. Camera does not work properly on a Windows computer with USB 3.0 host. So it may be as you said - data is validated by hardware, device does not work and I will have thrown some money out. Anyway thanks for the help
Index: usb-4.x/drivers/usb/core/config.c =================================================================== --- usb-4.x.orig/drivers/usb/core/config.c +++ usb-4.x/drivers/usb/core/config.c @@ -191,7 +191,9 @@ static const unsigned short full_speed_m static const unsigned short high_speed_maxpacket_maxes[4] = { [USB_ENDPOINT_XFER_CONTROL] = 64, [USB_ENDPOINT_XFER_ISOC] = 1024, - [USB_ENDPOINT_XFER_BULK] = 512, + + /* Bulk should be 512, but some devices use 1024: we warn below */ + [USB_ENDPOINT_XFER_BULK] = 1024, [USB_ENDPOINT_XFER_INT] = 1024, }; static const unsigned short super_speed_maxpacket_maxes[4] = {