summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/r8152.c
diff options
context:
space:
mode:
authorhayeswang <hayeswang@realtek.com>2015-02-06 11:30:46 +0800
committerDavid S. Miller <davem@davemloft.net>2015-02-07 22:46:24 -0800
commit34203e25cb04ca942e29907b602c4f3d40e3c8ec (patch)
tree0d6121b35500146307f225491c01d56836d1e0d3 /drivers/net/usb/r8152.c
parente1a2ca92727500ea8d25326216d700bed6176117 (diff)
downloadtalos-op-linux-34203e25cb04ca942e29907b602c4f3d40e3c8ec.tar.gz
talos-op-linux-34203e25cb04ca942e29907b602c4f3d40e3c8ec.zip
r8152: adjust lpm timer
Set LPM timer to 500us, except for RTL_VER_04 which doesn't link at USB 3.0. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/r8152.c')
-rw-r--r--drivers/net/usb/r8152.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 41a1cbc6cc7f..ff122fae6586 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3256,10 +3256,10 @@ static void r8153_init(struct r8152 *tp)
ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_LPM_CTRL);
ocp_data &= ~LPM_TIMER_MASK;
- if (tp->udev->speed == USB_SPEED_SUPER)
- ocp_data |= LPM_TIMER_500US;
- else
+ if (tp->version == RTL_VER_04 && tp->udev->speed != USB_SPEED_SUPER)
ocp_data |= LPM_TIMER_500MS;
+ else
+ ocp_data |= LPM_TIMER_500US;
ocp_write_byte(tp, MCU_TYPE_USB, USB_LPM_CTRL, ocp_data);
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2);
OpenPOWER on IntegriCloud