diff options
author | hayeswang <hayeswang@realtek.com> | 2014-03-04 20:47:48 +0800 |
---|---|---|
committer | Seema Khowala <seemaj@nvidia.com> | 2014-04-23 14:07:40 -0700 |
commit | d29f7f57a2158d98fb77e15e29447d322e571e30 (patch) | |
tree | caed4169e2d555bd2f0309fb56fd67256fe991c9 /drivers/net | |
parent | db7e3b57752280229953ee93b74a6c9fae2a3cfb (diff) |
r8152: disable the ECM mode
There are known issues for switching the drivers between ECM mode and
vendor mode. The interrup transfer may become abnormal. The hardware
may have the opportunity to die if you change the configuration without
unloading the current driver first, because all the control transfers
of the current driver would fail after the command of switching the
configuration.
Although to use the ecm driver and vendor driver independently is fine,
it may have problems to change the driver from one to the other by
switching the configuration. Additionally, now the vendor mode driver
is more powerful than the ECM driver. Thus, disable the ECM mode driver,
and let r8152 to set the configuration to vendor mode and reset the
device automatically.
Change-Id: I2ba697b2afe83ca6e220007af0ceaa6b83e281f4
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/390288
(cherry picked from commit f212e29aefa37cbad3e851733410cc8accb1f65c)
Reviewed-on: http://git-master/r/396903
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Tested-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 11 | ||||
-rw-r--r-- | drivers/net/usb/r8152.c | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index e96dd0afd7c6..e5713356ad23 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c @@ -693,8 +693,15 @@ static const struct usb_device_id products [] = { USB_DEVICE(0x19D2,0x1554), .driver_info = (unsigned long)&rmnet_info, }, -/* - * WHITELIST!!! + +/* Samsung USB Ethernet Adapters */ +{ + USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, 0xa101, USB_CLASS_COMM, + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), + .driver_info = 0, +}, + +/* WHITELIST!!! * * CDC Ether uses two interfaces, not necessarily consecutive. * We match the main interface, ignoring the optional device diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index ceff332b4b00..491b44fb27c0 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3373,6 +3373,7 @@ static int rtl8152_probe(struct usb_interface *intf, return -ENODEV; } + usb_reset_device(udev); netdev = alloc_etherdev(sizeof(struct r8152)); if (!netdev) { dev_err(&intf->dev, "Out of memory\n"); |