Subject: ulpt0 device timeout?
To: None <port-i386@NetBSD.ORG>
From: MLH <MLH@goathill.org>
List: port-i386
Date: 11/16/2002 05:52:44
I am seeing what I suspect is a usb device timeout when re-connecting
a usb printer.

usb printer : Samsung ML-1430 laser printer

NetBSD 1.6K (GENERIC) #0: Thu Nov 14 03:03:33 UTC 2002
    autobuild@tgm.daemon.org:/autobuild/HEAD/i386/OBJ/
    autobuild/HEAD/src/sys/arc h/i386/compile/GENERIC

uhci1 at pci0 dev 16 function 1: VIA Technologies VT83C572
    USB Controller (rev.  0x80)
uhci1: interrupting at irq 5
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: VIA Technologie UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered

----------------------
Condition #1 :
Printer is currently on, connect usb cable to printer :

 22:08:07 /netbsd: ulpt0 at uhub1 port 1 configuration 1 interface 0
 22:08:07 /netbsd: 
 22:08:07 /netbsd: ulpt0: Samsung Electronics Co., Ltd. Samsung
                   ML-1430, rev 1.10/1.00, addr 2, iclass 7/1
 22:08:07 /netbsd: ulpt0: using bi-directional mode

Printer is disconnected at usb cable :

 22:14:03 /netbsd: ulpt0: at uhub1 port 1 (addr 2) disconnected
 22:14:03 /netbsd: ulpt0 detached

Printer is reconnected at usb cable :

 22:14:41 /netbsd: ulpt0 at uhub1 port 1 configuration 1 interface 0
 22:14:41 /netbsd: 
 22:14:41 /netbsd: ulpt0: Samsung Electronics Co., Ltd. Samsung
                   ML-1430, rev 1.10/1.00, addr 2, iclass 7/1
 22:14:41 /netbsd: ulpt0: using bi-directional mode
----------------------
Condition #2 :
Printer is turned off (while still connected) :

 22:15:35 /netbsd: ulpt0: at uhub1 port 1 (addr 2) disconnected
 22:15:35 /netbsd: ulpt0 detached

Printer is turned on (while still connected) :

 several seconds later :

 22:16:03 /netbsd: uhub1: device problem, disabling port 1

Printer is disconnected and reconnected while still turned on :

 22:17:15 /netbsd: uhub1: port error, restarting port 1
 22:17:19 /netbsd: ulpt0 at uhub1 port 1 configuration 1 interface 0
 22:17:19 /netbsd: 
 22:17:19 /netbsd: ulpt0: Samsung Electronics Co., Ltd. Samsung
                   ML-1430, rev 1.10/1.00, addr 2, iclass 7/1
 22:17:19 /netbsd: ulpt0: using bi-directional mode
----------------------

It appears that when the printer is turned on while connected, it
doesn't respond to some request quickly enough for the device
driver, so the port is disabled. Unplugging the printer and plugging
it back in while turned on, fixes the ulpt device.

Does this sound reasonable, and is there a way to prevent the device
driver from timing out while the printer is bringing itself back
online?

Thanks