Hi Anders,
> I tried to follow your instructions...
Wasn't quite what I had in mind, but gave me what has to be the
answers anyway. One printer bug, one more usbcore-ish (looks
to be pretty long-standing, too).
> Then I did my usual "cat /boot/bzImage > /dev/usb/lp0" after turning
> the printer off. This gave a flood of
>
> printer.c: usblp0: failed reading printer status #2 (-110)
>
> which means that status is -ETIMEDOUT, I suppose.
Translation: the HC doesn't yet know that the device went away,
so it's actually trying to do these I/Os (which must time out).
The attached "printer-0519.patch" drops the semaphore before each
pass through that loop in usblp_write(), so the khubd thread calling
the usblp disconnect() method will eventually do its job (assuming
scheduling won't starve that thread) and make that loop stop. Can
you try it (after verifying the usbcore patch)?
(One of these days I should get a working usb printer setup...)
> When I did rmmod
> usb-ohci, the message error flood stoped, and the following oops
> resulted:
This is because usb_submit_urb() couldn't detect that the HC went
away (via rmmod), and tried to submit anyway. And the reason
it couldn't detect it looks to be a longstanding bug in usbcore/hcd
paths: no HCD nulls out usb_device.bus so usb_submit_urb()
could test it and fail with ENODEV!
Can you try the attached "usbcore-0519.patch" (with the previous
printer patch, not printer-0519) to see if that makes that oops go away?
- Dave
usbcore-0519.patch
printer-0519.patch