On Thursday 19 April 2007 5:07 am, Mark Glassberg wrote:
> rndis_host 3-1:1.0: usb_probe_interface
> rndis_host 3-1:1.0: usb_probe_interface - got id
> rndis_host 3-1:1.0: missing cdc header union ether descriptor
> usb 3-1: bad CDC descriptors

One issue is that the CDC descriptors are in the wrong
place.  They should be after the interface descriptor,
but they're after the endpoint descriptor instead.

The appended patch should address that problem in a
saner way than Oliver's hack.


But after Oliver's hack, there was still:

> rndis_host 3-1:1.0: dev can't take 1558 byte packets (max 0)

And that means something else:  the device took the RNDIS
initialization request, but didn't return a sane response.
So it's acting as if it's not actually an RNDIS device...


And then for some reason it didn't clean up correctly
after reporting the error above ... it went ahead and
registered, as if a particular bug fix isn't actually
found in the kernel Mark is using, and the rndis bind()
error is ignored.  (GIT shows that patch was merged on
February 15...)

> eth2: register 'rndis_host' at usb-0000:00:1d.1-1, RNDIS device, 
> 00:00:00:00:00:00

That's why the device ends up with only the control
interface bound, and not the data interface.  Both
should have been unbound after that error.

- Dave


===========     CUT HERE
Workaround another device firmware bug, wherein CDC descriptors get
placed in a wrong place never previously observed in the wild.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>

---
 drivers/usb/net/cdc_ether.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)

--- g26.orig/drivers/usb/net/cdc_ether.c        2007-02-15 18:17:21.000000000 
-0800
+++ g26/drivers/usb/net/cdc_ether.c     2007-04-19 10:27:48.000000000 -0700
@@ -91,6 +91,22 @@ int usbnet_generic_cdc_bind(struct usbne
                                "CDC descriptors on config\n");
        }
 
+       /* Maybe CDC descriptors are after the endpoint?  This bug has
+        * been seen on some 2Wire Inc RNDIS-only products.
+        */
+       if (len == 0) {
+               struct usb_host_endpoint        *hep;
+
+               hep = intf->cur_altsetting->endpoint;
+               if (hep) {
+                       buf = hep->extra;
+                       len = hep->extralen;
+               }
+               if (len)
+                       dev_dbg(&intf->dev,
+                               "CDC descriptors on endpoint\n");
+       }
+
        /* this assumes that if there's a non-RNDIS vendor variant
         * of cdc-acm, it'll fail RNDIS requests cleanly.
         */

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to