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: <20190910154238.9155-2-bob.beckett@collabora.com>
Date:   Tue, 10 Sep 2019 16:41:47 +0100
From:   Robert Beckett <bob.beckett@...labora.com>
To:     netdev@...r.kernel.org
Cc:     Robert Beckett <bob.beckett@...labora.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: [PATCH 1/7] net/dsa: configure autoneg for CPU port

Configure autoneg for phy connected CPU ports.
This allows us to use autoneg between the CPU port's phy and the link
partner's phy.
This enables us to negoatiate pause frame transmission to prioritise
packet delivery over throughput.

Signed-off-by: Robert Beckett <bob.beckett@...labora.com>
---
 net/dsa/port.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/dsa/port.c b/net/dsa/port.c
index f071acf2842b..1b6832eac2c5 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -538,10 +538,20 @@ static int dsa_port_setup_phy_of(struct dsa_port *dp, bool enable)
 		return PTR_ERR(phydev);
 
 	if (enable) {
+		phydev->supported = PHY_GBIT_FEATURES | SUPPORTED_MII |
+				    SUPPORTED_AUI | SUPPORTED_FIBRE |
+				    SUPPORTED_BNC | SUPPORTED_Pause |
+				    SUPPORTED_Asym_Pause;
+		phydev->advertising = phydev->supported;
+
 		err = genphy_config_init(phydev);
 		if (err < 0)
 			goto err_put_dev;
 
+		err = genphy_config_aneg(phydev);
+		if (err < 0)
+			goto err_put_dev;
+
 		err = genphy_resume(phydev);
 		if (err < 0)
 			goto err_put_dev;
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ