[PATCH net-next 2/2] r8169:Update the way of reading RTL8168H PHY register "rg_saw_cnt"

2015-12-24 Thread Chunhao Lin
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 <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH net-next 0/2] r8169:Update RTL8168H PHY parameters

2015-12-24 Thread Chunhao Lin
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 ++-

[PATCH net-next 1/2] r8169:Fix typo in setting RTL8168H PHY parameter

2015-12-24 Thread Chunhao Lin
In function "rtl8168h_2_hw_phy_config", there is a typo in setting RTL8168H PHY parameter. Signed-off-by: Chunhao Lin <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8

[PATCH net-next 2/3] r8169:Fix typo in setting RTL8168H PHY PFM mode.

2015-12-29 Thread Chunhao Lin
The PHY PFM register is in PHY page 0x0a44 register 0x11, not 0x14. Signed-off-by: Chunhao Lin <h...@realtek.com> --- 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/r

[PATCH net-next 3/3] r8169:Correct the way of setting RTL8168DP ephy

2015-12-29 Thread Chunhao Lin
The original way is wrong, it always writes ephy reg 0x03. Signed-off-by: Chunhao Lin <h...@realtek.com> --- 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/et

[PATCH net-next 0/3] Fix some typos in setting hardware parameter

2015-12-29 Thread Chunhao Lin
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

[PATCH net-next 1/3] r8169:Fix typo in setting RTL8168EP and RTL8168H D3cold PFM mode

2015-12-29 Thread Chunhao Lin
The register for setting D3code PFM mode is MISC_1, not DLLPR. Signed-off-by: Chunhao Lin <h...@realtek.com> --- 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/r

[PATCH net-next] r8169:fix system hange problem.

2016-02-04 Thread Chunhao Lin
There are typos in setting RTL8168H hardware parameters. If system install another version driver that may cuase system hang. Signed-off-by: Chunhao Lin <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH net v3] r8169:fix "rtl_counters_cond == 1 (loop: 1000, delay: 10)" log spam.

2016-02-23 Thread Chunhao Lin
and then 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-b

[PATCH net v4] r8169:fix "rtl_counters_cond == 1 (loop: 1000, delay: 10)" log spam.

2016-02-23 Thread Chunhao Lin
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-by: Chun

[PATCH net 2/3] r8169:eliminate error message in using ethtool -S when nic is down.

2016-02-26 Thread Chunhao Lin
ing driver runtime pm state. If driver is in runtime suspend state, I will skip dump tall counter. Signed-off-by: Chunhao Lin <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8

[PATCH net 3/3] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_41~48

2016-02-26 Thread Chunhao Lin
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 <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c

[PATCH net 1/3] r8169:fix nic sometimes doesn't work after changing the mac address.

2016-02-26 Thread Chunhao Lin
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 <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 10 +- 1 file chan

[PATCH net 0/3] r8169:issues fix.

2016-02-26 Thread Chunhao Lin
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/ethernet

[PATCH net v2] r8169:fix "rtl_counters_cond == 1 (loop: 1000, delay: 10)" log spam.

2016-02-22 Thread Chunhao Lin
and then 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-by: C

[PATCH net] r8169:fix "rtl_counters_cond == 1 (loop: 1000, delay: 10)" log spam.

2016-02-18 Thread Chunhao Lin
and then 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 <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 10 -- 1

[PATCH net v2] r8169:Remove unnecessary phy reset for pcie nic when setting link spped.

2016-03-10 Thread Chunhao Lin
://bugs.launchpad.net/ubuntu/+source/linux/+bug/1547151 Signed-off-by: Chunhao Lin <h...@realtek.com> --- 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..9

[PATCH net] r8169:Remove unnecessary phy reset for pcie nic when setting link spped.

2016-03-08 Thread Chunhao Lin
://bugs.launchpad.net/ubuntu/+source/linux/+bug/1547151 Signed-off-by: Chunhao Lin <h...@realtek.com> --- 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..9

[PATCH net v2] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_41~48

2016-03-02 Thread Chunhao Lin
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 <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c

[PATCH net 0/3] r8169:fix 3 runtime pm related issues.

2016-07-27 Thread Chunhao Lin
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 the mac

[PATCH net 3/3] r8169:fix nic may not work after changing the mac address.

2016-07-27 Thread Chunhao Lin
. In this 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 <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 9 -

[PATCH net 2/3] r8169:add checking driver's runtime pm status in rtl8169_get_ethtool_stats()

2016-07-27 Thread Chunhao Lin
Not to call rtl8169_update_counters() to dump tally counter when driver is in runtime suspend state. Signed-off-by: Chunhao Lin <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/r

[PATCH net 1/3] r8169:fix kernel log spam when set or get hardware wol setting.

2016-07-27 Thread Chunhao Lin
. 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-by: Chun

[PATCH net] 8139too:fix system hang when there is a tx timeout event.

2016-07-27 Thread Chunhao Lin
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

[PATCH net v2 0/3] r8169:fix 3 runtime pm related issues.

2016-07-29 Thread Chunhao Lin
v2: use "struct device *d = >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 setting. r8169:

[PATCH net v2 1/3] r8169:fix kernel log spam when set or get hardware wol setting.

2016-07-29 Thread Chunhao Lin
. 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-by: Chun

[PATCH net v2 2/3] r8169:add checking driver's runtime pm status in rtl8169_get_ethtool_stats()

2016-07-29 Thread Chunhao Lin
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 <h..

[PATCH net v2 3/3] r8169:fix nic may not work after changing mac address.

2016-07-29 Thread Chunhao Lin
. In this 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 <h...@realtek.com> --- drivers/net/ethernet/realtek/r

[PATCH net v2] 8139too: fix system hang when there is a tx timeout event.

2016-07-31 Thread Chunhao Lin
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

[PATCH net] r8169: fix RTL8168EP take too long to complete driver initialization.

2018-01-30 Thread 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 <h...@realtek.com> --- drivers/net/ethernet/realtek/r8169.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH net-next] r8169: add module param for control of ASPM disable

2018-02-01 Thread Chunhao Lin
value is to enable ASPM again as its 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 <h...@realtek.com> --- drivers/net/ethernet/realtek/

[RESEND PATCH net-next] r8169: add module param for control of ASPM disable.

2018-02-14 Thread Chunhao Lin
value is to enable ASPM again as its 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 <h...@realtek.com> --- drivers/net/ethernet/realtek/