Re: [PATCH v3 net-next] net: phy: realtek: read actual speed on rtl8211f to detect downshift

2020-11-25 Thread Yonglong Liu
Hi, Russell:     I found this message in kernel log, thanks! On 2020/11/26 1:07, Russell King - ARM Linux admin wrote: On Thu, Nov 26, 2020 at 12:57:37AM +0800, Yonglong Liu wrote: Hi, Antonio:     Could you help to provide a downshift warning message when this happen?     It's a little

Re: [PATCH v3 net-next] net: phy: realtek: read actual speed on rtl8211f to detect downshift

2020-11-25 Thread Yonglong Liu
On 2020/11/25 23:03, Yonglong Liu wrote: Tested-by: Yonglong Liu On 2020/11/25 7:07, Antonio Borneo wrote: The rtl8211f supports downshift and before commit 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") the read-back of register MII_CTRL100

Re: [PATCH v3 net-next] net: phy: realtek: read actual speed on rtl8211f to detect downshift

2020-11-25 Thread Yonglong Liu
Tested-by: Yonglong Liu On 2020/11/25 7:07, Antonio Borneo wrote: The rtl8211f supports downshift and before commit 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") the read-back of register MII_CTRL1000 was used to detect the negotiated link speed. The

Re: [question] net: phy: rtl8211f: link speed shows 1000Mb/s but actual link speed in phy is 100Mb/s

2020-05-12 Thread Yonglong Liu
On 2020/5/13 9:59, Andrew Lunn wrote: > On Wed, May 13, 2020 at 09:34:13AM +0800, Yonglong Liu wrote: >> Hi, Andrew: >> Thanks for your reply! >> >> On 2020/5/12 22:00, Andrew Lunn wrote: >>> On Tue, May 12, 2020 at 08:48:21PM +0800, Yonglong Liu wrote:

Re: [question] net: phy: rtl8211f: link speed shows 1000Mb/s but actual link speed in phy is 100Mb/s

2020-05-12 Thread Yonglong Liu
Hi, Andrew: Thanks for your reply! On 2020/5/12 22:00, Andrew Lunn wrote: > On Tue, May 12, 2020 at 08:48:21PM +0800, Yonglong Liu wrote: >> I use two devices, both support 1000M speed, they are directly connected >> with a network cable. Two devices enable auton

[question] net: phy: rtl8211f: link speed shows 1000Mb/s but actual link speed in phy is 100Mb/s

2020-05-12 Thread Yonglong Liu
I use two devices, both support 1000M speed, they are directly connected with a network cable. Two devices enable autoneg, and then do the following test repeatedly: ifconfig eth5 down ifconfig eth5 up sleep $((RANDOM%6)) ifconfig eth5 down ifconfig eth5 up

[PATCH net] net: phy: Fix "link partner" information disappear issue

2019-10-15 Thread Yonglong Liu
nphy_read_lpa()/genphy_c45_read_lpa(), and if autoneg on and autoneg not complete, just clear what the generic functions care about. Fixes: 88d6272acaaa ("net: phy: avoid unneeded MDIO reads in genphy_read_status") Signed-off-by: Yonglong Liu --- drivers/net/phy/phy-c45.c| 2 ++ d

Re: [RFC PATCH V2 net] net: phy: Fix "link partner" information disappear issue

2019-10-15 Thread Yonglong Liu
On 2019/10/16 4:02, Heiner Kallweit wrote: > On 14.10.2019 14:56, Yonglong Liu wrote: >> Some drivers just call phy_ethtool_ksettings_set() to set the >> links, for those phy drivers that use genphy_read_status(), if >> autoneg is on, and the link is up, than execute "

[RFC PATCH V2 net] net: phy: Fix "link partner" information disappear issue

2019-10-14 Thread Yonglong Liu
nphy_read_lpa()/genphy_c45_read_lpa(), and if autoneg on and autoneg not complete, just clear what the generic functions care about. Fixes: 88d6272acaaa ("net: phy: avoid unneeded MDIO reads in genphy_read_status") Signed-off-by: Yonglong Liu --- change log: V2: moves the clear op

Re: [RFC PATCH net] net: phy: Fix "link partner" information disappear issue

2019-10-10 Thread Yonglong Liu
On 2019/10/11 3:17, Heiner Kallweit wrote: > On 10.10.2019 11:30, Yonglong Liu wrote: >> Some drivers just call phy_ethtool_ksettings_set() to set the >> links, for those phy drivers that use genphy_read_status(), if >> autoneg is on, and the link is up, than execute "

[RFC PATCH net] net: phy: Fix "link partner" information disappear issue

2019-10-10 Thread Yonglong Liu
problem. Fixes: 88d6272acaaa ("net: phy: avoid unneeded MDIO reads in genphy_read_status") Signed-off-by: Yonglong Liu --- drivers/net/phy/phy_device.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c in

[PATCH net-next] net: hns: add phy_attached_info() to the hns driver

2019-08-16 Thread Yonglong Liu
This patch adds the call to phy_attached_info() to the hns driver to identify which exact PHY drivers is in use. Suggested-by: Heiner Kallweit Signed-off-by: Yonglong Liu --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net

Re: [PATCH net] net: hns: add phy_attached_info() to the hns driver

2019-08-16 Thread Yonglong Liu
Please ignore this patch, it is not bugfix, should send to net-next. Sorry for the noise. On 2019/8/17 9:56, Yonglong Liu wrote: > This patch add the call to phy_attached_info() to the hns driver > to identify which exact PHY drivers is in use. > > Signed-off-by: Yonglong Liu >

[PATCH net] net: hns: add phy_attached_info() to the hns driver

2019-08-16 Thread Yonglong Liu
This patch add the call to phy_attached_info() to the hns driver to identify which exact PHY drivers is in use. Signed-off-by: Yonglong Liu --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b

Re: [PATCH net] net: phy: rtl8211f: do a double read to get real time link status

2019-08-11 Thread Yonglong Liu
On 2019/8/10 4:05, Heiner Kallweit wrote: > On 09.08.2019 06:57, Yonglong Liu wrote: >> >> >> On 2019/8/9 4:34, Andrew Lunn wrote: >>> On Thu, Aug 08, 2019 at 10:01:39PM +0200, Heiner Kallweit wrote: >>>> On 08.08.2019 21:40, Andrew Lunn wrote: >

Re: [PATCH net] net: phy: rtl8211f: do a double read to get real time link status

2019-08-08 Thread Yonglong Liu
On 2019/8/9 4:34, Andrew Lunn wrote: > On Thu, Aug 08, 2019 at 10:01:39PM +0200, Heiner Kallweit wrote: >> On 08.08.2019 21:40, Andrew Lunn wrote: @@ -568,6 +568,11 @@ int phy_start_aneg(struct phy_device *phydev) if (err < 0) goto out_unlock; + /* The

Re: [PATCH net] net: phy: rtl8211f: do a double read to get real time link status

2019-08-08 Thread Yonglong Liu
On 2019/8/8 14:11, Heiner Kallweit wrote: > On 08.08.2019 03:15, Yonglong Liu wrote: >> >> >> On 2019/8/8 0:47, Heiner Kallweit wrote: >>> On 07.08.2019 15:16, Yonglong Liu wrote: >>>> [ 27.232781] hns3 :bd:00.3 eth7: net open >>>

Re: [PATCH net] net: phy: rtl8211f: do a double read to get real time link status

2019-08-07 Thread Yonglong Liu
On 2019/8/8 0:47, Heiner Kallweit wrote: > On 07.08.2019 15:16, Yonglong Liu wrote: >> [ 27.232781] hns3 :bd:00.3 eth7: net open >> [ 27.237303] 8021q: adding VLAN 0 to HW filter on device eth7 >> [ 27.242972] IPv6: ADDRCONF(NETDEV_CHANGE): eth7: link becomes r

[PATCH net] net: phy: rtl8211f: do a double read to get real time link status

2019-08-07 Thread Yonglong Liu
get real link status in genphy_read_status(). Signed-off-by: Yonglong Liu --- drivers/net/phy/realtek.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index a669945..92e27d5 100644 --- a/drivers/net/phy/realtek.c +++ b/dr

[RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-26 Thread Yonglong Liu
I also see that in genphy_update_link(), had delete the fake read in polling mode, so I don't know whether my solution is correct. Or provide a phydev->drv->read_status functions for the phy I used is more acceptable? Signed-off-by: Yonglong Liu --- drivers/net/phy/phy.c | 8 1 fil

[PATCH net] net: hns: fix LED configuration for marvell phy

2019-07-22 Thread Yonglong Liu
hange default m88e1510 LED configuration") Signed-off-by: Yonglong Liu Reviewed-by: linyunsheng --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/d

[PATCH net] net: hns: add support for vlan TSO

2019-07-03 Thread Yonglong Liu
The hip07 chip support vlan TSO, this patch adds NETIF_F_TSO and NETIF_F_TSO6 flags to vlan_features to improve the performance after adding vlan to the net ports. Signed-off-by: Yonglong Liu --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH net] net: hns: Fix loopback test failed at copper ports

2019-05-31 Thread Yonglong Liu
When doing a loopback test at copper ports, the serdes loopback and the phy loopback will fail, because of the adjust link had not finished, and phy not ready. Adds sleep between adjust link and test process to fix it. Signed-off-by: Yonglong Liu --- drivers/net/ethernet/hisilicon/hns

[PATCH net 3/6] net: hns: Fix probabilistic memory overwrite when HNS driver initialized

2019-04-04 Thread Yonglong Liu
XGMAC_MAC_TX_LF_RF_CONTROL_REG, didn't use the io_base offset. Signed-off-by: Yonglong Liu --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c b/drivers/net/ethernet/hisilicon/hns