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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 13 Aug 2019 17:51:24 +0200 From: Marek BehĂșn <marek.behun@....cz> To: Andrew Lunn <andrew@...n.ch> Cc: netdev@...r.kernel.org, Heiner Kallweit <hkallweit1@...il.com>, Sebastian Reichel <sebastian.reichel@...labora.co.uk>, Vivien Didelot <vivien.didelot@...il.com>, Florian Fainelli <f.fainelli@...il.com>, "David S . Miller" <davem@...emloft.net> Subject: Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: fix RGMII-ID port setup On Tue, 13 Aug 2019 17:44:16 +0200 Marek BehĂșn <marek.behun@....cz> wrote: > Hi Andrew, > > > We should read the switch registers. I think you can set the > > defaults using strapping pins. And in general, the driver always > > reads state from the hardware rather than caching it. > > hmm. The cmode is cached for each port, though. For example > mv88e6390x_port_set_cmode compares the new requested value with the > cached one and doesn't do anything if they are equal. > > If mv88e6xxx_port_setup_mac can be called once per second by phylink > as you say, do we really want to read the value via MDIO every time? > We already have cmode cached (read from registers at mv88e6xxx_setup, > and then changed when cmode change is requested). From cmode we can > already differentiate mode in the terms of phy_interface_t, unless it > is RGMII, in which case we would have to read RX/TX timing. > > Marek /o\ OK. I see now that mv88e6xxx_port_setup_mac already calls ->port_link_state(), which fills in a struct phylink_link_state, and already does MDIO communication. Sorry :) I will try to send a patch which adds the filling of the ->interface member of the struct phylink_link_state in ->port_link_state() method. Marek
Powered by blists - more mailing lists