will let driver thinking register flag is not toggled and then prints
the warning message "rtl_counters_cond == 1 (loop: 1000, delay: 10)" to kernel
log.
For fixing this issue, add checking driver's pm runtime status in
rtl8169_get_wol() and rtl8169_set_wol().
Signed-off-
patch I add detecting runtime pm status when setting mac address.
If driver is in runtime suspend state, it will skip setting mac address and
set the new mac address during runtime resume.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 9 -
1 file changed, 8 insertions
This series of patches fix 3 runtime pm related issues that are listed below.
Chunhao Lin (3):
r8169:fix kernel log spam when set or get hardware wol setting.
r8169:add checking driver's runtime pm status in rtl8169_get_ethtool_stats()
r8169:fix nic may not work after changing th
Not to call rtl8169_update_counters() to dump tally counter when driver is in
runtime suspend state.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net
If tx timeout event occur, kernel will call rtl8139_tx_timeout_task() to reset
hardware. But in this function, driver does not stop tx and rx function before
reset hardware, that will cause system hang.
In this patch, add stop tx and rx function before reset hardware.
Signed-off-by: Chunhao Lin
v2:
use "struct device *d = &tp->pci_dev->dev" instead of "struct pci_dev *pdev =
tp->pci_dev"
v1:
This series of patches fix 3 runtime pm related issues that are listed below.
Chunhao Lin (3):
r8169:fix kernel log spam when set or get hardware wol setti
. That will let driver thinking register flag is not toggled and
then prints the warning message "rtl_counters_cond == 1 (loop: 1000,
delay: 10)" to kernel log.
For fixing this issue, add checking driver's pm runtime status in
rtl8169_get_wol() and rtl8169_set_wol().
Signed-off-
patch I add detecting runtime pm status when setting mac address.
If driver is in runtime suspend state, it will skip setting mac address, keep
the new mac address, and set the new mac address during runtime resume.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 9 -
1
Not to call rtl8169_update_counters() to dump tally counter when driver
is in runtime suspend state.
Calling rtl8169_update_counters() in runtime suspend state will produce
warning message "rtl_counters_cond == 1 (loop: 1000, delay: 10)".
Signed-off-by: Chunhao Lin
---
drivers/ne
If tx timeout event occur, kernel will call rtl8139_tx_timeout_task() to reset
hardware. But in this function, driver does not stop tx and rx function before
reset hardware, that will cause system hang.
In this patch, add stop tx and rx function before reset hardware.
Signed-off-by: Chunhao Lin
Driver check the wrong register bit in rtl_ocp_tx_cond() that keep driver
waiting until timeout.
Fix this by waiting for the right register bit.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
provides signficant (200mW) power
savings on the platform I tested.
I make some modification that let this patch only for RTL8168G and later.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 73
1 file changed, 50 insertions
Update rtl8411b ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index 10aa0b1
Update rtl8105e ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index 42eda35
Update hardware ephy parameter to improve pcie compatibility.
These series of patch include the ephy update of following adapters.
rtl8168g
rtl8168gu
rtl8411b
rtl8411
rtl8168fb
rtl8168e-vl
rtl8168dp
rtl8105
rtl8402
Chunhao Lin (9):
r8169:update rtl8168g ephy parameter
r8169:update rtl8168gu
Update rtl8402 ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index 56bcd96
Update rtl8168e-vl ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index 2ff8b73
Update rtl8168dp ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 39
1 file changed, 8 insertions(+), 31 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net
Update rtl8168gu ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index
Update rtl8411 ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index 9c946df
Update rtl8168g ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 24 +---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek
Update rtl8168fb ephy parameter to improve pcie compatibility.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 28 ++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet
CIe L0 from PCIe L0s low power mode too slow.
The following ephy parameter is for above issue.
{ 0x19, 0x8000, 0x0000 }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 24 +---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/drivers/n
rtl8411 may return to PCIe L0 from PCIe L0s low power mode too slow.
The following ephy parameters are for this issue.
{ 0x00, 0x, 0x0008 }
{ 0x0c, 0x3df0, 0x0200 }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 8 +---
1 file changed, 5 insertions(+), 3
For RTL8168DP, its jumbo frame patch is the same as RTL8168DP. So use RTL8168C
jumbo frame patch instead and reomve function "r8168dp_hw_jumbo_enable" and
"r8168dp_hw_jumbo_disable".
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 28 ++--
rtl8168evl may return to PCIe L0 from PCIe L0s low power mode too slow.
The following ephy parameters are for this issue.
{ 0x0c, 0x0100, 0x0020 }
{ 0x10, 0x0004, 0x }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
RTL_GIGA_MAC_VER_31 is RTL8168DP and it use the same ephy parameter as
RTL_GIGA_MAC_VER_28. So I use function rtl_hw_start_8168d_4 to set
RTL_GIGA_MAC_VER_31 ephy parameter and remove unnecessary function
rtl_hw_start_8168dp.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c
Remove following unnecessary ephy parameter.
{ 0x1e, 0, 0x4000 }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index ce98d2a
rtl8168f may return to PCIe L0 from PCIe L0s low power mode too slow.
The following ephy parameters are for this issue.
{ 0x00, 0x, 0x0008 }
{ 0x0c, 0x3df0, 0x0200 }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
RTL8168F rev.B does not have to set following two ephy parameters.
{ 0x06, 0x00c0, 0x0020 }
{ 0x08, 0x0001, 0x0002 }
Add function rtl_hw_start_8168f_2 to set RTL8168F rev.B ephy parameters,
instead of using function rtl_hw_start_8168f_1.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet
rtl8105e may return to PCIe L0 from PCIe L0s low power mode too slow.
The following ephy parameters are for this issue.
{ 0x05, 0, 0x2000 }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net
For RTL8168E and RTL8168EVL, these two chips do not need to change pcie max
read request size when jumbo frame is enabled.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net
Add following ephy parameter. This parameter will save more power when
in ASPM mode.
{ 0x10, 0x0004, 0x }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers
The original way is wrong. I correct it in this patch.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index
set rtl8168f rev.b ephy paramerers.
Chunhao Lin (11):
r8169:change rtl8168dp jumbo frame patch
r8169:update rtl8168e and rtl8168evl jumbo frame patch
r8169:change the way of setting rtl8168dp ephy parameters.
r8169:update rtl8168dp pcie ephy parameter
r8169:remove function
Remove following unnecessary ephy parameter.
{ 0x1e, 0, 0x4000 }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index 483fa40
RTL8168DP jumbo frame patch is the same as RTL8168C. So, for RTL8168DP,
change to use RTL8168C jumbo frame patch. Also reomve uncessary function
"r8168dp_hw_jumbo_enable" and "r8168dp_hw_jumbo_disable".
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/
L0.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index ade7144..483fa40 100644
--- a/drivers/net/ethernet
RTL8168F rev.B does not have to set following two ephy parameters.
{ 0x06, 0x00c0, 0x0020 }
{ 0x08, 0x0001, 0x0002 }
Add function rtl_hw_start_8168f_2 to set RTL8168F rev.B ephy parameters,
instead of using function rtl_hw_start_8168f_1.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet
function
rtl_hw_start_8168f_2 to set rtl8168f rev.b pcie ephy parameters.
In v2 patch, give more explanation about pcie ephy parameter update.
Chunhao Lin (8):
r8169:change rtl8168dp jumbo frame patch
r8169:update rtl8168e and rtl8168evl jumbo frame patch
r8169:correct the way of setting rtl8168dp
RTL8168E and RTL8168EVL do not need to change pcie max read request size
when jumbo frame is enabled. So remove setting pcie max read request
size from their jumbo frame patch.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 2 --
1 file changed, 2 deletions(-)
diff
The following parameter will disable more pcie ephy block (like pcie ephy
read/write clock.etc ) to save more power when in aspm+clkreq mode.
{ 0x10, 0x0004, 0x }
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion
Thease two chips should use the same pcie ephy parameters. So only need
function rtl_hw_start_8168d_4. Function rtl_hw_start_8168dp is uncessary.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 20 +---
1 file changed, 1 insertion(+), 19 deletions(-)
diff
The original way is wrong, it always sets the ephy reg 0x03. Correct it
in this patch.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net
sends the warning message "rtl_counters_cond == 1 (loop: 1000,
delay: 10)" to kernel log.
I add checking driver's pm runtime status in rtl8169_get_stats64() to fix
this issue.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 10 --
1 file changed, 8 i
sends the warning message "rtl_counters_cond == 1 (loop: 1000,
delay: 10)" to kernel log.
For fixing this issue,
1.add checking driver's pm runtime status in rtl8169_get_stats64().
2.dump tally counter before going runtime suspend for counter accuracy in
runtime suspend.
Signed-
the warning message "rtl_counters_cond
== 1 (loop: 1000, delay: 10)" to kernel log.
For fixing this issue, 1.add checking driver's pm runtime status in
rtl8169_get_stats64(). 2.dump tally counter before going runtime suspend
for counter accuracy in runtime suspend.
Signed-off-
For RTL8168G/RTL8168H/RTL8411B/RTL8107E, enable this flag to eliminate message
"AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0002
address=0x3000 flags=0x0050] in dmesg.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 4
1 file chang
This series of patches fix 3 issues that are listed below.
Chunhao Lin (3):
r8169:fix nic sometimes doesn't work after changing the mac address.
r8169:eliminate error message in using ethtool -S when nic is down.
r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_41~48
drivers/net/eth
ing driver runtime pm state. If driver is in runtime
suspend state, I will skip dump tall counter.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/ne
tch I add detecting runtime pm state when setting mac address. If
driver is in runtime suspend, I will skip setting mac address and set the new
mac address during runtime resume.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 10 +-
1 file changed, 9 insertions(
This patch series contains two hardware setting modification to prevent
hardware become abnormal.
Chunhao Lin (2):
r8169:prevent enable hardware tx/rx too early
r8169:disable rtl8168ep cmac engine
drivers/net/ethernet/realtek/r8169.c | 33 ++---
1 file changed
For RTL8168G/GU/H/EP and RTL8411B remove enable tx/rx from its own hw_start
function. This will prevent enable tx/rx before complete hardware tx/rx
setting.
Tx/Rx will be enabled in the end of function rtl_hw_start_8168.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3
Cmac engine is the bridge between driver and dash firmware.
Other os may not disable cmac when leave. And r8169 did not allocate any
resources for cmac engine. Disable it to prevent abnormal system behavior.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 30
://bugs.launchpad.net/ubuntu/+source/linux/+bug/1547151
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index dd2cf37..94f08f1 100644
--- a/drivers
://bugs.launchpad.net/ubuntu/+source/linux/+bug/1547151
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index dd2cf37..94f08f1 100644
--- a
sends the warning message "rtl_counters_cond == 1 (loop: 1000,
delay: 10)" to kernel log.
For fixing this issue,
1.add checking driver's pm runtime status in rtl8169_get_stats64().
2.dump tally counter before going runtime suspend for counter accuracy in
runtime suspend.
Signed-off-
For RTL8168G/RTL8168H/RTL8411B/RTL8107E, enable this flag to eliminate
message "AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0002
address=0x3000 flags=0x0050] in dmesg.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 4
1 file chang
In function "rtl8168h_2_hw_phy_config", there is a typo in setting
RTL8168H PHY parameter.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethern
The vlaue of RTL8168H PHY register "rg_saw_cnt" only valid from bit0 to bit13.
When read this register, add bitwise-anding its value with 0x3fff.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
Fix typo in setting PHY parameter and update the way of reading PHY register
"rg_saw_cnt".
Chunhao Lin (2):
r8169:Fix typo in setting RTL8168H PHY parameter
r8169:Update the way of reading RTL8168H PHY register "rg_saw_cnt"
drivers/net/ethernet/realtek/r8169.c | 4 ++-
The original way is wrong, it always writes ephy reg 0x03.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
The register for setting D3code PFM mode is MISC_1, not DLLPR.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index
The typos are in setting RTL8168DP, RTL8168EP and RTL8168H hardware parameters.
This series of patch fix these typos.
Chunhao Lin (3):
r8169:Fix typo in setting RTL8168EP and RTL8168H D3cold PFM mode
r8169:Fix typo in setting RTL8168H PHY PFM mode.
r8169:Correct the way of setting RTL8168DP
The PHY PFM register is in PHY page 0x0a44 register 0x11, not 0x14.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index
There are typos in setting RTL8168H hardware parameters. If system install
another version driver that may cuase system hang.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net
provides signficant (200mW) power
savings on the platform I tested.
I make some modification that let this patch only for RTL8168G and later.
Signed-off-by: Chunhao Lin
---
drivers/net/ethernet/realtek/r8169.c | 73
1 file changed, 50 insertions
67 matches
Mail list logo