From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
linux-doc@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-stm32@st-md-mailman.stormreply.com,
Felix Fietkau <nbd@openwrt.org>,
Ioana Radulescu <ruxandra.radulescu@nxp.com>,
Jonathan Corbet <corbet@lwn.net>,
Michal Simek <michal.simek@xilinx.com>,
Jose Abreu <joabreu@synopsys.com>,
Jakub Kicinski <kuba@kernel.org>,
Vivien Didelot <vivien.didelot@gmail.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Sean Wang <sean.wang@mediatek.com>,
linux-mediatek@lists.infradead.org,
John Crispin <john@phrozen.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
Mark Lee <Mark-MC.Lee@mediatek.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [CFT 1/8] net: phylink: propagate resolved link config via mac_link_up()
Date: Tue, 18 Feb 2020 01:53:27 +0000 [thread overview]
Message-ID: <20200218015327.GD25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <16f6912c-84a9-f1ab-6688-6a55ebf34270@gmail.com>
On Mon, Feb 17, 2020 at 01:54:19PM -0800, Florian Fainelli wrote:
>
>
> On 2/17/2020 9:23 AM, Russell King wrote:
> > Propagate the resolved link parameters via the mac_link_up() call for
> > MACs that do not automatically track their PCS state.
> >
> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> > ---
>
> [snip]
>
>
> > -static void macb_mac_link_up(struct phylink_config *config, unsigned int mode,
> > - phy_interface_t interface, struct phy_device *phy)
> > +static void macb_mac_link_up(struct phylink_config *config,
> > + struct phy_device *phy,
> > + unsigned int mode, phy_interface_t interface,
> > + int speed, int duplex,
> > + bool tx_pause, bool rx_pause)
>
> I have not been able to find an answer so I will ask this question, why
> not pass a const struct phylink_link_state reference here instead of
> splitting those link settings as individual function parameters? Or
> maybe introduce a phylink_link_settings comprised of all of those 4
> settings and embed it within phylink_link_state as well?
History of mac_config() has shown that passing something like
struct phylink_link_state results in stuff that should not be used
being used inspite of documentation saying otherwise. Passing
just the appropriate state ensures that stuff which should not
be used can't be got at.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-02-18 1:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 17:22 [CFT 0/8] rework phylink interface for split MAC/PCS support Russell King - ARM Linux admin
2020-02-17 17:33 ` Andrew Lunn
2020-02-17 18:51 ` Russell King - ARM Linux admin
2020-02-18 10:29 ` Russell King - ARM Linux admin
[not found] ` <E1j3k7e-00071q-3R@rmk-PC.armlinux.org.uk>
2020-02-17 18:03 ` [CFT 1/8] net: phylink: propagate resolved link config via mac_link_up() Matthew Wilcox
2020-02-17 18:48 ` Russell King - ARM Linux admin
2020-02-17 21:54 ` Florian Fainelli
2020-02-18 1:53 ` Russell King - ARM Linux admin [this message]
[not found] ` <E1j3k7t-00072J-RS@rmk-PC.armlinux.org.uk>
2020-02-20 10:29 ` [CFT 4/8] net: axienet: use resolved link config in mac_link_up() Russell King - ARM Linux admin
2020-02-24 12:24 ` Andre Przywara
2020-02-24 13:01 ` Russell King - ARM Linux admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200218015327.GD25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Mark-MC.Lee@mediatek.com \
--cc=alexandre.torgue@st.com \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=joabreu@synopsys.com \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=michal.simek@xilinx.com \
--cc=nbd@openwrt.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=ruxandra.radulescu@nxp.com \
--cc=sean.wang@mediatek.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).