http://buildbot.ghz.cc/public/nut/FreeBSD-i686/builds/53
One thing that stands out is that ETIME is not negated like the other error codes. What returns it?
- Charles On Jan 13, 2010, at 8:04 AM, Arjen de Korte wrote:
Author: adkorte-guest Date: Wed Jan 13 13:04:42 2010 New Revision: 2243 Log:Attempt to clear stalled devices by sending them an usb_reset() commandModified: trunk/drivers/blazer_usb.c Modified: trunk/drivers/blazer_usb.c= = = = = = = = ======================================================================--- trunk/drivers/blazer_usb.c Wed Jan 13 00:48:53 2010 (r2242) +++ trunk/drivers/blazer_usb.c Wed Jan 13 13:04:42 2010 (r2243) @@ -358,27 +358,35 @@ switch (ret) { - case -EBUSY: + case -EBUSY: /* Device or resource busy */fatal_with_errno(EXIT_FAILURE, "Got disconnected by another driver");- case -EPERM: + case -EPERM: /* Operation not permitted */ fatal_with_errno(EXIT_FAILURE, "Permissions problem"); - case -EPIPE: - if (!usb_clear_halt(udev, 0x81)) { + case -EPIPE: /* Broken pipe */ + if (usb_clear_halt(udev, 0x81) == 0) { /* stall condition cleared */ break; } - case -ENODEV: - case -EACCES: - case -EIO: - case -ENOENT: + case ETIME: /* Timer expired */ + if (usb_reset(udev) == 0) { + /* device reset handled */ + break; + } + case -ENODEV: /* No such device */ + case -EACCES: /* Permission denied */ + case -EIO: /* I/O error */ + case -ENXIO: /* No such device or address */ + case -ENOENT: /* No such file or directory */ /* Uh oh, got to reconnect! */ usb->close(udev); udev = NULL; break; - case -ETIMEDOUT: + case -ETIMEDOUT: /* Connection timed out */ + case -EOVERFLOW: /* Value too large for defined data type */ + case -EPROTO: /* Protocol error */ default: break; } _______________________________________________ nut-commits mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-commits
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Nut-upsdev mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
