lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 May 2023 18:05:50 -0700
From: Ron Eggler <ron.eggler@...tywest.com>
To: netdev@...r.kernel.org
Subject: PHY VSC8531 MDIO data not reflected in ethernet/ sub-module

Hi, Everybody,

I've posted here previously about the bring up of two network interfaces 
on an embedded platform that is using two the Microsemi VSC8531 PHYs. 
(two previous threads: "issues to bring up two VSC8531 PHYs" & "Unable 
to TX data on VSC8531". Thanks to Heiner Kallweit, Andrew Lunn, Horatiu 
Vultur & everybody else who might be following along)!

A quick summary of the previous threads is: No matter what speed the PHY 
negotiates to 10/100 or 1G, the RGMII TX_CLK always remains at 2.5MHz 
(which would be frequency for 10baseT). I'm starting yet another thread 
as I have realized that the MDIO information does not seem to propagate 
through to the drivers/net/ethernet/renesas/ravb_main.c which utilizes 
the function *ravb_set_rate_gbeth() to set the MPU's registers correctly 
(which is needed to get the correct frequency on the RGMII bus). **
I have not found a potential reason for this, the MDIO comms appear to 
work properly as I can retrieve information with the mdio and the 
mii-tool utility properly.
**I've added printk debug logs with to ravb_main.c and found out that 
the link state nor the speed do not appear to be propagated through 
properly (when compared with mii-tool).*
***The logs generated look like:*
***
# dmesg | grep DEBUG*
***[ 6.728165] DEBUG: in ravb_emac_init_gbeth(), calling 
ravb_set_rate_gbeth(), priv->duplex: 0, priv->speed: 0*
***[ 6.751973] DEBUG: in ravb_set_rate_gbeth() - priv->speed 0*
***[ 6.831153] DEBUG: in ravb_adjust_link(), phydev->speed -1, 
priv->speed 0*
***[ 6.839952] DEBUG: in ravb_adjust_link(), priv->no_avb_link 0, 
phydev->link 0*
***[ 6.847093] DEBUG: in ravb_adjust_link(), phydev->autoneg_complete: 0*
***[ 6.853514] DEBUG: in ravb_adjust_link(),phydev->link 0*
***[ 6.883683] DEBUG: in ravb_emac_init_gbeth(), calling 
ravb_set_rate_gbeth(), priv->duplex: 0, priv->speed: 0*
***[ 6.898551] DEBUG: in ravb_set_rate_gbeth() - priv->speed 0*
***[ 6.963742] DEBUG: in ravb_adjust_link(), phydev->speed -1, 
priv->speed 0*
***[ 6.973404] DEBUG: in ravb_adjust_link(), priv->no_avb_link 0, 
phydev->link 0*
***[ 6.981869] DEBUG: in ravb_adjust_link(), phydev->autoneg_complete: 0*
***[ 6.989645] DEBUG: in ravb_adjust_link(),phydev->link 0
*

**


Which has been generated by application of the following patch file: 
https://github.com/MistySOM/meta-mistysom/blob/phy-enable/recipes-kernel/linux/smarc-rzg2l/0002-add-phy_debug_logs.patch

While I also receive the following using the mii-tool utility:
# mii-tool -vv eth0
Using SIOCGMIIPHY=0x8947
eth0: negotiated 1000baseT-FD flow-control, link ok
   registers for MII PHY 0:
     1040 796d 0007 0572 01e1 cde1 000f 2001
     4006 0300 7800 0000 0000 4002 0000 3000
     0000 f000 0088 0000 0000 0001 3200 1000
     0000 0000 0000 0000 a035 0054 0400 0000
   product info: vendor 00:01:c1, model 23 rev 2
   basic mode:   autonegotiation enabled
   basic status: autonegotiation complete, link ok
   capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 
10baseT-FD 10baseT-HD
   advertising:  1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 
10baseT-HD
   link partner: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 
10baseT-FD 10baseT-HD flow-control

# mii-tool -vv eth1
Using SIOCGMIIPHY=0x8947
eth1: no link
   registers for MII PHY 0:
     1040 7949 0007 0572 01e1 0000 0004 2001
     0000 0300 4000 0000 0000 4002 0000 3000
     0000 0000 0088 0000 0000 0000 3200 1000
     0000 0000 0000 0000 0404 0054 0400 0000
   product info: vendor 00:01:c1, model 23 rev 2
   basic mode:   autonegotiation enabled
   basic status: no link
   capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 
10baseT-FD 10baseT-HD
   advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

Also one oditty I just realize now is that eth1 only appears to 
advertise 100Mbits until I connect it to the 1G line, then it looks just 
like eth0 above but that's something for another day
Can sdomeone help me to find out why the MDIO info doesn't appear to 
pass through to the ravb driver properly?

Thanks,
-- 
Ron


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ