aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2014-07-28 04:56:36 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-29 15:22:15 -0400
commitc472ab68ad67db23c9907a27649b7dc0899b61f9 (patch)
tree862b12f48c1457d0eca5f147e2546ac36a7f412f /drivers/net/usb
parent20fbe3ae990fd54fc7d1f889d61958bc8b38f254 (diff)
cdc-ether: clean packet filter upon probe
There are devices that don't do reset all the way. So the packet filter should be set to a sane initial value. Failure to do so leads to intermittent failures of DHCP on some systems under some conditions. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/cdc_ether.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 9ea4bfe5d318..2a32d9167d3b 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -341,6 +341,22 @@ next_desc:
341 usb_driver_release_interface(driver, info->data); 341 usb_driver_release_interface(driver, info->data);
342 return -ENODEV; 342 return -ENODEV;
343 } 343 }
344
345 /* Some devices don't initialise properly. In particular
346 * the packet filter is not reset. There are devices that
347 * don't do reset all the way. So the packet filter should
348 * be set to a sane initial value.
349 */
350 usb_control_msg(dev->udev,
351 usb_sndctrlpipe(dev->udev, 0),
352 USB_CDC_SET_ETHERNET_PACKET_FILTER,
353 USB_TYPE_CLASS | USB_RECIP_INTERFACE,
354 USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED | USB_CDC_PACKET_TYPE_BROADCAST,
355 intf->cur_altsetting->desc.bInterfaceNumber,
356 NULL,
357 0,
358 USB_CTRL_SET_TIMEOUT
359 );
344 return 0; 360 return 0;
345 361
346bad_desc: 362bad_desc: