]> git.baikalelectronics.ru Git - kernel.git/commit
r8152: restore hw settings
authorhayeswang <hayeswang@realtek.com>
Thu, 12 Feb 2015 08:20:46 +0000 (16:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Feb 2015 04:15:45 +0000 (20:15 -0800)
commitfbfffd5ed2718f19e3326b40199d85b6d4b71d3a
treee278fc0d6b8439f02c71c1d325de115d4d828f61
parent631a66e6c9e9df1803553f700b62c78f80d92cad
r8152: restore hw settings

There is a capability which let the hw could change the settings
automatically when the power change to ON. However, the USB reset
would reset the settings to the hw default, so the driver has to
restore the relative settings. Otherwise, it would influence the
functions of the hw, and the compatibility for the USB hub and
USB host controller.

The relative settings are as following.
 - set the power down scale to 96.
 - enable the power saving function of USB 2.0.
 - disable the ALDPS of ECM mode.
 - set burst mode depending on the burst size.
 - enable the flow control of endpoint full.
 - set fifo empty boundary to 32448 bytes.
 - enable the function of exiting LPM when Rx OK occurs.
 - set the connect timer to 1.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c