aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-07-30 16:25:49 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-30 16:25:49 -0400
commitf139c74a8df071217dcd63f3ef06ae7be7071c4d (patch)
tree5711f695577a18a06dbcd0101956e97b388ffa1a /drivers/net/usb
parentbd695a5f0ccf7b38982c426d86055ff3591c9b5b (diff)
parent26bcd8b72563b4c54892c4c2a409f6656fb8ae8b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/cdc_ether.c16
-rw-r--r--drivers/net/usb/r8152.c7
2 files changed, 19 insertions, 4 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:
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index e1e430587868..87f710476217 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -287,7 +287,7 @@
287/* USB_DEV_STAT */ 287/* USB_DEV_STAT */
288#define STAT_SPEED_MASK 0x0006 288#define STAT_SPEED_MASK 0x0006
289#define STAT_SPEED_HIGH 0x0000 289#define STAT_SPEED_HIGH 0x0000
290#define STAT_SPEED_FULL 0x0001 290#define STAT_SPEED_FULL 0x0002
291 291
292/* USB_TX_AGG */ 292/* USB_TX_AGG */
293#define TX_AGG_MAX_THRESHOLD 0x03 293#define TX_AGG_MAX_THRESHOLD 0x03
@@ -2300,9 +2300,8 @@ static void r8152b_exit_oob(struct r8152 *tp)
2300 /* rx share fifo credit full threshold */ 2300 /* rx share fifo credit full threshold */
2301 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_NORMAL); 2301 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_NORMAL);
2302 2302
2303 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_DEV_STAT); 2303 if (tp->udev->speed == USB_SPEED_FULL ||
2304 ocp_data &= STAT_SPEED_MASK; 2304 tp->udev->speed == USB_SPEED_LOW) {
2305 if (ocp_data == STAT_SPEED_FULL) {
2306 /* rx share fifo credit near full threshold */ 2305 /* rx share fifo credit near full threshold */
2307 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, 2306 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1,
2308 RXFIFO_THR2_FULL); 2307 RXFIFO_THR2_FULL);