-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 17.01.2010 06:54, Charles Lepple wrote: > > I guess I'm curious as to the source of that error code - I didn't see > it in libusb, so is it coming from the Linux kernel? >
Yes, it happen to come from the linux kernel and its meaning in our case is "ioctl URB operation timed out". ETIME is defined in /usr/include/asm-generic/errno.h, and this file is from kernel-headers package. The code that triggered this compilation error on freebsd was added by Arjen as a possible measure to 'heal' stalled Ippon USB device. Details of our conversation concerning NUT compatibility with Ippon UPSes are available on maillist archives. The story in short is that Ippon usb-to-serial devices are totally buggy and happen to hang every time the data wasn't read back in 64 bytes chunk. In case the device had hanged the only two ways to reboot it is to either replug the cable or to do USB port reset. Linux error code returned when communicating with the stalled device is ETIME (btw., I beleive that is should be "-ETIME" in NUT code instead of "ETIME"). So, Arjen had implemented special recovery handler for this error condition. This changes are still work-in-progress as there are pitfalls when reseting usb device (device handle should be re-opened, bus should be re-enumerated and it is unclear from libusb docs if it is required or not to do usb_close() on old usb device handle after usb_reset() call) and I hadn't had enough time to test Arjen's modifications on the Ippon device I had access to. Now it looks like I also will have to install FreeBSD on my notebook in order to check if it is possible to reset usb device using FreeBSD's implementation of libusb and to determine the error code that is returned for stalled device under FreeBSD. > The reason is that we try to add autoconf tests for definitions like > this, and it's good to have something more general than just "is ETIME > defined?" > I don't think there's a need for separate autoconf definition for ETIME as this error code seems to be linux-specific and platform type is the thing that happen to be checked up automatically by autoconf. - -- Best regards, Alexey Loukianov mailto:[email protected] System Engineer, Mob.:+7(926)218-1320 *nix Specialist -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJLUpAkAAoJEPB9BOdTkBULhqkH/1A9nrhbwEUYX3B4lqrxIzJs 1bzNJXbGNwKrwt3bcI06EAj3UMQn45Ehhb89VbC51GGmj+8kFJGG0sU2aeilXhuu sw6AxJrXTnzDsBiivTEvJQqkWf+tKgVrUvi749vJDiByF6Alx1FgoAPAsruTkt+r tXxLlrqHLBNHYJvGdJCR1wpqnIG4kuIl9ggAI1EYIhKWAUuJ68diHExlGWTpX9AN oi4hDF89tk3J+DlysnMolqJ0luXvRKFgsuyZwWgJcqW8uVNb5KOgh/Ijpg6pTSTR e70dfWySNgjxE5vbkcHyIphufM7qnWD5RDKSn4GkKDDSC01oA0oOSqR9jsY5qbs= =cJvr -----END PGP SIGNATURE----- _______________________________________________ Nut-upsdev mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
