Subject: usb hang
To: None <netbsd-users@netbsd.org>
From: Wolfgang S. Rupprecht <wolfgang+gnus20041116T203857@dailyplanet.dontspam.wsrcc.com>
List: netbsd-users
Date: 11/16/2004 21:04:48
I'm trying to get a hacked freebsd version of apcupsd to run on netbsd
with one of the new usb-connected UPS's from APC.  If I force the UPS
(which otherwise would be a uhid) to be a ugen, I can get apcupsd to
run correctly for a short while.  After a 5-20 apcupsd status queries,
the ugen/usb device driver hangs sleeping on "usbsyn" with negative
priority.  

I've got a usbdebug=6 w. DIAGNOSTIC trace of the system during the
failure, but nothing very strange pops out at me (but then this is all
new territory for me).  It looks like a solicited, synchronous usb
transfer simply never finishes.  What is peculiar is that what appear
to be unsolicited periodic announcements from the UPS are received
correctly.  It is just the solicited data read by apcupsd that never
returns.

Can someone give me any hints as to how to proceed?  I have an 12k
byte snippet of my /var/log/messages with the debug kprintf's if that
would help.

        http://www.wsrcc.com/wolfgang/ftp/ugen-hang.txt.gz

background:

Nov 16 19:43:46 capsicum /netbsd: ugen0: American Power Conversion Back-UPS RS 1500 FW:8.g8 .D USB FW:g8, rev 1.10/1.06, addr 2
Nov 16 19:43:59 capsicum apcupsd[238]: apcupsd 3.10.15 (26 August 2004) netbsd startup succeeded

UID  PID PPID CPU PRI NI   VSZ   RSS WCHAN    STAT TT     TIME COMMAND
  0  238    1   0  -6  0  2208  1028 usbsyn   Dsa  ??  0:00.18 /sbin/apcupsd --kill-on-powerfail 

-wolfgang
-- 
Wolfgang S. Rupprecht                http://www.wsrcc.com/wolfgang/
	 When you talk to musicians about pirates they think
		   you are talking about the RIAA.