mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
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>
This commit is contained in:
parent
20fbe3ae99
commit
c472ab68ad
1 changed files with 16 additions and 0 deletions
|
@ -341,6 +341,22 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
|
|||
usb_driver_release_interface(driver, info->data);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Some devices don't initialise properly. In particular
|
||||
* the packet filter is not reset. There are devices that
|
||||
* don't do reset all the way. So the packet filter should
|
||||
* be set to a sane initial value.
|
||||
*/
|
||||
usb_control_msg(dev->udev,
|
||||
usb_sndctrlpipe(dev->udev, 0),
|
||||
USB_CDC_SET_ETHERNET_PACKET_FILTER,
|
||||
USB_TYPE_CLASS | USB_RECIP_INTERFACE,
|
||||
USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED | USB_CDC_PACKET_TYPE_BROADCAST,
|
||||
intf->cur_altsetting->desc.bInterfaceNumber,
|
||||
NULL,
|
||||
0,
|
||||
USB_CTRL_SET_TIMEOUT
|
||||
);
|
||||
return 0;
|
||||
|
||||
bad_desc:
|
||||
|
|
Loading…
Reference in a new issue