The patch fixed the Badness.

The oops when removing the device is still present.

All informations about my running kernel is in the ksymoops file (it's a 2.6.11-rc5)

On Sat, 26 Feb 2005, Scoony wrote:



Hi,

I've a problem when plugging my usb-midi controler (korg microkontrol) on my host.

Dmesg say a Badness in usb_maxpacket and dump the stack.

When I unplug, the kernel makes an oops.

Added some (relevant?) printk in usb-midi.c

I joined some informations, If you need more, please, contact me.



It wouldn't hurt if you mentioned which version of the kernel you're using.


I don't know what's causing the oops, but the patch below should fix that "Badness in usb_maxpacket" message. Maybe it will fix the oops also...

Alan Stern



--- a/drivers/usb/class/usb-midi.c      Mon Feb  7 11:14:37 2005
+++ b/drivers/usb/class/usb-midi.c      Sat Feb 26 10:17:03 2005
@@ -992,7 +992,7 @@
        endPoint &= 0x0f; /* Silently force endPoint to lie in range 0 to 15. */

        pipe =  usb_rcvbulkpipe( d, endPoint );
-       bufSize = usb_maxpacket( d, pipe, usb_pipein(pipe) );
+       bufSize = usb_maxpacket( d, pipe, 0 );
        /* usb_pipein() = ! usb_pipeout() = true for an in Endpoint */

        ep = (struct midi_in_endpoint *)kmalloc(sizeof(struct 
midi_in_endpoint), GFP_KERNEL);
@@ -1063,7 +1063,7 @@

        endPoint &= 0x0f;
        pipe =  usb_sndbulkpipe( d, endPoint );
-       bufSize = usb_maxpacket( d, pipe, usb_pipeout(pipe) );
+       bufSize = usb_maxpacket( d, pipe, 1 );

        ep = (struct midi_out_endpoint *)kmalloc(sizeof(struct 
midi_out_endpoint), GFP_KERNEL);
        if ( !ep ) {



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel









------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to