From: netdev-bot+sashiko@kernel.org
To: dong100@mucse.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, vadim.fedorenko@linux.dev,
u.kleine-koenig@baylibre.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, yaojun@mucse.com
Subject: Re: [PATCH net-next v16 1/5] net: rnpgbe: Add interrupt handling
Date: Wed, 14 Oct 2026 02:59:12 +0000 [thread overview]
Message-ID: <179194675270.434549.14836976664474746215@kernel.org> (raw)
In-Reply-To: <A4AA29A72BA34A26+20261013023025.63622-1-dong100@mucse.com>
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 patch is titled and described as "Add interrupt handling",
but it also changes how the already-merged driver shuts down and is…
--
net: rnpgbe: Add interrupt handling
This commit adds MSI-X interrupt setup and teardown for the rnpgbe driver.
Vector 0 is reserved for the mailbox and the remaining vectors are used for
the data path. Mailbox lock polling now uses a sleepable variant, and a
shared helper sends the firmware powerdown notification from both remove
and shutdown.
> diff --git a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> index 70a2b0082ba86..6022a1a2ddf1e 100644
> --- a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> +++ b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
[ ... ]
> @@ -236,6 +281,26 @@ static int rnpgbe_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> return err;
> }
>
> +/**
> + * rnpgbe_notify_powerdown - Notify firmware that the driver is going down
> + * @mucse: pointer to private structure
> + *
> + * Skip the mailbox access if an earlier shutdown has already disabled the
> + * PCI device.
> + **/
> +static void rnpgbe_notify_powerdown(struct mucse *mucse)
> +{
> + int err;
> +
> + if (!pci_is_enabled(mucse->pdev))
> + return;
[ ... ]
> @@ -272,7 +335,8 @@ static void rnpgbe_remove(struct pci_dev *pdev)
> {
> rnpgbe_rm_adapter(pdev);
> pci_release_mem_regions(pdev);
> - pci_disable_device(pdev);
> + if (pci_is_enabled(pdev))
> + pci_disable_device(pdev);
> }
>
> /**
> @@ -287,9 +351,14 @@ static void rnpgbe_dev_shutdown(struct pci_dev *pdev)
> rtnl_lock();
> netif_device_detach(netdev);
> if (netif_running(netdev))
> - rnpgbe_close(netdev);
> + dev_close(netdev);
> rtnl_unlock();
> - pci_disable_device(pdev);
> +
> + rnpgbe_free_mbx_irq(mucse);
> + rnpgbe_notify_powerdown(mucse);
> + rnpgbe_clear_interrupt_scheme(mucse);
> + if (pci_is_enabled(pdev))
> + pci_disable_device(pdev);
> }
[Severity: Low]
This isn't a bug, but should the commit message cover these teardown
changes? The only related text in the commit message is:
Notify firmware of driver powerdown from both remove and shutdown
through a shared helper.
The patch also changes how the existing teardown code behaves, and the
commit message does not describe these changes:
- rnpgbe_dev_shutdown() now calls dev_close() instead of calling
rnpgbe_close() directly.
- rnpgbe_dev_shutdown() and rnpgbe_remove() now call
pci_disable_device() only when pci_is_enabled() is true.
- rnpgbe_notify_powerdown() skips the mailbox when the device is
already disabled. Its kernel-doc says this is for remove running
after an earlier shutdown.
- Shutdown now sends a firmware powerdown, which the previous
rnpgbe_dev_shutdown() never did. The commit message doesn't say why.
The dev_close() switch looks correct. rnpgbe_close() now calls
rnpgbe_down() and rnpgbe_free_irq(). Calling ndo_stop directly leaves
IFF_UP set, so a later unregister_netdev() would call it again and run
napi_disable() and free_irq() a second time.
Could these changes be explained in the commit message? Another option is
to split them into a separate patch, with a Fixes: tag if they address an
observed problem, so reviewers and backporters can follow them.
This code in rnpgbe_main.c is unchanged through the end of the series
("net: rnpgbe: Add link status handling support"), and no later patch
explains it either.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/3B42BE25B3696EAE%2B20261013022920.63529-1-dong100%40mucse.com
next prev parent reply other threads:[~2026-10-14 2:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 2:29 [PATCH net-next v16 0/5] net: rnpgbe: Add TX/RX and link status support Dong Yibo
2026-10-13 2:30 ` [PATCH net-next v16 1/5] net: rnpgbe: Add interrupt handling Dong Yibo
2026-10-14 2:59 ` netdev-bot+sashiko [this message]
2026-10-13 2:30 ` [PATCH net-next v16 2/5] net: rnpgbe: Add basic TX packet transmission support Dong Yibo
2026-10-14 2:59 ` netdev-bot+sashiko
2026-10-14 5:42 ` Yibo Dong
2026-10-13 2:30 ` [PATCH net-next v16 3/5] net: rnpgbe: Add basic RX data path support Dong Yibo
2026-10-13 2:30 ` [PATCH net-next v16 4/5] net: rnpgbe: Add receive mode support Dong Yibo
2026-10-13 2:31 ` [PATCH net-next v16 5/5] net: rnpgbe: Add link status handling support Dong Yibo
2026-10-14 2:59 ` netdev-bot+sashiko
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=179194675270.434549.14836976664474746215@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dong100@mucse.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=vadim.fedorenko@linux.dev \
--cc=yaojun@mucse.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
all inboxes | Powered by JetHome®