Am Freitag, 27. April 2012, 16:02:35 schrieb Bjørn Mork: > Oliver Neukum <oneukum@xxxxxxx> writes: > > > From b32365d88d1ae2de4dfdbdaad8e20ce11c9f7154 Mon Sep 17 00:00:00 2001 > > From: Oliver Neukum <oliver@xxxxxxxxxx> > > Date: Fri, 27 Apr 2012 14:23:54 +0200 > > Subject: [PATCH 1/2] cdc-wdm: sanitize error returns > > > > wdm_flush() returns unsanitized USB error codes. > > They must be cleaned up to before being anded to user space > > > > Signed-off-by: Oliver Neukum <oneukum@xxxxxxx> > > --- > > drivers/usb/class/cdc-wdm.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c > > index 0bb2b32..0209b46 100644 > > --- a/drivers/usb/class/cdc-wdm.c > > +++ b/drivers/usb/class/cdc-wdm.c > > @@ -534,7 +534,7 @@ static int wdm_flush(struct file *file, fl_owner_t id) > > dev_err(&desc->intf->dev, "Error in flush path: %d\n", > > desc->werr); > > > > - return desc->werr; > > + return usb_translate_errors(desc->werr); > > } > > > > static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait) > > Right, so that's the problem with the 512 error returned to userspace... Then please test it together with commit 2c4d6bf295ae10ffcd84f0df6cb642598eb66603 It was included in 3.3. I need to know whether this fixes your problem. I'd then backport it to older stable kernels. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html