From: netdev-bot+sashiko@kernel.org
To: alexander.duyck@gmail.com
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, horms@kernel.org,
kernel-team@meta.com, kuba@kernel.org, pabeni@redhat.com
Subject: Re: [net PATCH 4/5] fbnic: Suspend phylink after taking the datapath down in ndo_stop
Date: Sun, 08 Nov 2026 18:32:53 +0000 [thread overview]
Message-ID: <179416277370.994134.16129749928882463511@kernel.org> (raw)
In-Reply-To: <179381516644.9644.9042901965231900737.stgit@ahduyck-xeon-server.home.arpa>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The Fixes tag points at the wrong commit.
Pre-existing issues:
- [Low] This problem wasn't introduced by this patch, but the kernel-doc
for fbnic_mac_free_irq()…
--
fbnic: Suspend phylink after taking the datapath down in ndo_stop
This commit reorders fbnic_stop() so that fbnic_down() runs before
fbnic_mac_free_irq() and phylink_suspend(). Tx can then drain while the
link is still up, instead of draining into a MAC that is disabled and held
in reset. The PM suspend path goes through ndo_stop, so it gets the same
ordering.
> Fixes: 6ede14a2c636 ("fbnic: Move phylink resume out of service_task and into open/close")
[Severity: Low]
Should this tag point at an earlier commit?
Before 6ede14a2c636, phylink_suspend() was already the first thing that
ran on the down path. fbnic_down_noidle() first called
fbnic_service_task_stop(), and that function started with:
drivers/net/ethernet/meta/fbnic/fbnic_pci.c:fbnic_service_task_stop() {
phylink_suspend(fbn->phylink, fbnic_bmc_present(fbd));
cancel_delayed_work(&fbd->service_task);
...
}
fbnic_napi_disable(), netif_tx_disable(), the RPC/rx-mode clearing,
fbnic_disable() and the fbnic_wait_all_queues_idle() call in fbnic_down()
all came after it.
At 69684376eed5, fbnic_mac_link_down_asic() already disabled the MAC and
held it in reset:
mac_ctrl |= FBNIC_SIG_MAC_IN0_RESET_FF_TX_CLK |
FBNIC_SIG_MAC_IN0_RESET_TX_CLK |
FBNIC_SIG_MAC_IN0_RESET_FF_RX_CLK |
FBNIC_SIG_MAC_IN0_RESET_RX_CLK;
6ede14a2c636 moved phylink_suspend() from the top of fbnic_down() to just
before fbnic_down() in fbnic_stop(). It was still ahead of the queue
teardown in both places.
It looks like the ordering problem described here dates from
69684376eed5 ("eth: fbnic: Add link detection"). Would this be more
accurate?
Fixes: 69684376eed5 ("eth: fbnic: Add link detection")
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
> index 8a6703afca384..52244219d1668 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
> @@ -86,11 +86,11 @@ static int fbnic_stop(struct net_device *netdev)
> {
> struct fbnic_net *fbn = netdev_priv(netdev);
>
> + fbnic_down(fbn);
> +
> fbnic_mac_free_irq(fbn->fbd);
[Severity: Low]
This isn't a bug introduced by this patch, but the kernel-doc for
fbnic_mac_free_irq() in fbnic_irq.c says:
* This function undoes the work done in fbnic_mac_request_irq and prepares
* the device to no longer receive traffic on the host interface.
The function only disables the PCS MSI-X control entry, calls
synchronize_irq(), masks the vector, frees the IRQ and clears
fbd->mac_msix_vector.
Host Rx is actually stopped in fbnic_down_noidle(), through
fbnic_clear_rx_mode(), fbnic_clear_rules(), fbnic_rss_disable_hw() and
fbnic_disable(). With this reordering, fbnic_down() has already stopped
host traffic before fbnic_mac_free_irq() is called.
Could the comment be updated to say that this only tears down the MAC/PCS
link interrupt?
> phylink_suspend(fbn->phylink, fbnic_bmc_present(fbn->fbd));
>
> - fbnic_down(fbn);
> -
> fbnic_time_stop(fbn);
> fbnic_fw_xmit_ownership_msg(fbn->fbd, false);
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/179381496288.9644.9775319757787890210.stgit%40ahduyck-xeon-server.home.arpa
next prev parent reply other threads:[~2026-11-08 18:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 17:58 [net PATCH 0/5] fbnic: Fix FW crash restore, stop path and mailbox teardown bugs Alexander Duyck
2026-11-04 17:59 ` [net PATCH 1/5] fbnic: Take the instance lock to restore filters after a FW crash Alexander Duyck
2026-11-04 17:59 ` [net PATCH 2/5] fbnic: Fix service task races with ndo_stop and PM suspend Alexander Duyck
2026-11-08 18:32 ` netdev-bot+sashiko
2026-11-09 16:29 ` Alexander Duyck
2026-11-04 17:59 ` [net PATCH 3/5] fbnic: Disable PTP completions during the Tx force-flush Alexander Duyck
2026-11-08 18:32 ` netdev-bot+sashiko
2026-11-04 17:59 ` [net PATCH 4/5] fbnic: Suspend phylink after taking the datapath down in ndo_stop Alexander Duyck
2026-11-08 18:32 ` netdev-bot+sashiko [this message]
2026-11-04 17:59 ` [net PATCH 5/5] fbnic: Wait for the outbound flush to complete on mailbox teardown Alexander Duyck
2026-11-08 18:32 ` netdev-bot+sashiko
2026-11-09 16:42 ` Alexander Duyck
2026-11-10 20:40 ` [net PATCH 0/5] fbnic: Fix FW crash restore, stop path and mailbox teardown bugs patchwork-bot+netdevbpf
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=179416277370.994134.16129749928882463511@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=alexander.duyck@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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