[Nut-upsuser] tracing a problem with newhidups

Arnaud Quette aquette.dev at gmail.com
Fri Jul 7 19:42:32 UTC 2006


Hi Rodrigo,

2006/7/7, Rodrigo Ventura <yoda at isr.ist.utl.pt>:
>
> On Thursday 06 July 2006 20:15, Arnaud Quette wrote:
> > a good try, and amount of effort.
> > Sadly, notifications are on the PIPE_INTERRUPT
>
> Ok, let's do it again.
>
> HIDGetEvents() calls libusb_get_interrupt() with size=20 (hardcoded),
> which
> calls usb_interrupt_read(), then usb_urb_transfer(), which sets
> urb.buffer_length=20, going down the ioctl (as uurb), where the kernel urb
> struct gets urb.transfer_buffer_length=20. Then, uhci_submit_interrupt()
> checks that field with
>
> --------------------
>         if (urb->transfer_buffer_length > usb_maxpacket(urb->dev,
> urb->pipe,
> usb_pipeout(urb->pipe)))
>                 return -EINVAL;
> --------------------
>
> What is the endpoint max packet size? According to /proc/bus/usb/devices
>
> 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=01 Port=00 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=0463 ProdID=ffff Rev= 1.00
> S:  Manufacturer=MGE UPS SYSTEMS
> S:  Product=Evolution
> S:  SerialNumber=AF3G03062
>
> C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 40mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=20ms
>
> Assuming that MxPS means max packet size, it seems to be 8, which is
> lower than 20, and therefore it looks like the EINVAL error comes from
> there. Am I going in the right direction this time?


your guess seems right.
The best to validate your guess is to modify the 20 to 8 in get_interrupt()
and to recompile nut.

Let me know the result, and I'll fix that for 2.0.4-pre2 next week.

> If something is not working, you can try to reset the communication: power
> > off the UPS, then unplug its power cable, wait (at least) 10 seconds and
> > replug/restart all.
>
> Well, that's something I'd like to avoid, since all the institution
> servers
> are fed by the UPS.
>

I understand

Arnaud
-- 
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
OpenSource Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20060707/dec25d68/attachment.htm


More information about the Nut-upsuser mailing list