Skip to content

Commit aa475d9

Browse files
hayesorzdavem330
authored andcommitted
r8152: disable DelayPhyPwrChg
When enabling this, the device would wait an internal signal which wouldn't be triggered. Then, the device couldn't enter P3 mode, so the power consumption is increased. Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1981316 commit aa475d9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/net/usb/r8152.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define NETNEXT_VERSION "11"
3232

3333
/* Information for net */
34-
#define NET_VERSION "10"
34+
#define NET_VERSION "11"
3535

3636
#define DRIVER_VERSION "v1." NETNEXT_VERSION "." NET_VERSION
3737
#define DRIVER_AUTHOR "Realtek linux nic maintainers <[email protected]>"
@@ -109,6 +109,7 @@
109109
#define PLA_BP_EN 0xfc38
110110

111111
#define USB_USB2PHY 0xb41e
112+
#define USB_SSPHYLINK1 0xb426
112113
#define USB_SSPHYLINK2 0xb428
113114
#define USB_U2P3_CTRL 0xb460
114115
#define USB_CSR_DUMMY1 0xb464
@@ -384,6 +385,9 @@
384385
#define USB2PHY_SUSPEND 0x0001
385386
#define USB2PHY_L1 0x0002
386387

388+
/* USB_SSPHYLINK1 */
389+
#define DELAY_PHY_PWR_CHG BIT(1)
390+
387391
/* USB_SSPHYLINK2 */
388392
#define pwd_dn_scale_mask 0x3ffe
389393
#define pwd_dn_scale(x) ((x) << 1)
@@ -4994,6 +4998,10 @@ static void rtl8153_up(struct r8152 *tp)
49944998
ocp_data &= ~LANWAKE_PIN;
49954999
ocp_write_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG, ocp_data);
49965000

5001+
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_SSPHYLINK1);
5002+
ocp_data &= ~DELAY_PHY_PWR_CHG;
5003+
ocp_write_word(tp, MCU_TYPE_USB, USB_SSPHYLINK1, ocp_data);
5004+
49975005
r8153_aldps_en(tp, true);
49985006

49995007
switch (tp->version) {

0 commit comments

Comments
 (0)