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]
Date:   Tue, 18 Dec 2018 13:12:26 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Bryan Whitehead <Bryan.Whitehead@...rochip.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v1 net] lan743x: Expand phy search for LAN7431

On Mon, Dec 17, 2018 at 04:44:50PM -0500, Bryan Whitehead wrote:
> The LAN7431 uses an external phy, and it can be found anywhere in
> the phy address space. This patch uses phy address 1 for LAN7430
> only. And searches all addresses otherwise.
> 
> Signed-off-by: Bryan Whitehead <Bryan.Whitehead@...rochip.com>
> ---
>  drivers/net/ethernet/microchip/lan743x_main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
> index e8ca98c..1ba8ea0 100644
> --- a/drivers/net/ethernet/microchip/lan743x_main.c
> +++ b/drivers/net/ethernet/microchip/lan743x_main.c
> @@ -2719,8 +2719,9 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
>  	snprintf(adapter->mdiobus->id, MII_BUS_ID_SIZE,
>  		 "pci-%s", pci_name(adapter->pdev));
>  
> -	/* set to internal PHY id */
> -	adapter->mdiobus->phy_mask = ~(u32)BIT(1);
> +	if ((adapter->csr.id_rev & ID_REV_ID_MASK_) == ID_REV_ID_LAN7430_)
> +		/* LAN7430 uses internal phy at address 1 */
> +		adapter->mdiobus->phy_mask = ~(u32)BIT(1);

Hi Bryan

Does LAN7430 have an external MDIO bus as well as the internal one? Is
there a possibility for a PHY at address 0? If not, you can probably
just not have a mask at all.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ