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: <20180801152330.GE32125@lunn.ch>
Date:   Wed, 1 Aug 2018 17:23:30 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Jose Abreu <Jose.Abreu@...opsys.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Joao Pinto <Joao.Pinto@...opsys.com>,
        Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...com>
Subject: Re: [PATCH net-next 7/9] net: stmmac: Integrate XGMAC into main
 driver flow

> @@ -842,6 +863,12 @@ static void stmmac_adjust_link(struct net_device *dev)
>  			new_state = true;
>  			ctrl &= ~priv->hw->link.speed_mask;
>  			switch (phydev->speed) {
> +			case SPEED_10000:
> +				ctrl |= priv->hw->link.speed10000;
> +				break;
> +			case SPEED_2500:
> +				ctrl |= priv->hw->link.speed2500;
> +				break;
>  			case SPEED_1000:
>  				ctrl |= priv->hw->link.speed1000;
>  				break;

Hi Jose

What PHY did you test this with?

10G phys change the interface mode when the speed change. In general,
10/100/1000G copper uses SGMII. A 1G SFP optical module generally
wants 1000Base-X. 2.5G wants 2500Base-X, 10G copper wants 10GKR, etc.

So your adjust link callback needs to look at phydev->interface and
reconfigure the MAC as requested.

You might also want to consider moving from phylib to phylink. It has
a better interface for things like this, and makes support for SFP
interfaces much easier. A MAC which supports 10G is likely to be used
with SFPs...

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ