ChangeSet 1.2020.1.121, 2005/03/08 00:38:29-08:00, [EMAIL PROTECTED]
[PATCH] USB: usbfs fix for data loss in message.c
This is my fix for usbfs losing data when the urb
is timed out but already contains data.
Signed-off-by: Brian Murphy <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
drivers/usb/core/message.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.c 2005-03-08 16:43:06 -08:00
+++ b/drivers/usb/core/message.c 2005-03-08 16:43:06 -08:00
@@ -70,7 +70,10 @@
current->comm,
usb_pipeendpoint(urb->pipe),
usb_pipein(urb->pipe) ? "in" : "out");
- status = -ETIMEDOUT;
+ if (urb->actual_length > 0)
+ status = 0;
+ else
+ status = -ETIMEDOUT;
}
if (timeout > 0)
del_timer_sync(&timer);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel