aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-04-29 13:09:47 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-23 02:45:48 -0400
commit4149b72eaa74583c361e3aaf5804eb74b72c51f1 (patch)
tree49191dc736116ff2e00686b3605ce7ea130da1cf /drivers/net/usb
parent47f8468e6008a1d62f7dacbcff4ec3e115a500c8 (diff)
USB: handle more rndis_host oddities
Workaround another device firmware bug, wherein CDC descriptors get placed in a wrong place never previously observed in the wild. Fix a bug where a seeming RNDIS device returns a bogus response during device initialization. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/cdc_ether.c16
-rw-r--r--drivers/net/usb/rndis_host.c1
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 5a21f06bf8a5..675ac99a79c6 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -91,6 +91,22 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
91 "CDC descriptors on config\n"); 91 "CDC descriptors on config\n");
92 } 92 }
93 93
94 /* Maybe CDC descriptors are after the endpoint? This bug has
95 * been seen on some 2Wire Inc RNDIS-ish products.
96 */
97 if (len == 0) {
98 struct usb_host_endpoint *hep;
99
100 hep = intf->cur_altsetting->endpoint;
101 if (hep) {
102 buf = hep->extra;
103 len = hep->extralen;
104 }
105 if (len)
106 dev_dbg(&intf->dev,
107 "CDC descriptors on endpoint\n");
108 }
109
94 /* this assumes that if there's a non-RNDIS vendor variant 110 /* this assumes that if there's a non-RNDIS vendor variant
95 * of cdc-acm, it'll fail RNDIS requests cleanly. 111 * of cdc-acm, it'll fail RNDIS requests cleanly.
96 */ 112 */
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 980e4aaa97aa..cd991a0f75bb 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -515,6 +515,7 @@ static int rndis_bind(struct usbnet *dev, struct usb_interface *intf)
515 dev_err(&intf->dev, 515 dev_err(&intf->dev,
516 "dev can't take %u byte packets (max %u)\n", 516 "dev can't take %u byte packets (max %u)\n",
517 dev->hard_mtu, tmp); 517 dev->hard_mtu, tmp);
518 retval = -EINVAL;
518 goto fail_and_release; 519 goto fail_and_release;
519 } 520 }
520 521