From: Andrew Lunn <andrew@lunn.ch> To: Marcel Ziswiler <marcel.ziswiler@toradex.com> Cc: "linux-imx@nxp.com" <linux-imx@nxp.com>, "peppe.cavallaro@st.com" <peppe.cavallaro@st.com>, "linux-stm32@st-md-mailman.stormreply.com" <linux-stm32@st-md-mailman.stormreply.com>, "davem@davemloft.net" <davem@davemloft.net>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "pabeni@redhat.com" <pabeni@redhat.com>, "shawnguo@kernel.org" <shawnguo@kernel.org>, "joabreu@synopsys.com" <joabreu@synopsys.com>, "kernel@pengutronix.de" <kernel@pengutronix.de>, "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>, "kuba@kernel.org" <kuba@kernel.org>, "alexandre.torgue@foss.st.com" <alexandre.torgue@foss.st.com>, "mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "festevam@gmail.com" <festevam@gmail.com> Subject: Re: net: stmmac: dwmac-imx: half duplex crash Date: Tue, 26 Apr 2022 15:36:55 +0200 [thread overview] Message-ID: <Ymf1dwrwHe0PS1Cq@lunn.ch> (raw) In-Reply-To: <8f8cdcf584c13faf8bcdc2abfdb62b09950ea652.camel@toradex.com> > > Anyway, this is roughly there the check should go. > > You mean it would need an additional check against advertising nothing? I would check for a mode being requested which is not supported. phydev->supported tells you what the MAC/PHY can actually do. If there is a bit set which is not a member of that, return EINVAL. I don't think the plumbing is there, but netlink ethtool allows you to also return a text message via extack, so you could give the user a bit more information, the link mode which is invalid. > Well, we are gearing up on our automated testing infrastructure and asking my humble opinion on what exactly to > test concerning the Ethernet subsystem I gave the brilliant suggestion to try each and every supported link > mode (;-p). Which actually works just fine on every other hardware of ours just not the i.MX 8M Plus with the > DWMAC IP (remember, even FEC MAC works). So for now this is not something a customer of ours has real trouble > with but it raised some questions concerning whether or not and what exactly we do support... So in practice, this should not happen. You don't advertise the half modes, so you should never end up in a half mode. So it is not a problem :-) Andrew
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch> To: Marcel Ziswiler <marcel.ziswiler@toradex.com> Cc: "linux-imx@nxp.com" <linux-imx@nxp.com>, "peppe.cavallaro@st.com" <peppe.cavallaro@st.com>, "linux-stm32@st-md-mailman.stormreply.com" <linux-stm32@st-md-mailman.stormreply.com>, "davem@davemloft.net" <davem@davemloft.net>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "pabeni@redhat.com" <pabeni@redhat.com>, "shawnguo@kernel.org" <shawnguo@kernel.org>, "joabreu@synopsys.com" <joabreu@synopsys.com>, "kernel@pengutronix.de" <kernel@pengutronix.de>, "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>, "kuba@kernel.org" <kuba@kernel.org>, "alexandre.torgue@foss.st.com" <alexandre.torgue@foss.st.com>, "mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "festevam@gmail.com" <festevam@gmail.com> Subject: Re: net: stmmac: dwmac-imx: half duplex crash Date: Tue, 26 Apr 2022 15:36:55 +0200 [thread overview] Message-ID: <Ymf1dwrwHe0PS1Cq@lunn.ch> (raw) In-Reply-To: <8f8cdcf584c13faf8bcdc2abfdb62b09950ea652.camel@toradex.com> > > Anyway, this is roughly there the check should go. > > You mean it would need an additional check against advertising nothing? I would check for a mode being requested which is not supported. phydev->supported tells you what the MAC/PHY can actually do. If there is a bit set which is not a member of that, return EINVAL. I don't think the plumbing is there, but netlink ethtool allows you to also return a text message via extack, so you could give the user a bit more information, the link mode which is invalid. > Well, we are gearing up on our automated testing infrastructure and asking my humble opinion on what exactly to > test concerning the Ethernet subsystem I gave the brilliant suggestion to try each and every supported link > mode (;-p). Which actually works just fine on every other hardware of ours just not the i.MX 8M Plus with the > DWMAC IP (remember, even FEC MAC works). So for now this is not something a customer of ours has real trouble > with but it raised some questions concerning whether or not and what exactly we do support... So in practice, this should not happen. You don't advertise the half modes, so you should never end up in a half mode. So it is not a problem :-) Andrew _______________________________________________ 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:[~2022-04-26 13:37 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-23 22:58 net: stmmac: dwmac-imx: half duplex crash Marcel Ziswiler 2022-04-23 22:58 ` Marcel Ziswiler 2022-04-24 22:01 ` Andrew Lunn 2022-04-24 22:01 ` Andrew Lunn 2022-04-25 15:06 ` Marcel Ziswiler 2022-04-25 15:06 ` Marcel Ziswiler 2022-04-25 15:59 ` Andrew Lunn 2022-04-25 15:59 ` Andrew Lunn 2022-04-26 12:32 ` Marcel Ziswiler 2022-04-26 12:32 ` Marcel Ziswiler 2022-04-26 13:36 ` Andrew Lunn [this message] 2022-04-26 13:36 ` Andrew Lunn
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=Ymf1dwrwHe0PS1Cq@lunn.ch \ --to=andrew@lunn.ch \ --cc=alexandre.torgue@foss.st.com \ --cc=davem@davemloft.net \ --cc=festevam@gmail.com \ --cc=joabreu@synopsys.com \ --cc=kernel@pengutronix.de \ --cc=kuba@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=marcel.ziswiler@toradex.com \ --cc=mcoquelin.stm32@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=pabeni@redhat.com \ --cc=peppe.cavallaro@st.com \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.