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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e22bf47d-db22-4659-8246-619aafe1ba43@lunn.ch>
Date: Sat, 12 Oct 2024 20:29:03 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jacky Chou <jacky_chou@...eedtech.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, jacob.e.keller@...el.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [net] net: ftgmac100: corrcet the phy interface of NC-SI mode

On Fri, Oct 11, 2024 at 04:28:27PM +0800, Jacky Chou wrote:
> In NC-SI specification, NC-SI is using RMII, not MII.
> 
> Fixes: e24a6c874601 ("net: ftgmac100: Get link speed and duplex for NC-SI")
> Signed-off-by: Jacky Chou <jacky_chou@...eedtech.com>
> ---
>  drivers/net/ethernet/faraday/ftgmac100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index ae0235a7a74e..85fea13b2879 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -1913,7 +1913,7 @@ static int ftgmac100_probe(struct platform_device *pdev)
>  			goto err_phy_connect;
>  		}
>  		err = phy_connect_direct(netdev, phydev, ftgmac100_adjust_link,
> -					 PHY_INTERFACE_MODE_MII);
> +					 PHY_INTERFACE_MODE_RMII);
>  		if (err) {
>  			dev_err(&pdev->dev, "Connecting PHY failed\n");
>  			goto err_phy_connect;

I'm a but confused here. Please could you expand the commit
message. When i look at the code:

		phydev = fixed_phy_register(PHY_POLL, &ncsi_phy_status, NULL);
		err = phy_connect_direct(netdev, phydev, ftgmac100_adjust_link,
					 PHY_INTERFACE_MODE_MII);
		if (err) {
			dev_err(&pdev->dev, "Connecting PHY failed\n");
			goto err_phy_connect;
		}

The phy being connected to is a fixed PHY. So the interface mode
should not matter, at least to the PHY, since there is no physical
PHY. Does the MAC driver get this value returned to it, e.g. as part
of ftgmac100_adjust_link, and the MAC then configures itself into the
wrong interface mode?

For a patch with a Fixes: it is good to describe the problem the user
sees.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ