This looks like the commit that triggered the following FreeBSD build
failure:
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()
> command
>
> Modified:
> 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
> nut-commits at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3152 bytes
Desc: not available
URL:
<http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20100116/08e16b69/attachment.bin>