Module Name: src
Committed By: christos
Date: Tue Jan 15 23:57:13 UTC 2013
Modified Files:
src/sys/dev/usb: usbdi.c
Log Message:
Don't do the xfer once, wait till it is done. I did not find this, someone
else did. Fixes slow devices such as scanners.
To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/dev/usb/usbdi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.142 src/sys/dev/usb/usbdi.c:1.143
--- src/sys/dev/usb/usbdi.c:1.142 Sat Jan 5 18:34:20 2013
+++ src/sys/dev/usb/usbdi.c Tue Jan 15 18:57:13 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.142 2013/01/05 23:34:20 christos Exp $ */
+/* $NetBSD: usbdi.c,v 1.143 2013/01/15 23:57:13 christos Exp $ */
/*
* Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.142 2013/01/05 23:34:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.143 2013/01/15 23:57:13 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -319,7 +319,7 @@ usbd_transfer(usbd_xfer_handle xfer)
if (err != USBD_IN_PROGRESS)
return (err);
usbd_lock_pipe(pipe);
- if (!xfer->done) {
+ while (!xfer->done) {
if (pipe->device->bus->use_polling)
panic("usbd_transfer: not done");