From: <pa...@rc...> - 2001-05-25 00:38:57
|
Carlos Puchol wrote: > hi, i am trying to debug the situation of an hp officejet g55 > connected to one of the onboard usb ports in my spakin' new > asus a7v133. the printer is recognized but there is no way > to print or scan from it ... > so, maybe the problem is in the kernel. i am running a fresh > redhat 7.1 install. i am trying to run the printer drivers from > the hpoj group. ... > when running them with the usb mode, the first indication > that there is something wrong is that open() calls to > the /dev/usb/lp0 return -1 in the ptal-mlcd daemon when someone tries to > use it: > > open("/dev/usb/lp0", O_RDWR) = -1 ENODEV (No such device) Hi, Carlos. I tried running the HP OfficeJet software with USB on RedHat 7.1 (kernel 2.4.2), and ran into some problems that seem to be related to SMP. When I ran the box in UP mode, the problems went away. I don't know if this is related to the problems you reported, but I think the linux-usb folks will want to know about it. :-) Specifically, after I start ptal-mlcd (the hpoj MLC/1284.4 daemon), if I start a scan (using SANE), ptal-mlcd segfaults and I get the following in /var/log/messages: May 24 16:28:37 paschal5 kernel: Unable to handle kernel NULL pointer dereference at virtual address 000000a0 May 24 16:28:37 paschal5 kernel: printing eip: May 24 16:28:37 paschal5 kernel: c58646c7 May 24 16:28:37 paschal5 kernel: pgd entry c13ab000: 0000000000000000 May 24 16:28:37 paschal5 kernel: pmd entry c13ab000: 0000000000000000 May 24 16:28:37 paschal5 kernel: ... pmd not present! May 24 16:28:37 paschal5 kernel: Oops: 0000 May 24 16:28:37 paschal5 kernel: CPU: 0 May 24 16:28:37 paschal5 kernel: EIP: 0010:[pcnet32:__insmod_pcnet32_O/lib/modules/2.4.2-2smp/kernel/drivers/ne+-88377/96] May 24 16:28:37 paschal5 kernel: EIP: 0010:[<c58646c7>] May 24 16:28:37 paschal5 kernel: EFLAGS: 00010096 May 24 16:28:37 paschal5 kernel: eax: c169ff40 ebx: 00000202 ecx: 00000000 edx: c13fe060 May 24 16:28:37 paschal5 kernel: esi: c4705218 edi: 00000000 ebp: c4705218 esp: c1383efc May 24 16:28:37 paschal5 kernel: ds: 0018 es: 0018 ss: 0018 May 24 16:28:37 paschal5 kernel: Process ptal-mlcd (pid: 1135, stackpage=c1383000) May 24 16:28:37 paschal5 kernel: Stack: c5869004 c5866df7 00000387 c13fe060 c4705218 c169ff40 00000202 c4705218 May 24 16:28:37 paschal5 kernel: c4acf000 c13fe060 c5863641 c4705218 c1382000 c1382000 00000000 00000001 May 24 16:28:37 paschal5 kernel: c0008200 c13fe060 c4acf000 c47051c0 c13ff000 00000000 00000009 c585604c May 24 16:28:37 paschal5 kernel: Call Trace: [pcnet32:__insmod_pcnet32_O/lib/modules/2.4.2-2smp/kernel/drivers/ne+-69628/96] [pcnet32:__insmod_pcnet32_O/lib/modules/2.4.2-2smp/kernel/drivers/ne+-78345/96] [pcnet32:__insmod_pcnet32_O/lib/modules/2.4.2-2smp/kernel/drivers/ne+-92607/96] [pcnet32:__insmod_pcnet32_O/lib/modules/2.4.2-2smp/kernel/drivers/ne+-147380/96] [ipchains:__insmod_ipchains_S.bss_L1072+38862/79684770] [sys_write+150/208] [system_call+51/56] May 24 16:28:37 paschal5 kernel: Call Trace: [<c5869004>] [<c5866df7>] [<c5863641>] [<c585604c>] [<c587e60e>] [<c013a486>] [<c01091cb>] May 24 16:28:37 paschal5 kernel: [startup_32+43/203] May 24 16:28:37 paschal5 kernel: [<c010002b>] May 24 16:28:37 paschal5 kernel: May 24 16:28:37 paschal5 kernel: Code: 8b 81 a0 00 00 00 8d 59 0c 8b 40 24 89 44 24 10 8b 45 34 89 I attached gdb to ptal-mlcd, but the process died such an ugly death that gdb wasn't able to determine where in the code the segfault happened, which would have possibly indicated what specific operation caused the segfault. After the oops, lsmod indicated that the USB "printer" module was still in use, even though ptal-mlcd had exited: Module Size Used by printer 5120 1 usb-ohci 17744 0 (unused) usbcore 52416 1 [printer usb-ohci] When I tried to restart ptal-mlcd and re-establish communication with the peripheral, ptal-mlcd was unable to open /dev/usb/lp0 due to errno 16 (device or resource busy), probably because printer.o was in a bad state. After messing around with it some more (I forget exactly what I did), my machine eventually locked up completely and I had to press the reset button. Running smaller tasks, such as talking to the "echo" service on the peripheral, seems to work fine even in SMP. In non-SMP, I can scan all I want without problems. > - shouldn't the ptal-mlcd process cause the uhci and/or printer > module to be "in use"? although i believe the driver does not > talk to the printer unless it is required. ptal-mlcd waits until an application tries to talk to the peripheral before it opens /dev/usb/lpX. Once that's open, it stays open until ptal-mlcd is killed, a communication or protocol error happens, or the daemon is explicitly deactivated with the "deactivate" command on the debug console. David |
From: Carlos P. <cp...@ro...> - 2001-05-17 05:54:44
|
[embarrased] the printer had (somehow) shut down at some point in the afternoon, thus it was not listed, as pete z. pointed out. now, after restarting it, it does in fact seem like the printer is indeed now detected by the printer module: bash# lsmod | egrep "usb|printer|Module|uhci" Module Size Used by printer 4928 1 uhci 22144 0 (unused) usbcore 49664 1 [printer uhci] bash# i am astonished and embarrased to report that things just work now, after two *d@mned* days of fiddling with this problem in various ways. sorry for bothering you guys - now ... what _really_ bothers me now is that i have no idea what is the right thing to do... i noted the modules running (uhci), and rebooted the linux box ... hmmm, it does not work. the ptal daemos are there ... yet the printer module is *not* used: bash# get ptal root 670 0.0 0.1 1864 612 ? S 00:32 0:00 /opt/hpoj-010515/bin/ptal-mlcd usb:0 -device /dev/usb/lp0 root 672 0.0 0.1 1372 404 ? S 00:32 0:00 /opt/hpoj-010515/bin/ptal-printd mlc:usb:0 -like /dev/lp0 bash# lsmod | egrep "usb|printer|Module|uhci" Module Size Used by printer 4928 0 (unused) uhci 22144 0 (unused) usbcore 49664 1 [printer uhci] bash# like this, lpr just "sucks" print jobs into oblivion. i tried rebooting the printer ... this shows up ... May 17 00:38:04 tcb kernel: usb.c: USB disconnect on device 4 May 17 00:38:48 tcb kernel: hub.c: USB new device connect on bus1/2, assigned device number 5 May 17 00:38:48 tcb kernel: printer.c: usblp0: USB Bidirectional printer dev 5 if 0 alt 0 but nothing, the daemons come up, bash# get ptal root 1812 0.0 0.1 1864 612 ? S 00:38 0:00 /opt/hpoj-010515/bin/ptal-mlcd usb:0 -device /dev/usb/lp0 root 1814 0.0 0.1 1372 400 ? S 00:38 0:00 /opt/hpoj-010515/bin/ptal-printd mlc:usb:0 -like /dev/lp0 bash# but the printer is still unused: bash# lsmod | egrep "usb|printer|Module|uhci" Module Size Used by printer 4928 0 (unused) uhci 22144 0 (unused) usbcore 49664 1 [printer uhci] bash# looking at the /var/log/messages, i am going to try to reconstruct what happened before, the only interesting things that happened are: May 16 17:34:06 tcb kernel: usb.c: USB disconnect on device 2 [must have been when the printer shut itself off?] then ... i am not sure what happened here to trigger this (kernel autoclean of modules?): May 16 21:53:02 tcb kernel: usb.c: deregistering driver usblp May 16 21:53:02 tcb kernel: usb.c: USB disconnect on device 1 May 16 21:53:02 tcb kernel: usb.c: USB bus 1 deregistered May 16 21:53:02 tcb kernel: usb.c: USB disconnect on device 3 May 16 21:53:02 tcb kernel: usb.c: USB bus 2 deregistered May 16 21:53:16 tcb kernel: PCI: Found IRQ 9 for device 00:04.2 May 16 21:53:16 tcb kernel: PCI: The same IRQ used for device 00:04.3 May 16 21:53:16 tcb kernel: uhci.c: USB UHCI at I/O 0xb400, IRQ 9 May 16 21:53:16 tcb kernel: usb.c: new USB bus registered, assigned bus number 1 May 16 21:53:16 tcb kernel: hub.c: USB hub found May 16 21:53:16 tcb kernel: hub.c: 2 ports detected May 16 21:53:16 tcb kernel: PCI: Found IRQ 9 for device 00:04.3 May 16 21:53:16 tcb kernel: PCI: The same IRQ used for device 00:04.2 May 16 21:53:16 tcb kernel: uhci.c: USB UHCI at I/O 0xb000, IRQ 9 May 16 21:53:16 tcb /etc/hotplug/usb.agent: ... no drivers for USB product 0/0/0 May 16 21:53:16 tcb kernel: usb.c: new USB bus registered, assigned bus number 2 May 16 21:53:16 tcb kernel: hub.c: USB hub found May 16 21:53:16 tcb kernel: hub.c: 2 ports detected May 16 21:53:16 tcb /etc/hotplug/usb.agent: ... no drivers for USB product 0/0/0 and then, this (i'm sure about this) must have been a little bit ago when i got tipped that the printer was not connected and printing worked: May 17 00:19:32 tcb kernel: hub.c: USB new device connect on bus1/2, assigned device number 6 May 17 00:19:32 tcb kernel: usb.c: USB device 6 (vend/prod 0x3f0/0x11) is not claimed by any active driver. May 17 00:19:32 tcb kernel: usb.c: registered new driver usblp May 17 00:19:32 tcb kernel: printer.c: usblp0: USB Bidirectional printer dev 6 if 0 alt 0 and i cannto reproduce the situation. i tried unloading printer and uhci, then starting the printer and various other things ... printer is still unused: bash# lsmod | egrep "usb|printer|Module|uhci" Module Size Used by printer 4928 0 (unused) uhci 22144 0 (unused) usbcore 49664 1 [printer uhci] bash# thank you for your patience ... if you have any ideas, please let me know. to finish up, here is the /proc/bus/usb/devices: bash# cat /proc/bus/usb/devices T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 8 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI-alt Root Hub S: SerialNumber=b000 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 7 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI-alt Root Hub S: SerialNumber=b400 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms T: Bus=01 Lev=01 Prnt=07 Port=01 Cnt=01 Dev#= 9 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=03f0 ProdID=0011 Rev= 1.00 S: Manufacturer=Hewlett-Packa S: Product=OfficeJet G55 S: SerialNumber=SGD05106RCVL C:* #Ifs= 1 Cfg#= 1 Atr=00 MxPwr= 2mA I: If#= 0 Alt= 0 #EPs= 3 Cls=07(print) Sub=01 Prot=03 Driver=usblp E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=255ms bash# thanks, -c __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: Allen B. <ba...@lo...> - 2001-05-17 12:01:46
|
I've noticed now that since upgrading to RH 7.1 (which actually involved reverting the kernel to an earlier rev.), that cold starting the USB printer and the ptal daemons from hotplug doesn't work reliably anymore. I have to re-plugin the printer and start the daemons manually after the machine is up and stable. Allen Carlos Puchol wrote: > now, after restarting it, it does in fact seem like the > printer is indeed now detected by the printer module: > > bash# lsmod | egrep "usb|printer|Module|uhci" > Module Size Used by > printer 4928 1 > uhci 22144 0 (unused) > usbcore 49664 1 [printer uhci] > bash# > > i am astonished and embarrased > to report that things just work now, > after two *d@mned* days of fiddling with > this problem in various ways. Did it print at this point? > sorry for bothering you guys - now ... what _really_ bothers > me now is that i have no idea what is the right thing to > do... > > i noted the modules running (uhci), and > rebooted the linux box ... hmmm, it does not work. > the ptal daemos are there ... yet the printer module is *not* > used: > |
From: Carlos P. <cp...@ro...> - 2001-05-17 22:44:10
|
Allen Barnett <ba...@lo...> wrote: > I've noticed now that since upgrading to RH 7.1 (which actually involved > reverting the kernel to an earlier rev.), that cold starting the USB > printer and the ptal daemons from hotplug doesn't work reliably anymore. > I have to re-plugin the printer and start the daemons manually after the > machine is up and stable. in the usb mailing list i got this: http://www.geocrawler.com/mail/msg.php3?msg_id=5775372&list=2571 Message: 5775372 FROM: David Brownell DATE: 05/17/2001 10:08:30 SUBJECT: RE: [linux-usb-devel] any success w/ asus a7v133 onboard controller? May 16 21:53:16 tcb kernel: hub.c: USB hub found > May 16 21:53:16 tcb kernel: hub.c: 2 ports detected > May 16 21:53:16 tcb /etc/hotplug/usb.agent: ... no drivers for USB product > 0/0/0 Likely unrelated ... but I think this means you've got a pretty old version of the hotplug scripts. Recent ones have a workaround for the kernel issue whereby the MODULE_DEVICE_TABLE in "hub.c" doesn't export the same info that hotplugging does. (Device match not interface match, or vice versa.) Does unplugging/replugging the printer make a difference? - Dave which may suggest that the hotpluf stuff you sent (to me in private email) may need some updating perhaps. > Carlos Puchol wrote: > > now, after restarting it, it does in fact seem like the > > printer is indeed now detected by the printer module: > > > > bash# lsmod | egrep "usb|printer|Module|uhci" > > Module Size Used by > > printer 4928 1 > > uhci 22144 0 (unused) > > usbcore 49664 1 [printer uhci] > > bash# > > > > i am astonished and embarrased > > to report that things just work now, > > after two *d@mned* days of fiddling with > > this problem in various ways. > > > Did it print at this point? yep, but never since then :-( |
From: Carlos P. <cp...@ro...> - 2001-05-18 05:23:24
|
Allen Barnett <ba...@lo...> wrote: > I've noticed now that since upgrading to RH 7.1 (which actually involved > reverting the kernel to an earlier rev.), that cold starting the USB > printer and the ptal daemons from hotplug doesn't work reliably anymore. > I have to re-plugin the printer and start the daemons manually after the > machine is up and stable. hi allen, i think this is what it is happening in my case, it is just that i was assuming that loading the daemons via the hotplugging was not an issue. in fact, it would seem rather harmless to do it automatically vs manually. perhaps a matter of timing? it would seem then that my asus usb hardware is ok. what exactly do you have to re-load every time? i was able to put the printer back in operation on usb now. i removed the uhci and printer modules, then plugged the printer. then loaded the modules, then ran the daemons. killall -HUP ptal-printd ptal-mlcd rmmod uhci printer; modprobe uhci printer ptal-mlcd usb:0 -device /dev/usb/lp0; ptal-printd mlc:usb:0 -like /dev/lp0 # plug or power on printer what could be the problem be with this script in /etc/hotplug/usb/printer #!/bin/sh # # this is /etc/hotplug/usb/printer # if [[ -n "$PRODUCT" && $(expr $PRODUCT : 3f0) = 3 ]] ; then /opt/hpoj-010515/bin/ptal-mlcd usb:0 -device /dev/usb/lp0 /opt/hpoj-010515/bin/ptal-printd mlc:usb:0 -like /dev/lp0 fi thanks for your help! -c cc'ing the linux-usb folks |
From: Allen B. <ba...@lo...> - 2001-05-18 18:02:35
|
I think I've diagnosed this problem. When ptal-mlcd is started by this sequence of events: kernel -> khubd: notices a new device khubd -> /sbin/hotplug add usb /sbin/hotplug -> /etc/hotplug/usb.agent -> /etc/hotplug/usb/printer -> ptal-mlcd It turns out that STDIN is not open when ptal-mlcd starts! Therefore, when ptal-mlcd opens its command socket, /dev/ptal-mlcd/usb:0, that socket gets file descriptor = 0. Later, ptal-mlcd closes STDIN in consoleOpenQuiet, inadvertently closing the socket. (It didn't occur to me until just now that a simple fix might be to use ptal-mlcd usb:0 -device /dev/usb/lp0 < /dev/null in the script.) OK? Allen Carlos Puchol wrote: > > Allen Barnett <ba...@lo...> wrote: > > I've noticed now that since upgrading to RH 7.1 (which actually involved > > reverting the kernel to an earlier rev.), that cold starting the USB > > printer and the ptal daemons from hotplug doesn't work reliably anymore. > > I have to re-plugin the printer and start the daemons manually after the > > machine is up and stable. > > hi allen, > > i think this is what it is happening in my case, it is just that i was > assuming that loading the daemons via the hotplugging was not > an issue. in fact, it would seem rather harmless to do it automatically > vs manually. perhaps a matter of timing? > > it would seem then that my asus usb hardware is ok. > > what exactly do you have to re-load every time? > > i was able to put the printer back in operation on usb now. > i removed the uhci and printer modules, then plugged the printer. > then loaded the modules, then ran the daemons. > > killall -HUP ptal-printd ptal-mlcd > rmmod uhci printer; modprobe uhci printer > ptal-mlcd usb:0 -device /dev/usb/lp0; ptal-printd mlc:usb:0 -like /dev/lp0 > # plug or power on printer > > what could be the problem be with this script in /etc/hotplug/usb/printer > > #!/bin/sh > # > # this is /etc/hotplug/usb/printer > # > if [[ -n "$PRODUCT" && $(expr $PRODUCT : 3f0) = 3 ]] ; then > /opt/hpoj-010515/bin/ptal-mlcd usb:0 -device /dev/usb/lp0 > /opt/hpoj-010515/bin/ptal-printd mlc:usb:0 -like /dev/lp0 > fi > > thanks for your help! |
From: Carlos P. <cp...@ro...> - 2001-05-18 18:16:03
|
Allen Barnett <ba...@lo...> wrote: > I think I've diagnosed this problem. When ptal-mlcd is started by this > sequence of events: > > kernel -> khubd: notices a new device > khubd -> /sbin/hotplug add usb > /sbin/hotplug -> /etc/hotplug/usb.agent -> /etc/hotplug/usb/printer -> > ptal-mlcd > > It turns out that STDIN is not open when ptal-mlcd starts! Therefore, > when ptal-mlcd opens its command socket, /dev/ptal-mlcd/usb:0, that > socket gets file descriptor = 0. Later, ptal-mlcd closes STDIN in > consoleOpenQuiet, inadvertently closing the socket. > > (It didn't occur to me until just now that a simple fix might be to use > ptal-mlcd usb:0 -device /dev/usb/lp0 < /dev/null > in the script.) good catch! now, i would call it a work-around, rather :-) the other issue is how to unload the drivers when the printer is unplugged. |