]> git.ipfire.org Git - people/ms/linux.git/commitdiff
USB: gadget rndis: stop windows self-immolation
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sun, 16 Nov 2008 03:53:21 +0000 (19:53 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Dec 2008 18:55:08 +0000 (10:55 -0800)
commit 9c264521a9f836541c122b00f505cfd60cc5bbb5 upstream.

Somewhere in the conversion of the RNDIS gadget code to the new
framework, the descriptor of its data interface seems to have
been copied from the CDC Ethernet driver.  Unfortunately that
means it got a nonzero altsetting ... which is incorrect.  Issue
uncovered by Richard Röjfors <richard.rojfors@endian.se>.

This patch fixes that problem, and resolves at least some cases
of Windows XP bluescreening itself.

Tested-by: Richard Röjfors <richard.rojfors@endian.se>.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_rndis.c

index 00dfbbeb28c201c318280aa6fddfcaeb0157fbc1..428b5993575a9126104da3ec32ea695e7881c9e8 100644 (file)
@@ -172,7 +172,6 @@ static struct usb_interface_descriptor rndis_data_intf __initdata = {
        .bDescriptorType =      USB_DT_INTERFACE,
 
        /* .bInterfaceNumber = DYNAMIC */
-       .bAlternateSetting =    1,
        .bNumEndpoints =        2,
        .bInterfaceClass =      USB_CLASS_CDC_DATA,
        .bInterfaceSubClass =   0,