On Mon, May 13, 2002, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Playing with some strange device with vendor protocol, > I find that alt-uhci crashes the kernel without any messages > or information. (No oops, just dead.) > On the other hand, uhci comes back with an error message > > usb-uhci.c: uhci_submit_urb: pipesize for pipe c0030400 is zero > > Since an error message is preferable above a dead system, > this must be regarded as a bug in alt-uhci. This is 2.5.14.
I'd consider it undefined behaviour. A wMaxPacketSize of 0 doesn't make sense at all. That device is broken. But, you're absolutely right about an error message being preferable to a dead system. The patch is simple enough and I've attached it to the bottom of this message. Greg, please apply to 2.4.20 and 2.5. Thanks. JE --- linux-2.4.19-pre8.orig/drivers/usb/uhci.c Sun May 12 16:27:44 2002 +++ linux-2.4.19-pre8/drivers/usb/uhci.c Sun May 12 16:31:43 2002 @@ -1496,6 +1496,11 @@ uhci = (struct uhci *)urb->dev->bus->hcpriv; + if (usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)) <= 0) { + err("uhci_submit_urb: pipe %x has invalid size (<= 0)", urb->pipe); + return -EMSGSIZE; + } + INIT_LIST_HEAD(&urb->urb_list); usb_inc_dev_use(urb->dev); _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel