From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mccann, Benjamin E" Date: Fri, 06 Jul 2001 11:42:07 +0000 Subject: Help, HP PSC-750 USB printer won't work after enabling hot-plug s MIME-Version: 1 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C10610.AF9F4A60" Message-Id: List-Id: To: linux-hotplug@vger.kernel.org This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C10610.AF9F4A60 Content-Type: text/plain; charset="iso-8859-1" (Sorry for cross posting) Yesterday I had my new HP PSC-750 'all-in-one' printer/scanner/copier working after a fashion. I could print to it if I booted my server and the PSC750 in the 'right' order. (I don't really know the right order, but I was able to get everything running). This morning I embarked upon making 'hot-plugging' work because one of the issues I had with the printer is that the 'ptal-printd' process exits when the printer is turned off. Before getting into the particulars, my system is running a Redhat 6.2 distribution on a 2.2.20pre5 kernel. I did have to edit arch/i386/config.in to provide an option to enable CONFIG_HOTPLUG. I added: if [ "$CONFIG_KMOD" = "y" ]; then bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG fi in the loadable modules area of the file. I have installed the latest usbutils RPM (version 0.8) and I installed the hotplug-2001_04_24-1 hot plug RPM. I also have the latest hpoj package from the CVS repository at sourceforge. Finally, I created the following script to start the OfficeJet daemons when the printer comes online (in /etc/hotplug/usb/printer): #!/bin/sh # Start the HP Office Jet Daemons /usr/local/bin/ptal-mlcd usb:0 -hotplug -device /dev/usb/lp0 /usr/local/bin/ptal-printd mlc:usb:0 -like /dev/lp0 & The hotplug logic does run /sbin/hotplug and this script does run, but I get I/O errors talking to the printer so ptal-mlcd exits: Jul 6 07:15:35 canopus kernel: usb.c: USB new device connect, assigned device number 2 Jul 6 07:15:35 canopus kernel: Manufacturer: Hewlett-Packard Jul 6 07:15:35 canopus kernel: Product: PSC 750 Jul 6 07:15:35 canopus kernel: SerialNumber: MY12DA10CRWB Jul 6 07:15:35 canopus kernel: printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 Jul 6 07:15:35 canopus /sbin/hotplug: arguments (usb) env (ACTION=add DEVFS=/proc/bus/usb TERM=dumb DEVICE=/proc/bus/usb/001/002 HOSTTYPE=i386 PATH=/bin:/sbin:/usr/sbin:/usr/bin HOME=/ SHELL=/bin/bash DEBUG=yes INTERFACE=7/1/3 OSTYPE=Linux PRODUCT=3f0/1411/1.0 SHLVL=1 _=/usr/bin/env) Jul 6 07:15:35 canopus /sbin/hotplug: invoke /etc/hotplug/usb.agent () Jul 6 07:15:35 canopus /etc/hotplug/usb.agent: Modprobe and setup printer for USB product 3f0/1411/0100 Jul 6 07:15:35 canopus /etc/hotplug/usb.agent: Module setup printer for USB product 3f0/1411/0100 Jul 6 07:15:35 canopus ptal-mlcd: ptal-mlcd: SYSLOG at ExMgr.cpp:660, dev=, pid=1203, errno=111 ptal-mlcd successfully initialized. Jul 6 07:15:41 canopus kernel: usb_control/bulk_msg: timeout Jul 6 07:15:41 canopus ptal-mlcd: ptal-mlcd: ERROR at ExMgr.cpp:2940, dev=, pid=1203, errno=5 llioGetDeviceID: ioctl failed! Jul 6 07:15:41 canopus ptal-mlcd: ptal-mlcd: ERROR at ExMgr.cpp:2351, dev=, pid=1203, errno=25 llioOpenOne: llioGetDeviceID(/dev/usb/lp0) failed! Jul 6 07:15:42 canopus ptal-mlcd: ptal-mlcd: ERROR at ExMgr.cpp:2324, dev=, pid=1203, errno=25 Couldn't find device! Jul 6 07:15:42 canopus ptal-mlcd: ptal-mlcd: FATAL ERROR at ExMgr.cpp:757, dev=, pid=1203, errno=25 exActivate: Exiting due to activation failure. If I manually run ptal-mlcd and then attempt to run 'ptal-hp mlc:usb:0 display' then that also gets timeouts. (That was working yesterday). If it is any help, here is the output of 'dmesg' showing the timeout messages in the kernel: usb.c: kmalloc IF c11b0420, numif 1 usb.c: new device strings: Mfr=1, Product=2, SerialNumber=3 usb.c: USB device number 2 default language ID 0x409 Manufacturer: Hewlett-Packard Product: PSC 750 SerialNumber: MY12DA10CRWB printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 usb.c: usblp driver claimed interface c11b0420 usb.c: kusbd: /sbin/hotplug add 2 usb.c: kusbd policy returned 0x0 usb_control/bulk_msg: timeout usb_control/bulk_msg: timeout Finally, the USB bus appears to be functional because 'lsusb' is working and it does show the HP printer. What can I do to debug this problem and get hotplugging and PTAL to work together correctly? Is there some magic switch for ptal-mlcd? -Ben McCann --- Ben McCann Enterasys Networks 31 Nagog Park Acton, MA, 01720 email: bmccann@enterasys.com web: www.enterasys.com phone: (978) 266-8140 fax: (978) 266-8111 ------_=_NextPart_001_01C10610.AF9F4A60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Help, HP PSC-750 USB printer won't work after enabling hot-plug = scripts

(Sorry for cross posting)

Yesterday I had my new HP PSC-750 'all-in-one' = printer/scanner/copier
working after a fashion. I could print to it if I = booted my server and
the PSC750 in the 'right' order. (I don't really = know the right order,
but I was able to get everything running). This = morning I embarked upon
making 'hot-plugging' work because one of the issues = I had with the
printer is that the 'ptal-printd' process exits when = the printer is
turned off.

Before getting into the particulars, my system is = running a Redhat 6.2
distribution on a 2.2.20pre5 kernel. I did have to = edit arch/i386/config.in
to provide an option to enable CONFIG_HOTPLUG. I = added:

   if [ "$CONFIG_KMOD" =3D = "y" ]; then
     bool 'Support for = hot-pluggable devices' CONFIG_HOTPLUG
   fi

in the loadable modules area of the file. I have = installed the latest
usbutils RPM (version 0.8) and I installed the = hotplug-2001_04_24-1
hot plug RPM. I also have the latest hpoj package = from the CVS
repository at sourceforge.

Finally, I created the following script to start the = OfficeJet daemons
when the printer comes online (in = /etc/hotplug/usb/printer):

   #!/bin/sh

   # Start the HP Office Jet Daemons
   /usr/local/bin/ptal-mlcd usb:0 -hotplug = -device /dev/usb/lp0
   /usr/local/bin/ptal-printd mlc:usb:0 = -like /dev/lp0 &

The hotplug logic does run /sbin/hotplug and this = script does run, but
I get I/O errors talking to the printer so ptal-mlcd = exits:

Jul  6 07:15:35 canopus kernel: usb.c: USB new = device connect, assigned device number 2
Jul  6 07:15:35 canopus kernel: Manufacturer: = Hewlett-Packard
Jul  6 07:15:35 canopus kernel: Product: PSC = 750
Jul  6 07:15:35 canopus kernel: SerialNumber: = MY12DA10CRWB
Jul  6 07:15:35 canopus kernel: printer.c: = usblp0: USB Bidirectional printer dev 2 if 0 alt 0
Jul  6 07:15:35 canopus /sbin/hotplug: = arguments (usb) env (ACTION=3Dadd DEVFS=3D/proc/bus/usb TERM=3Ddumb = DEVICE=3D/proc/bus/usb/001/002 HOSTTYPE=3Di386 = PATH=3D/bin:/sbin:/usr/sbin:/usr/bin HOME=3D/ SHELL=3D/bin/bash = DEBUG=3Dyes INTERFACE=3D7/1/3 OSTYPE=3DLinux PRODUCT=3D3f0/1411/1.0 = SHLVL=3D1 _=3D/usr/bin/env)

Jul  6 07:15:35 canopus /sbin/hotplug: invoke = /etc/hotplug/usb.agent ()
Jul  6 07:15:35 canopus /etc/hotplug/usb.agent: = Modprobe and setup printer for USB product 3f0/1411/0100
Jul  6 07:15:35 canopus /etc/hotplug/usb.agent: = Module setup printer for USB product 3f0/1411/0100
Jul  6 07:15:35 canopus ptal-mlcd:  = ptal-mlcd: SYSLOG at ExMgr.cpp:660, dev=3D<usb:0>, pid=3D1203, = errno=3D111 ptal-mlcd successfully initialized.

Jul  6 07:15:41 canopus kernel: = usb_control/bulk_msg: timeout
Jul  6 07:15:41 canopus ptal-mlcd:  = ptal-mlcd: ERROR at ExMgr.cpp:2940, dev=3D<usb:0>, pid=3D1203, = errno=3D5         = llioGetDeviceID: ioctl failed!

Jul  6 07:15:41 canopus ptal-mlcd:  = ptal-mlcd: ERROR at ExMgr.cpp:2351, dev=3D<usb:0>, pid=3D1203, = errno=3D25         llioOpenOne: = llioGetDeviceID(/dev/usb/lp0) failed!

Jul  6 07:15:42 canopus ptal-mlcd:  = ptal-mlcd: ERROR at ExMgr.cpp:2324, dev=3D<usb:0>, pid=3D1203, = errno=3D25         Couldn't = find device!

Jul  6 07:15:42 canopus ptal-mlcd:  = ptal-mlcd: FATAL ERROR at ExMgr.cpp:757, dev=3D<usb:0>, = pid=3D1203, errno=3D25         = exActivate: Exiting due to activation failure.

If I manually run ptal-mlcd and then attempt to run = 'ptal-hp mlc:usb:0 display'
then that also gets timeouts. (That was working = yesterday).

If it is any help, here is the output of 'dmesg' = showing the
timeout messages in the kernel:

usb.c: kmalloc IF c11b0420, numif 1
usb.c: new device strings: Mfr=3D1, Product=3D2, = SerialNumber=3D3
usb.c: USB device number 2 default language ID = 0x409
Manufacturer: Hewlett-Packard
Product: PSC 750
SerialNumber: MY12DA10CRWB
printer.c: usblp0: USB Bidirectional printer dev 2 = if 0 alt 0
usb.c: usblp driver claimed interface = c11b0420
usb.c: kusbd: /sbin/hotplug add 2
usb.c: kusbd policy returned 0x0
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout

Finally, the USB bus appears to be functional because = 'lsusb' is
working and it does show the HP printer.

What can I do to debug this problem and get = hotplugging and PTAL
to work together correctly? Is there some magic = switch for ptal-mlcd?

-Ben McCann

---
Ben = McCann           =             =   Enterasys Networks
          &nb= sp;           &nb= sp;            = 31 Nagog Park
          &nb= sp;           &nb= sp;            = Acton, MA, 01720
email: = bmccann@enterasys.com       web: = www.enterasys.com
phone: (978) = 266-8140          &nbs= p;   fax: (978) 266-8111

------_=_NextPart_001_01C10610.AF9F4A60-- _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel