[PATCH] usb: rndis_host: error during probe

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

 



Problem description:
-------------------------
Harris radios that use the rndis_host driver do not work with Linux kernels from version 3.16 to 4.11. They give the following timeout errors in dmesg.

[  426.016082] usbcore: registered new interface driver cdc_ether [  472.169327] rndis_host 2-1.2:1.0: RNDIS init failed, -110 [  472.169371] rndis_host: probe of 2-1.2:1.0 failed with error -110 [  472.169427] usbcore: registered new interface driver rndis_host [  482.383927] rndis_wlan 2-1.2:1.0: RNDIS init failed, -110 [  482.384068] rndis_wlan: probe of 2-1.2:1.0 failed with error -110 [  482.384121] usbcore: registered new interface driver rndis_wlan

Result of investigation:
----------------------------
git bisect shows that the problem started with this commit

commit b527caee1b91946db844b1dc63d4f726958891c8
Merge: c98158e d92f5de
Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date:   Wed Jul 30 08:54:17 2014 -0700

    Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
    
    Pull networking fixes from David Miller:
     5) cdc-ether devices can come up with entries in their address filter,
        so explicitly clear the filter after the device initializes.  From
        Oliver Neukum.

This commit introduced using the USB_CDC_SET_ETHERNET_PACKET_FILTER message to set the packet filter on an attached CDC Ethernet device. The rndis_host driver relies on the cdc_ether driver and so this message also gets sent during an RNDIS device probe. As far as I can tell, USB_CDC_SET_ETHERNET_PACKET_FILTER is not part of the Microsoft RNDIS specification and it certainly causes problems with Harris radios as they return an EPIPE error which then results in the timeout errors seen in the dmesg output above.

The following patch fixes the problem.

Signed-off-by: Keith Ridgway <kridgway@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Cc: GregKH@xxxxxxxxxxxxxxxxxxx

Regards,
Keith Ridgway


--
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index f3ae88fdf332..87c7ff190c29 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -315,8 +315,10 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
 	 * don't do reset all the way. So the packet filter should
 	 * be set to a sane initial value.
 	 */
-	usbnet_cdc_update_filter(dev);
-
+	if (!rndis) {
+		usbnet_cdc_update_filter(dev);
+	}
+	
 	return 0;
 
 bad_desc:
--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux