1 From f94d3fbb605ad16d701525502fbad114a950197c Mon Sep 17 00:00:00 2001
2 From: merge <null@invalid>
3 Date: Mon, 19 Jan 2009 23:03:59 +0000
4 Subject: [PATCH 1/8] MERGE-via-pending-tracking-hist-subject-usb-gadget-rndis-send-
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
8 pending-tracking-hist top was subject-usb-gadget-rndis-send- / 3c29888770bfa8ce3a5e2ed590c3edb97ca4abaf ... parent commitmessage:
9 From: Richard Röjfors <richard.rojfors@endian.se>
10 Subject: USB: gadget rndis: send notifications
12 X-Git-Tag: v2.6.28-rc6~2^2~2
13 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=ff3495052af48f7a2bf7961b131dc9e161dae19c;hp=9c264521a9f836541c122b00f505cfd60cc5bbb5
15 USB: gadget rndis: send notifications
17 It turns out that atomic_inc_return() returns the *new* value
18 not the original one, so the logic in rndis_response_available()
19 kept the first RNDIS response notification from getting out.
20 This prevented interoperation with MS-Windows (but not Linux).
22 Fix this to make RNDIS behave again.
24 Signed-off-by: Richard Röjfors <richard.rojfors@endian.se>
25 Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
26 Cc: stable <stable@kernel.org>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29 drivers/usb/gadget/f_rndis.c | 3 +--
30 1 files changed, 1 insertions(+), 2 deletions(-)
32 diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
33 index 659b3d9..428b599 100644
34 --- a/drivers/usb/gadget/f_rndis.c
35 +++ b/drivers/usb/gadget/f_rndis.c
36 @@ -172,7 +172,6 @@ static struct usb_interface_descriptor rndis_data_intf __initdata = {
37 .bDescriptorType = USB_DT_INTERFACE,
39 /* .bInterfaceNumber = DYNAMIC */
40 - .bAlternateSetting = 1,
42 .bInterfaceClass = USB_CLASS_CDC_DATA,
43 .bInterfaceSubClass = 0,
44 @@ -303,7 +302,7 @@ static void rndis_response_available(void *_rndis)
45 __le32 *data = req->buf;
48 - if (atomic_inc_return(&rndis->notify_count))
49 + if (atomic_inc_return(&rndis->notify_count) != 1)
52 /* Send RNDIS RESPONSE_AVAILABLE notification; a