[PATCH v2] usbdevfs: Fix broken scatter-gather transfer

From: Henrik Rydberg
Date: Thu Oct 11 2012 - 17:27:04 EST


The handling of large output bulk transfers is broken; the same user
page is read over and over again. Fixed with this patch.

Signed-off-by: Henrik Rydberg <rydberg@xxxxxxxxxxx>
---
drivers/usb/core/devio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index ebb8a9d..6e58b59 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1349,6 +1351,7 @@
goto error;
}
}
+ uurb->buffer += u;
totlen -= u;
}
} else if (uurb->buffer_length > 0) {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/