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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 27 Mar 2020 21:01:53 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Daniel Mack <daniel@...que.org>
Cc:     vivien.didelot@...il.com, f.fainelli@...il.com,
        davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] net: dsa: mv88e6xxx: don't force settings on CPU port

On Fri, Mar 27, 2020 at 08:51:56PM +0100, Daniel Mack wrote:
> On hardware with a speed-reduced link to the CPU port, forcing the MAC
> settings won't allow any packets to pass. The PHY will negotiate the
> maximum possible speed, so let's allow the MAC to work with whatever
> is available.

Hi Daniel

This will break board which rely on the CPU being forced to the
maximum speed, which has been the default since forever.

It sounds like you have the unusual situation of back to back PHYs?
And i assume the SoC PHY is limited to Fast Ethernet?

What i think you can do is have a phy-handle in the cpu node which
points to the PHY. That should then cause the PHY to be driven as a
normal PHY, and the result of auto neg passed to the MAC.

       Andrew

> 
> Signed-off-by: Daniel Mack <daniel@...que.org>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 2f993e673ec7..48808c4add4f 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -2426,7 +2426,7 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
>  	 * state to any particular values on physical ports, but force the CPU
>  	 * port and all DSA ports to their maximum bandwidth and full duplex.
>  	 */
> -	if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
> +	if (dsa_is_dsa_port(ds, port))
>  		err = mv88e6xxx_port_setup_mac(chip, port, LINK_FORCED_UP,
>  					       SPEED_MAX, DUPLEX_FULL,
>  					       PAUSE_OFF,
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ