If I power down my USB printer (HP 880C) while printing, then the USB printer driver gets stuck in the function usblp_write in printer.c. When under X, all of the other USB devices seem to turn off (LEDs shut off) and there is no response from anything. When in a console, the error message printer.c: usblp0: error -110 writing to printer endlessly streams across the screen and the system is useless (the LEDs of other USB devices stay on though). Turning the printer back on does not seem to help, but I only waited a half a minute or so. repeatability: always kernel RPM: kernel-2.4.2-0.1.28 Tony
Created attachment 14884 [details] Best possible band-aid for the problem.
Sleeping for 50 ticks is too little and will cause a message flooding on unattended print servers. Let's make it 1000 (10s).
I will try this patch as soon as I can, but this is looking like a busy week. One concern though: When I power down the printer while running X, all of my other USB devices shut off. Is the 10s timeout going to mean that the other devices are inoperable for 10s? Tony
If my analysis is correct, the recovery needs a small fraction of a second for khubd to pick up and enable ports. This is why I put only 0.5s into the schedule_timeout at first. The printing application will be delayed until a write awakens, for 10s.
I had to put the fix off because we were in a freeze for the 7.1 release. In CVS now, will come with errata.
Created attachment 20902 [details] More thoughrow fix by David-B