NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/55273: urndis(4) error "could not find data bulk in/out" without CDC union descriptor



>Number:         55273
>Category:       kern
>Synopsis:       urndis(4) error "could not find data bulk in/out" without CDC union descriptor
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 18 18:05:00 +0000 2020
>Originator:     Reinhard Speyerer
>Release:        NetBSD 9.0
>Organization:
>Environment:
NetBSD netbsd 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
urndis(4) returns
"autoconfiguration error: urndis0: could not find data bulk in/out"
when the corresponing CDC union descriptor is missing which seems
to be quite common for many current devices.

Obtain the corresponding information from the interface association
as it is already done in the umb(4) driver instead of adding each new
device without a CDC union descriptor to the urndis_devs table in the driver.
>How-To-Repeat:
Connect a device with a RNDIS interface which does not have a CDC union
descriptor  (e.g. Alcatel Onetouch L850V) to a USB port and check dmesg(1)
output:

[   119.859971] urndis0 at uhub4 port 6 configuration 1 interface 0
[   119.859971] urndis0: Alcatel (0x1bbb) MobileBroadBand (0x195), rev 2.01/2.28, addr 2
[   119.859971] autoconfiguration error: urndis0: could not find data bulk in
[   119.859971] autoconfiguration error: urndis0: could not find data bulk out
[   119.859971] umass0 at uhub4 port 6 configuration 1 interface 2
[   119.859971] umass0: Alcatel (0x1bbb) MobileBroadBand (0x195), rev 2.01/2.28, addr 2
[   119.859971] umass0: using SCSI over Bulk-Only
[   119.869972] scsibus0 at umass0: 2 targets, 1 lun per target
[   119.869972] sd0 at scsibus0 target 0 lun 0: <ONETOUCH, ESTORIL, 2.31> disk removable
[   119.869972] sd0: drive offline

>Fix:
Apply this patch

--- if_urndis.c.orig	2019-09-13 08:51:58.000000000 +0200
+++ if_urndis.c	2020-05-18 08:09:06.000000000 +0200
@@ -923,2 +923,3 @@
 	const usb_cdc_union_descriptor_t *ud;
+	const usb_interface_assoc_descriptor_t *ad;
 	const usb_cdc_header_descriptor_t *desc;
@@ -961,2 +962,9 @@
 
+		if (desc->bDescriptorType == UDESC_INTERFACE_ASSOC) {
+			ad = (const usb_interface_assoc_descriptor_t *)desc;
+			if (ad->bFirstInterface == if_ctl &&
+			    ad->bInterfaceCount > 1)
+				if_data = if_ctl + 1;
+			continue;
+		}
 		if (desc->bDescriptorType != UDESC_CS_INTERFACE) {

to the NetBSD 9.0 sources and rebuild the kernel. After reboot and
switching to the USB composition with the RNDIS interface:

[    88.189468] urndis0 at uhub4 port 6 configuration 1 interface 0
[    88.189468] urndis0: Alcatel (0x1bbb) MobileBroadBand (0x195), rev 2.01/2.28, addr 2
[    88.209470] urndis0: Ethernet address a6:27:cc:ab:d9:ae
[    88.209470] umass0 at uhub4 port 6 configuration 1 interface 2
[    88.209470] umass0: Alcatel (0x1bbb) MobileBroadBand (0x195), rev 2.01/2.28, addr 2
[    88.209470] umass0: using SCSI over Bulk-Only
[    88.209470] scsibus0 at umass0: 2 targets, 1 lun per target
[    88.209470] sd0 at scsibus0 target 0 lun 0: <ONETOUCH, ESTORIL, 2.31> disk removable
[    88.209470] sd0: drive offline



Home | Main Index | Thread Index | Old Index