cdc-wdm: Don't clear WDM_READ unless entire read buffer is emptied
authorBen Hutchings <ben@decadent.org.uk>
Sun, 12 Feb 2012 06:02:43 +0000 (06:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 21:12:14 +0000 (13:12 -0800)
The WDM_READ flag is cleared later iff desc->length is reduced to 0.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Bjørn Mork <bjorn@mork.no>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-wdm.c

index 7ca54d4dea929aee1b8812a4bc58afe968e1a442..6037b503153f3efcde935c8daf7a61c7f3b3f02b 100644 (file)
@@ -455,7 +455,6 @@ retry:
                        spin_unlock_irq(&desc->iuspin);
                        goto retry;
                }
-               clear_bit(WDM_READ, &desc->flags);
                cntr = desc->length;
                spin_unlock_irq(&desc->iuspin);
        }