Deadlock in kernel on USB shutdown
Hi,
I just compiled version 2.4.17 of the Linux kernel for my Pentium III. It is compiled with modular USB support so I can run my USB scanner (an Epson Perfection 1200U).
The scanner works fine but the system freeses when I shut it down. I investigated a bit and found that in the file:
<kernel_root>/drivers/usb/usb.c
in function:usb_disconnect(struct usb_device **pdev)
there is a call to function:usbdevfs_remove_device(dev)
at line 2423.
That is the exact point where it freeses. If I comment out that line, everything goes fine. I know! This is not the proper way to fix it! But at least, it fixes my problem. Since I'm not a kernel expert, I will leave it to you to find the right way to fix it.
If you want me to try something or to give you more info, do not hesitate to contact me.
Thanks
Roger
Quoted 12 lines · Roger Leblanc
Hi,
I just compiled version 2.4.17 of the Linux kernel for my Pentium III. It is compiled with modular USB support so I can run my USB scanner (an Epson Perfection 1200U).
The scanner works fine but the system freeses when I shut it down. I investigated a bit and found that in the file:
<kernel_root>/drivers/usb/usb.c
in function:usb_disconnect(struct usb_device **pdev)
Quoted 8 lines
there is a call to function:
usbdevfs_remove_device(dev)
at line 2423.That is the exact point where it freeses. If I comment out that line, everything goes fine. I know! This is not the proper way to fix it! But at least, it fixes my problem. Since I'm not a kernel expert, I will leave it to you to find the right way to fix it.
Does the system lock up when you unload the usbcore module by hand without shutting the system down?
Are your init scripts unmounting the usbdevfs filesystem properly before trying to unload the usbcore module?
thanks,
greg k-h