[Nut-upsuser] MGE Nova 1100 using newhidups on netBSD 3.0

Arnaud Quette aquette.dev at gmail.com
Wed Mar 15 21:23:15 UTC 2006


Hi Nevil,

2006/3/6, Nevil Thatcher <NevilTh at nat.com.au>:
> Hi Arnaud,
>
> I have been playing around with the blocking at 'waiting for Notifications'
>
> What I have found is that the process will block at the read() statement in
> usb_interrupt_read() function in libusb (bsd.c).
>
> It seems to sit here indefinitely (have left it overnight).
> By unplugging/replugging the USB cable causes an error return from the
> read() statement, thus the function returns and status's are then received
> via the usb_control_msgs's. Subsequent calls's to usb_interrupt_read then
> also fail with the message "Failedto read form interrupt endpoint"
>
> In the call to usb_interrupt_read there is a timeout argument (5 sec). I am
> not sure if this means that the read is supposed to timeout after 5 sec if
> no data but this is not happenening.

yes, that should be its behaviour. So there is something wrong with
the timeout management. When adding the O_NONBLOCK flag, does it
return approx 5 sec. later? If so that would mean that O_NONBLOCK is
needed.

> Waiting for notifications...
> usb_interrupt_read 4 129 0x7f7fffffeb10 20 5000
> usb_interrupt_read Calling read
> usb_interrupt_read result=-1, size=20, retrieved=0
> USB error: error reading from interrupt endpoint /dev/ugen1.01: Resource
> temporarily unavailable

there is however an issue.
You should report both to the netBSD kernel hackers (the ugen one(s)
in fact) and the libusb team if not already done.

Arnaud



More information about the Nut-upsuser mailing list