* [PATCH net-next 00/11]r8169:update hardware parameter
@ 2015-01-07 16:40 Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 01/11] r8169:change rtl8168dp jumbo frame patch Chunhao Lin
` (10 more replies)
0 siblings, 11 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
These series of patch include the ephy update of following adapters.
rtl8411
rtl8168f
rtl8168evl
rtl8168dp
rtl8105
rtl8402
Jumbo frame patch update of following adapters.
rtl8168dp
rtl8168e
rtl8168evl
Also remove unnecessary function rtl_hw_start_8168dp. And add function
rtl_hw_start_8168f_2 to 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 rtl_hw_start_8168dp
r8169:update rtl8168evl pcie ephy parameter
r8169:update rtl8168f pcie ephy parameter
r8169:update rtl8411 pcie ephy parameter
r8169:update rtl8105e pcie ephy parameter
r8169:update rtl8402 pcie ephy parameter
r8169:update rtl8168f rev.b pcie ephy parameter
drivers/net/ethernet/realtek/r8169.c | 112 +++++++++++++++--------------------
1 file changed, 49 insertions(+), 63 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH net-next 01/11] r8169:change rtl8168dp jumbo frame patch
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 02/11] r8169:update rtl8168e and rtl8168evl " Chunhao Lin
` (9 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
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 <hau@realtek.com>
---
drivers/net/ethernet/realtek/r8169.c | 28 ++++++----------------------
1 file changed, 6 insertions(+), 22 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 14a1c5c..2f97476 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -4927,20 +4927,6 @@ static void r8168c_hw_jumbo_disable(struct rtl8169_private *tp)
rtl_tx_performance_tweak(tp->pci_dev, 0x5 << MAX_READ_REQUEST_SHIFT);
}
-static void r8168dp_hw_jumbo_enable(struct rtl8169_private *tp)
-{
- void __iomem *ioaddr = tp->mmio_addr;
-
- RTL_W8(Config3, RTL_R8(Config3) | Jumbo_En0);
-}
-
-static void r8168dp_hw_jumbo_disable(struct rtl8169_private *tp)
-{
- void __iomem *ioaddr = tp->mmio_addr;
-
- RTL_W8(Config3, RTL_R8(Config3) & ~Jumbo_En0);
-}
-
static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp)
{
void __iomem *ioaddr = tp->mmio_addr;
@@ -5014,16 +5000,13 @@ static void rtl_init_jumbo_ops(struct rtl8169_private *tp)
case RTL_GIGA_MAC_VER_24:
case RTL_GIGA_MAC_VER_25:
case RTL_GIGA_MAC_VER_26:
- ops->disable = r8168c_hw_jumbo_disable;
- ops->enable = r8168c_hw_jumbo_enable;
- break;
case RTL_GIGA_MAC_VER_27:
case RTL_GIGA_MAC_VER_28:
- ops->disable = r8168dp_hw_jumbo_disable;
- ops->enable = r8168dp_hw_jumbo_enable;
+ case RTL_GIGA_MAC_VER_31:
+ ops->disable = r8168c_hw_jumbo_disable;
+ ops->enable = r8168c_hw_jumbo_enable;
break;
- case RTL_GIGA_MAC_VER_31: /* Wild guess. Needs info from Realtek. */
- case RTL_GIGA_MAC_VER_32:
+ case RTL_GIGA_MAC_VER_32: /* Wild guess. Needs info from Realtek. */
case RTL_GIGA_MAC_VER_33:
case RTL_GIGA_MAC_VER_34:
ops->disable = r8168e_hw_jumbo_disable;
@@ -5758,7 +5741,8 @@ static void rtl_hw_start_8168d_4(struct rtl8169_private *tp)
rtl_csi_access_enable_1(tp);
- rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);
+ if (tp->dev->mtu <= ETH_DATA_LEN)
+ rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);
RTL_W8(MaxTxPacketSize, TxPacketMax);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 02/11] r8169:update rtl8168e and rtl8168evl jumbo frame patch
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 01/11] r8169:change rtl8168dp jumbo frame patch Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 03/11] r8169:change the way of setting rtl8168dp ephy parameters Chunhao Lin
` (8 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
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 <hau@realtek.com>
---
drivers/net/ethernet/realtek/r8169.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 2f97476..5bfd0b9 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -4934,7 +4934,6 @@ static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp)
RTL_W8(MaxTxPacketSize, 0x3f);
RTL_W8(Config3, RTL_R8(Config3) | Jumbo_En0);
RTL_W8(Config4, RTL_R8(Config4) | 0x01);
- rtl_tx_performance_tweak(tp->pci_dev, 0x2 << MAX_READ_REQUEST_SHIFT);
}
static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp)
@@ -4944,7 +4943,6 @@ static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp)
RTL_W8(MaxTxPacketSize, 0x0c);
RTL_W8(Config3, RTL_R8(Config3) & ~Jumbo_En0);
RTL_W8(Config4, RTL_R8(Config4) & ~0x01);
- rtl_tx_performance_tweak(tp->pci_dev, 0x5 << MAX_READ_REQUEST_SHIFT);
}
static void r8168b_0_hw_jumbo_enable(struct rtl8169_private *tp)
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 03/11] r8169:change the way of setting rtl8168dp ephy parameters.
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 01/11] r8169:change rtl8168dp jumbo frame patch Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 02/11] r8169:update rtl8168e and rtl8168evl " Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 04/11] r8169:update rtl8168dp pcie ephy parameter Chunhao Lin
` (7 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
The original way is wrong. I correct it in this patch.
Signed-off-by: Chunhao Lin <hau@realtek.com>
---
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 5bfd0b9..0fc7e62 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5731,11 +5731,10 @@ static void rtl_hw_start_8168d_4(struct rtl8169_private *tp)
void __iomem *ioaddr = tp->mmio_addr;
struct pci_dev *pdev = tp->pci_dev;
static const struct ephy_info e_info_8168d_4[] = {
- { 0x0b, ~0, 0x48 },
- { 0x19, 0x20, 0x50 },
- { 0x0c, ~0, 0x20 }
+ { 0x0b, 0x0000, 0x0048 },
+ { 0x19, 0x0020, 0x0050 },
+ { 0x0c, 0x0100, 0x0020 }
};
- int i;
rtl_csi_access_enable_1(tp);
@@ -5744,13 +5743,7 @@ static void rtl_hw_start_8168d_4(struct rtl8169_private *tp)
RTL_W8(MaxTxPacketSize, TxPacketMax);
- for (i = 0; i < ARRAY_SIZE(e_info_8168d_4); i++) {
- const struct ephy_info *e = e_info_8168d_4 + i;
- u16 w;
-
- w = rtl_ephy_read(tp, e->offset);
- rtl_ephy_write(tp, 0x03, (w & e->mask) | e->bits);
- }
+ rtl_ephy_init(tp, e_info_8168d_4, ARRAY_SIZE(e_info_8168d_4));
rtl_enable_clock_request(pdev);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 04/11] r8169:update rtl8168dp pcie ephy parameter
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
` (2 preceding siblings ...)
2015-01-07 16:40 ` [PATCH net-next 03/11] r8169:change the way of setting rtl8168dp ephy parameters Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 05/11] r8169:remove function rtl_hw_start_8168dp Chunhao Lin
` (6 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
Add following ephy parameter. This parameter will save more power when
in ASPM mode.
{ 0x10, 0x0004, 0x0000 }
Signed-off-by: Chunhao Lin <hau@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 0fc7e62..15a0f5b 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5733,7 +5733,8 @@ static void rtl_hw_start_8168d_4(struct rtl8169_private *tp)
static const struct ephy_info e_info_8168d_4[] = {
{ 0x0b, 0x0000, 0x0048 },
{ 0x19, 0x0020, 0x0050 },
- { 0x0c, 0x0100, 0x0020 }
+ { 0x0c, 0x0100, 0x0020 },
+ { 0x10, 0x0004, 0x0000 }
};
rtl_csi_access_enable_1(tp);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 05/11] r8169:remove function rtl_hw_start_8168dp
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
` (3 preceding siblings ...)
2015-01-07 16:40 ` [PATCH net-next 04/11] r8169:update rtl8168dp pcie ephy parameter Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 06/11] r8169:update rtl8168evl pcie ephy parameter Chunhao Lin
` (5 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
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 <hau@realtek.com>
---
drivers/net/ethernet/realtek/r8169.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 15a0f5b..48d1f78 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5711,21 +5711,6 @@ static void rtl_hw_start_8168d(struct rtl8169_private *tp)
RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) & ~R8168_CPCMD_QUIRK_MASK);
}
-static void rtl_hw_start_8168dp(struct rtl8169_private *tp)
-{
- void __iomem *ioaddr = tp->mmio_addr;
- struct pci_dev *pdev = tp->pci_dev;
-
- rtl_csi_access_enable_1(tp);
-
- if (tp->dev->mtu <= ETH_DATA_LEN)
- rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);
-
- RTL_W8(MaxTxPacketSize, TxPacketMax);
-
- rtl_disable_clock_request(pdev);
-}
-
static void rtl_hw_start_8168d_4(struct rtl8169_private *tp)
{
void __iomem *ioaddr = tp->mmio_addr;
@@ -6272,11 +6257,8 @@ static void rtl_hw_start_8168(struct net_device *dev)
break;
case RTL_GIGA_MAC_VER_28:
- rtl_hw_start_8168d_4(tp);
- break;
-
case RTL_GIGA_MAC_VER_31:
- rtl_hw_start_8168dp(tp);
+ rtl_hw_start_8168d_4(tp);
break;
case RTL_GIGA_MAC_VER_32:
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 06/11] r8169:update rtl8168evl pcie ephy parameter
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
` (4 preceding siblings ...)
2015-01-07 16:40 ` [PATCH net-next 05/11] r8169:remove function rtl_hw_start_8168dp Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 07/11] r8169:update rtl8168f " Chunhao Lin
` (4 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
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, 0x0000 }
Signed-off-by: Chunhao Lin <hau@realtek.com>
---
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 48d1f78..1874583 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5778,7 +5778,9 @@ static void rtl_hw_start_8168e_2(struct rtl8169_private *tp)
struct pci_dev *pdev = tp->pci_dev;
static const struct ephy_info e_info_8168e_2[] = {
{ 0x09, 0x0000, 0x0080 },
- { 0x19, 0x0000, 0x0224 }
+ { 0x19, 0x0000, 0x0224 },
+ { 0x00, 0x0000, 0x0008 },
+ { 0x0c, 0x3df0, 0x0200 }
};
rtl_csi_access_enable_1(tp);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 07/11] r8169:update rtl8168f pcie ephy parameter
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
` (5 preceding siblings ...)
2015-01-07 16:40 ` [PATCH net-next 06/11] r8169:update rtl8168evl pcie ephy parameter Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:45 ` David Laight
2015-01-07 16:40 ` [PATCH net-next 08/11] r8169:update rtl8411 " Chunhao Lin
` (3 subsequent siblings)
10 siblings, 1 reply; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
rtl8168f may return to PCIe L0 from PCIe L0s low power mode too slow.
The following ephy parameters are for this issue.
{ 0x00, 0x0000, 0x0008 }
{ 0x0c, 0x3df0, 0x0200 }
Signed-off-by: Chunhao Lin <hau@realtek.com>
---
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 1874583..bafa132 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5852,7 +5852,9 @@ static void rtl_hw_start_8168f_1(struct rtl8169_private *tp)
{ 0x06, 0x00c0, 0x0020 },
{ 0x08, 0x0001, 0x0002 },
{ 0x09, 0x0000, 0x0080 },
- { 0x19, 0x0000, 0x0224 }
+ { 0x19, 0x0000, 0x0224 },
+ { 0x00, 0x0000, 0x0008 },
+ { 0x0c, 0x3df0, 0x0200 }
};
rtl_hw_start_8168f(tp);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 08/11] r8169:update rtl8411 pcie ephy parameter
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
` (6 preceding siblings ...)
2015-01-07 16:40 ` [PATCH net-next 07/11] r8169:update rtl8168f " Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 09/11] r8169:update rtl8105e " Chunhao Lin
` (2 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
rtl8411 may return to PCIe L0 from PCIe L0s low power mode too slow.
The following ephy parameters are for this issue.
{ 0x00, 0x0000, 0x0008 }
{ 0x0c, 0x3df0, 0x0200 }
Signed-off-by: Chunhao Lin <hau@realtek.com>
---
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 bafa132..e92eece 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5869,17 +5869,19 @@ static void rtl_hw_start_8168f_1(struct rtl8169_private *tp)
static void rtl_hw_start_8411(struct rtl8169_private *tp)
{
- static const struct ephy_info e_info_8168f_1[] = {
+ static const struct ephy_info e_info_8411[] = {
{ 0x06, 0x00c0, 0x0020 },
{ 0x0f, 0xffff, 0x5200 },
{ 0x1e, 0x0000, 0x4000 },
- { 0x19, 0x0000, 0x0224 }
+ { 0x19, 0x0000, 0x0224 },
+ { 0x00, 0x0000, 0x0008 },
+ { 0x0c, 0x3df0, 0x0200 }
};
rtl_hw_start_8168f(tp);
rtl_pcie_state_l2l3_enable(tp, false);
- rtl_ephy_init(tp, e_info_8168f_1, ARRAY_SIZE(e_info_8168f_1));
+ rtl_ephy_init(tp, e_info_8411, ARRAY_SIZE(e_info_8411));
rtl_w0w1_eri(tp, 0x0d4, ERIAR_MASK_0011, 0x0c00, 0x0000, ERIAR_EXGMAC);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 09/11] r8169:update rtl8105e pcie ephy parameter
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
` (7 preceding siblings ...)
2015-01-07 16:40 ` [PATCH net-next 08/11] r8169:update rtl8411 " Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 10/11] r8169:update rtl8402 " Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 11/11] r8169:update rtl8168f rev.b " Chunhao Lin
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
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 <hau@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 e92eece..ce98d2a 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6403,7 +6403,8 @@ static void rtl_hw_start_8105e_1(struct rtl8169_private *tp)
{ 0x03, 0, 0x0001 },
{ 0x19, 0, 0x0100 },
{ 0x19, 0, 0x0004 },
- { 0x0a, 0, 0x0020 }
+ { 0x0a, 0, 0x0020 },
+ { 0x05, 0, 0x2000 }
};
/* Force LAN exit from ASPM if Rx/Tx are not idle */
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 10/11] r8169:update rtl8402 pcie ephy parameter
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
` (8 preceding siblings ...)
2015-01-07 16:40 ` [PATCH net-next 09/11] r8169:update rtl8105e " Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 11/11] r8169:update rtl8168f rev.b " Chunhao Lin
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
Remove following unnecessary ephy parameter.
{ 0x1e, 0, 0x4000 }
Signed-off-by: Chunhao Lin <hau@realtek.com>
---
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..b8a097c 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6431,8 +6431,7 @@ static void rtl_hw_start_8402(struct rtl8169_private *tp)
{
void __iomem *ioaddr = tp->mmio_addr;
static const struct ephy_info e_info_8402[] = {
- { 0x19, 0xffff, 0xff64 },
- { 0x1e, 0, 0x4000 }
+ { 0x19, 0xffff, 0xff64 }
};
rtl_csi_access_enable_2(tp);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 11/11] r8169:update rtl8168f rev.b pcie ephy parameter
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
` (9 preceding siblings ...)
2015-01-07 16:40 ` [PATCH net-next 10/11] r8169:update rtl8402 " Chunhao Lin
@ 2015-01-07 16:40 ` Chunhao Lin
10 siblings, 0 replies; 15+ messages in thread
From: Chunhao Lin @ 2015-01-07 16:40 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, Chunhao Lin
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 <hau@realtek.com>
---
drivers/net/ethernet/realtek/r8169.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index b8a097c..d62f8d8 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5867,6 +5867,26 @@ static void rtl_hw_start_8168f_1(struct rtl8169_private *tp)
RTL_W8(EEE_LED, RTL_R8(EEE_LED) & ~0x07);
}
+static void rtl_hw_start_8168f_2(struct rtl8169_private *tp)
+{
+ void __iomem *ioaddr = tp->mmio_addr;
+ static const struct ephy_info e_info_8168f_2[] = {
+ { 0x09, 0x0000, 0x0080 },
+ { 0x19, 0x0000, 0x0224 },
+ { 0x00, 0x0000, 0x0008 },
+ { 0x0c, 0x3df0, 0x0200 }
+ };
+
+ rtl_hw_start_8168f(tp);
+
+ rtl_ephy_init(tp, e_info_8168f_2, ARRAY_SIZE(e_info_8168f_2));
+
+ rtl_w0w1_eri(tp, 0x0d4, ERIAR_MASK_0011, 0x0c00, 0xff00, ERIAR_EXGMAC);
+
+ /* Adjust EEE LED frequency */
+ RTL_W8(EEE_LED, RTL_R8(EEE_LED) & ~0x07);
+}
+
static void rtl_hw_start_8411(struct rtl8169_private *tp)
{
static const struct ephy_info e_info_8411[] = {
@@ -6276,9 +6296,11 @@ static void rtl_hw_start_8168(struct net_device *dev)
break;
case RTL_GIGA_MAC_VER_35:
- case RTL_GIGA_MAC_VER_36:
rtl_hw_start_8168f_1(tp);
break;
+ case RTL_GIGA_MAC_VER_36:
+ rtl_hw_start_8168f_2(tp);
+ break;
case RTL_GIGA_MAC_VER_38:
rtl_hw_start_8411(tp);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* RE: [PATCH net-next 07/11] r8169:update rtl8168f pcie ephy parameter
2015-01-07 16:40 ` [PATCH net-next 07/11] r8169:update rtl8168f " Chunhao Lin
@ 2015-01-07 16:45 ` David Laight
2015-01-09 4:08 ` David Miller
0 siblings, 1 reply; 15+ messages in thread
From: David Laight @ 2015-01-07 16:45 UTC (permalink / raw)
To: 'Chunhao Lin', netdev@vger.kernel.org
Cc: nic_swsd@realtek.com, linux-kernel@vger.kernel.org
From: Chunhao Lin
> rtl8168f may return to PCIe L0 from PCIe L0s low power mode too slow.
> The following ephy parameters are for this issue.
> { 0x00, 0x0000, 0x0008 }
> { 0x0c, 0x3df0, 0x0200 }
>
> Signed-off-by: Chunhao Lin <hau@realtek.com>
> ---
> 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 1874583..bafa132 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -5852,7 +5852,9 @@ static void rtl_hw_start_8168f_1(struct rtl8169_private *tp)
> { 0x06, 0x00c0, 0x0020 },
> { 0x08, 0x0001, 0x0002 },
> { 0x09, 0x0000, 0x0080 },
> - { 0x19, 0x0000, 0x0224 }
> + { 0x19, 0x0000, 0x0224 },
> + { 0x00, 0x0000, 0x0008 },
> + { 0x0c, 0x3df0, 0x0200 }
I can't help feeling these lines all require short comments.
David
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH net-next 07/11] r8169:update rtl8168f pcie ephy parameter
2015-01-07 16:45 ` David Laight
@ 2015-01-09 4:08 ` David Miller
2015-01-09 5:18 ` Hau
0 siblings, 1 reply; 15+ messages in thread
From: David Miller @ 2015-01-09 4:08 UTC (permalink / raw)
To: David.Laight; +Cc: hau, netdev, nic_swsd, linux-kernel
From: David Laight <David.Laight@ACULAB.COM>
Date: Wed, 7 Jan 2015 16:45:58 +0000
> From: Chunhao Lin
>> @@ -5852,7 +5852,9 @@ static void rtl_hw_start_8168f_1(struct rtl8169_private *tp)
>> { 0x06, 0x00c0, 0x0020 },
>> { 0x08, 0x0001, 0x0002 },
>> { 0x09, 0x0000, 0x0080 },
>> - { 0x19, 0x0000, 0x0224 }
>> + { 0x19, 0x0000, 0x0224 },
>> + { 0x00, 0x0000, 0x0008 },
>> + { 0x0c, 0x3df0, 0x0200 }
>
> I can't help feeling these lines all require short comments.
Agreed.
And this goes for some of the other patches that look like this too.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH net-next 07/11] r8169:update rtl8168f pcie ephy parameter
2015-01-09 4:08 ` David Miller
@ 2015-01-09 5:18 ` Hau
0 siblings, 0 replies; 15+ messages in thread
From: Hau @ 2015-01-09 5:18 UTC (permalink / raw)
To: David Miller, David.Laight@ACULAB.COM
Cc: netdev@vger.kernel.org, nic_swsd, linux-kernel@vger.kernel.org
> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Friday, January 09, 2015 12:09 PM
> To: David.Laight@ACULAB.COM
> Cc: Hau; netdev@vger.kernel.org; nic_swsd; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH net-next 07/11] r8169:update rtl8168f pcie ephy
> parameter
>
> From: David Laight <David.Laight@ACULAB.COM>
> Date: Wed, 7 Jan 2015 16:45:58 +0000
>
> > From: Chunhao Lin
> >> @@ -5852,7 +5852,9 @@ static void rtl_hw_start_8168f_1(struct
> rtl8169_private *tp)
> >> { 0x06, 0x00c0, 0x0020 },
> >> { 0x08, 0x0001, 0x0002 },
> >> { 0x09, 0x0000, 0x0080 },
> >> - { 0x19, 0x0000, 0x0224 }
> >> + { 0x19, 0x0000, 0x0224 },
> >> + { 0x00, 0x0000, 0x0008 },
> >> + { 0x0c, 0x3df0, 0x0200 }
> >
> > I can't help feeling these lines all require short comments.
>
> Agreed.
>
> And this goes for some of the other patches that look like this too.
>
I will merge the patches and update again.
Thanks.
------Please consider the environment before printing this e-mail.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-01-09 5:18 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 16:40 [PATCH net-next 00/11]r8169:update hardware parameter Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 01/11] r8169:change rtl8168dp jumbo frame patch Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 02/11] r8169:update rtl8168e and rtl8168evl " Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 03/11] r8169:change the way of setting rtl8168dp ephy parameters Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 04/11] r8169:update rtl8168dp pcie ephy parameter Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 05/11] r8169:remove function rtl_hw_start_8168dp Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 06/11] r8169:update rtl8168evl pcie ephy parameter Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 07/11] r8169:update rtl8168f " Chunhao Lin
2015-01-07 16:45 ` David Laight
2015-01-09 4:08 ` David Miller
2015-01-09 5:18 ` Hau
2015-01-07 16:40 ` [PATCH net-next 08/11] r8169:update rtl8411 " Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 09/11] r8169:update rtl8105e " Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 10/11] r8169:update rtl8402 " Chunhao Lin
2015-01-07 16:40 ` [PATCH net-next 11/11] r8169:update rtl8168f rev.b " Chunhao Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).