On Thu, 28 Aug 2003 11:51:48 -0700 Greg KH <[EMAIL PROTECTED]> wrote:
> On Thu, Aug 28, 2003 at 08:31:40PM +0400, Sergey Vlasov wrote: > > > > When trying to set up the HP LaserJet 1300 printer under Linux (using > > USB connection), I have found that in some circumstances the printer > > locks up. In my configuration (Linux 2.4.21, CUPS 1.1.18) > > Does the same thing happen in 2.4.22? Tried vanilla 2.4.22 - got the same lockup (both with the printer driver and with usb_printer_checks.c, which works through usbdevfs). Tried 2.4.23-pre1 with USB patches from linux-usb-devel - results exactly the same as with 2.4.22. Also tried 2.4.0-test4; here the situation is slightly different - ./usb_printer_test /proc/bus/usb/002/007 r does not cause the lockup every time as with 2.4.x, but eventually locks up the printer (after 2-7 tries in my tests). However, "cat echo.pjl >/dev/usb/lp0; sleep 1; ./printer_check /dev/usb/lp0" locks up the printer every time :-( I have tried to find out what is happening in the USB controller. First, I disabled FSBR in uhci-hcd to make it slower (by commenting out the body of uhci_inc_fsbr()). Then I loaded uhci-hcd with debug=2 and ran "while true; do cat /proc/driver/uhci/0000:00:10.1{,,,,,,} >>uhci.log; done" (there were lots of ',' there - starting up the cat process every time was too slow) while executing ./printer_check /dev/usb/lp0. I have attached the interesting part of this log (uhci-partial-log.tar.bz2). After uhci-08177.log further log entries are the same except for the frame number, until the control request is finally cancelled because of timeout. If I understand correctly how UHCI works, it first executes the SETUP transaction on EP0, then the IN transaction on EP1 (which results in a short read and therefore stops the bulk URB processing), and then continues with the remaining IN transactions for EP0. Probably the IN transaction for another endpoint confuses the printer? In case it would be useful, I also attached the full dmesg output with 2.6.0-test4 (after some printer hangs both with usblp and usbdevfs) and the full lspci output.
uhci-partial-log.tar.bz2
Description: BZip2 compressed data
dmesg.log.bz2
Description: BZip2 compressed data
lspci.log.bz2
Description: BZip2 compressed data
pgp00000.pgp
Description: PGP signature