All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Byungho An <bh74.an@samsung.com>,
	Giuseppe CAVALLARO <peppe.cavallaro@st.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC net-next 2/3] net: stmmac: Activate Inband/PCS flag based on the selected iface
Date: Tue, 28 May 2024 11:21:39 +0100	[thread overview]
Message-ID: <ZlWwMzMZrwb5fscN@shell.armlinux.org.uk> (raw)
In-Reply-To: <fvjrnunu4lriegq3z7xkefsts6ybn2vkxmve6xzi73krjgvcj6@bhf4b4xx3x72>

On Mon, May 27, 2024 at 12:57:02AM +0300, Serge Semin wrote:
> On Sun, May 26, 2024 at 05:49:48PM +0100, Russell King (Oracle) wrote:
> > On Sat, May 25, 2024 at 12:02:58AM +0300, Serge Semin wrote:
> > > The HWFEATURE.PCSSEL flag is set if the PCS block has been synthesized
> > > into the DW GMAC controller. It's always done if the controller supports
> > > at least one of the SGMII, TBI, RTBI PHY interfaces. If none of these
> > > interfaces support was activated during the IP-core synthesize the PCS
> > > block won't be activated either and the HWFEATURE.PCSSEL flag won't be
> > > set. Based on that the RGMII in-band status detection procedure
> > > implemented in the driver hasn't been working for the devices with the
> > > RGMII interface support and with none of the SGMII, TBI, RTBI PHY
> > > interfaces available in the device.
> > > 
> > > Fix that just by dropping the dma_cap.pcs flag check from the conditional
> > > statement responsible for the In-band/PCS functionality activation. If the
> > > RGMII interface is supported by the device then the in-band link status
> > > detection will be also supported automatically (it's always embedded into
> > > the RGMII RTL code). If the SGMII interface is supported by the device
> > > then the PCS block will be supported too (it's unconditionally synthesized
> > > into the controller). The later is also correct for the TBI/RTBI PHY
> > > interfaces.
> > > 
> > > Note while at it drop the netdev_dbg() calls since at the moment of the
> > > stmmac_check_pcs_mode() invocation the network device isn't registered. So
> > > the debug prints will be for the unknown/NULL device.
> > 
> 
> > Thanks. As this is a fix, shouldn't it be submitted for the net tree as
> > it seems to be fixing a bug in the driver as it stands today?
> 
> From one point of view it could be submitted for the net tree indeed,
> but on the second thought are you sure we should be doing that seeing
> it will activate the RGMII-inband detection and the code with the
> netif-carrier toggling behind the phylink back? Who knows what new
> regressions the activated PCS-code can cause?..

If it's not a fix that is suitable without the remainder of the patch
set, this should be stated in the commit description and it shouldn't
have a Fixes: tag.

The reason is because it wouldn't be stable kernel material without the
other patches - if stable picks it up without the other patches then
it could end up being applied without the other patches resulting in
the situation you mention above.

Shall I remove the Fixes: tag?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Byungho An <bh74.an@samsung.com>,
	Giuseppe CAVALLARO <peppe.cavallaro@st.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC net-next 2/3] net: stmmac: Activate Inband/PCS flag based on the selected iface
Date: Tue, 28 May 2024 11:21:39 +0100	[thread overview]
Message-ID: <ZlWwMzMZrwb5fscN@shell.armlinux.org.uk> (raw)
In-Reply-To: <fvjrnunu4lriegq3z7xkefsts6ybn2vkxmve6xzi73krjgvcj6@bhf4b4xx3x72>

On Mon, May 27, 2024 at 12:57:02AM +0300, Serge Semin wrote:
> On Sun, May 26, 2024 at 05:49:48PM +0100, Russell King (Oracle) wrote:
> > On Sat, May 25, 2024 at 12:02:58AM +0300, Serge Semin wrote:
> > > The HWFEATURE.PCSSEL flag is set if the PCS block has been synthesized
> > > into the DW GMAC controller. It's always done if the controller supports
> > > at least one of the SGMII, TBI, RTBI PHY interfaces. If none of these
> > > interfaces support was activated during the IP-core synthesize the PCS
> > > block won't be activated either and the HWFEATURE.PCSSEL flag won't be
> > > set. Based on that the RGMII in-band status detection procedure
> > > implemented in the driver hasn't been working for the devices with the
> > > RGMII interface support and with none of the SGMII, TBI, RTBI PHY
> > > interfaces available in the device.
> > > 
> > > Fix that just by dropping the dma_cap.pcs flag check from the conditional
> > > statement responsible for the In-band/PCS functionality activation. If the
> > > RGMII interface is supported by the device then the in-band link status
> > > detection will be also supported automatically (it's always embedded into
> > > the RGMII RTL code). If the SGMII interface is supported by the device
> > > then the PCS block will be supported too (it's unconditionally synthesized
> > > into the controller). The later is also correct for the TBI/RTBI PHY
> > > interfaces.
> > > 
> > > Note while at it drop the netdev_dbg() calls since at the moment of the
> > > stmmac_check_pcs_mode() invocation the network device isn't registered. So
> > > the debug prints will be for the unknown/NULL device.
> > 
> 
> > Thanks. As this is a fix, shouldn't it be submitted for the net tree as
> > it seems to be fixing a bug in the driver as it stands today?
> 
> From one point of view it could be submitted for the net tree indeed,
> but on the second thought are you sure we should be doing that seeing
> it will activate the RGMII-inband detection and the code with the
> netif-carrier toggling behind the phylink back? Who knows what new
> regressions the activated PCS-code can cause?..

If it's not a fix that is suitable without the remainder of the patch
set, this should be stated in the commit description and it shouldn't
have a Fixes: tag.

The reason is because it wouldn't be stable kernel material without the
other patches - if stable picks it up without the other patches then
it could end up being applied without the other patches resulting in
the situation you mention above.

Shall I remove the Fixes: tag?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-05-28 10:22 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-12 16:28 [PATCH RFC 0/6] net: stmmac: convert stmmac "pcs" to phylink Russell King (Oracle)
2024-05-12 16:28 ` Russell King (Oracle)
2024-05-12 16:28 ` [PATCH RFC net-next 1/6] net: stmmac: convert sgmii/rgmii " Russell King (Oracle)
2024-05-12 16:28   ` Russell King (Oracle)
2024-05-12 16:29 ` [PATCH RFC net-next 2/6] net: stmmac: remove pcs_ctrl_ane() method and associated code Russell King (Oracle)
2024-05-12 16:29   ` Russell King (Oracle)
2024-05-13  4:13   ` kernel test robot
2024-05-13  5:15   ` kernel test robot
2024-05-25  4:13   ` kernel test robot
2024-05-25  4:24   ` kernel test robot
2024-05-12 16:29 ` [PATCH RFC net-next 3/6] net: stmmac: remove pcs_rane() method Russell King (Oracle)
2024-05-12 16:29   ` Russell King (Oracle)
2024-05-12 16:29 ` [PATCH RFC net-next 4/6] net: stmmac: remove calls to stmmac_pcs_get_adv_lp() Russell King (Oracle)
2024-05-12 16:29   ` Russell King (Oracle)
2024-05-12 16:29 ` [PATCH RFC net-next 5/6] net: stmmac: remove pcs_get_adv_lp() method and associated code Russell King (Oracle)
2024-05-12 16:29   ` Russell King (Oracle)
2024-05-12 16:29 ` [PATCH RFC net-next 6/6] net: stmmac: remove old pcs interrupt functions Russell King (Oracle)
2024-05-12 16:29   ` Russell King (Oracle)
2024-05-13 23:04 ` [PATCH RFC 0/6] net: stmmac: convert stmmac "pcs" to phylink Serge Semin
2024-05-13 23:04   ` Serge Semin
2024-05-13 23:21   ` Russell King (Oracle)
2024-05-13 23:21     ` Russell King (Oracle)
2024-05-13 23:53     ` Serge Semin
2024-05-13 23:53       ` Serge Semin
2024-05-24 23:54     ` Serge Semin
2024-05-24 23:54       ` Serge Semin
2024-05-24 21:02 ` [PATCH RFC net-next 1/3] net: stmmac: Prevent RGSMIIIS IRQs flood Serge Semin
2024-05-24 21:02   ` Serge Semin
2024-05-24 21:02   ` [PATCH RFC net-next 2/3] net: stmmac: Activate Inband/PCS flag based on the selected iface Serge Semin
2024-05-24 21:02     ` Serge Semin
2024-05-26 16:49     ` Russell King (Oracle)
2024-05-26 16:49       ` Russell King (Oracle)
2024-05-26 18:00       ` Russell King (Oracle)
2024-05-26 18:00         ` Russell King (Oracle)
2024-05-28 13:19         ` Serge Semin
2024-05-28 13:19           ` Serge Semin
2024-05-28 14:13           ` Russell King (Oracle)
2024-05-28 14:13             ` Russell King (Oracle)
2024-05-28 16:21             ` Russell King (Oracle)
2024-05-28 16:21               ` Russell King (Oracle)
2024-05-31 19:11               ` Serge Semin
2024-05-31 19:11                 ` Serge Semin
2024-05-31 17:13             ` Serge Semin
2024-05-31 17:13               ` Serge Semin
2024-05-31 19:30               ` Russell King (Oracle)
2024-05-31 19:30                 ` Russell King (Oracle)
2024-06-02 23:25                 ` Serge Semin
2024-06-02 23:25                   ` Serge Semin
2024-05-26 21:57       ` Serge Semin
2024-05-26 21:57         ` Serge Semin
2024-05-28 10:21         ` Russell King (Oracle) [this message]
2024-05-28 10:21           ` Russell King (Oracle)
2024-05-28 12:22           ` Serge Semin
2024-05-28 12:22             ` Serge Semin
2024-05-24 21:02   ` [PATCH RFC net-next 3/3] net: stmmac: Drop TBI/RTBI PCS flags Serge Semin
2024-05-24 21:02     ` Serge Semin
2024-05-28 10:23     ` Russell King (Oracle)
2024-05-28 10:23       ` Russell King (Oracle)
2024-05-28 12:23       ` Serge Semin
2024-05-28 12:23         ` Serge Semin
2024-05-28 10:24   ` [PATCH RFC net-next 1/3] net: stmmac: Prevent RGSMIIIS IRQs flood Russell King (Oracle)
2024-05-28 10:24     ` Russell King (Oracle)
2024-05-28 12:20     ` Serge Semin
2024-05-28 12:20       ` Serge Semin

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=ZlWwMzMZrwb5fscN@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandre.torgue@foss.st.com \
    --cc=ast@kernel.org \
    --cc=bh74.an@samsung.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fancer.lancer@gmail.com \
    --cc=hawk@kernel.org \
    --cc=joabreu@synopsys.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.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 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.