diff options
author | Richard Röjfors <richard.rojfors@endian.se> | 2008-11-16 04:53:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@kvm.kroah.org> | 2008-11-20 07:01:34 +0100 |
commit | ff3495052af48f7a2bf7961b131dc9e161dae19c (patch) | |
tree | fdb4b2a903f3abaef298eecbf0d84859995fadea /drivers | |
parent | USB: gadget rndis: stop windows self-immolation (diff) | |
download | linux-ff3495052af48f7a2bf7961b131dc9e161dae19c.tar.xz linux-ff3495052af48f7a2bf7961b131dc9e161dae19c.zip |
USB: gadget rndis: send notifications
It turns out that atomic_inc_return() returns the *new* value
not the original one, so the logic in rndis_response_available()
kept the first RNDIS response notification from getting out.
This prevented interoperation with MS-Windows (but not Linux).
Fix this to make RNDIS behave again.
Signed-off-by: Richard Röjfors <richard.rojfors@endian.se>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 8afb14a4a72f..428b5993575a 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -302,7 +302,7 @@ static void rndis_response_available(void *_rndis) __le32 *data = req->buf; int status; - if (atomic_inc_return(&rndis->notify_count)) + if (atomic_inc_return(&rndis->notify_count) != 1) return; /* Send RNDIS RESPONSE_AVAILABLE notification; a |