From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Loktionov, Aleksandr'" <aleksandr.loktionov@intel.com>,
<netdev@vger.kernel.org>
Cc: "'Mengyuan Lou'" <mengyuanlou@net-swift.com>,
"'Andrew Lunn'" <andrew+netdev@lunn.ch>,
"'David S. Miller'" <davem@davemloft.net>,
"'Eric Dumazet'" <edumazet@google.com>,
"'Jakub Kicinski'" <kuba@kernel.org>,
"'Paolo Abeni'" <pabeni@redhat.com>,
"'Richard Cochran'" <richardcochran@gmail.com>,
"'Russell King'" <linux@armlinux.org.uk>,
"'Keller, Jacob E'" <jacob.e.keller@intel.com>,
"'Michal Swiatkowski'" <michal.swiatkowski@linux.intel.com>,
"'Simon Horman'" <horms@kernel.org>,
"'Kees Cook'" <kees@kernel.org>,
"'Zaremba, Larysa'" <larysa.zaremba@intel.com>,
"'Ingo Molnar'" <mingo@kernel.org>, "'Joe Damato'" <joe@dama.to>,
"'Breno Leitao'" <leitao@debian.org>,
"'Uwe Kleine-König (The Capable Hub)'"
<u.kleine-koenig@baylibre.com>,
"'Johannes Berg'" <johannes@sipsolutions.net>,
"'Fabio Baltieri'" <fabio.baltieri@gmail.com>
Subject: RE: [PATCH net-next v4 5/5] net: wangxun: implement pci_error_handlers ops
Date: Tue, 2 Jun 2026 10:28:09 +0800 [thread overview]
Message-ID: <088f01dcf237$73f9dc30$5bed9490$@trustnetic.com> (raw)
In-Reply-To: <IA3PR11MB8986104B1CB7F3582CE9D5D8E5152@IA3PR11MB8986.namprd11.prod.outlook.com>
> > +static void wx_io_resume(struct pci_dev *pdev)
> > +{
> > + struct wx *wx = pci_get_drvdata(pdev);
> > + struct net_device *netdev;
> > + int err;
> > +
> > + netdev = wx->netdev;
> > + rtnl_lock();
> > + if (netif_running(netdev)) {
> > + err = netdev->netdev_ops->ndo_open(netdev);
> > + if (err) {
> > + wx_err(wx, "Failed to open netdev after
> > reset\n");
> If you jump over the netif_device_attach(netdev);
> I'm afraid the interface probably will be UP (IFF_UP set, because netif_running() returned true)
> but permanently "detached" - the kernel's watchdog, TX queue wakeups,
> and carrier-change notifications all check netif_device_present() and
> will silently no-op.
If .ndo_open() fails during recovery, the device has not been successfully
reinitialized and therefore should remain detached.
Calling netif_device_attach() unconditionally would expose an interface whose
queues, interrupts or other resources may not have been restored successfully.
prev parent reply other threads:[~2026-06-02 2:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 7:22 [PATCH net-next v4 0/5] net: wangxun: timeout and error Jiawen Wu
2026-06-01 7:22 ` [PATCH net-next v4 1/5] net: ngbe: implement libwx reset ops Jiawen Wu
2026-06-01 7:22 ` [PATCH net-next v4 2/5] net: wangxun: add Tx timeout process Jiawen Wu
2026-06-01 9:26 ` Loktionov, Aleksandr
2026-06-01 7:22 ` [PATCH net-next v4 3/5] net: wangxun: add reinit parameter to wx->do_reset callback Jiawen Wu
2026-06-01 9:05 ` Loktionov, Aleksandr
2026-06-01 7:22 ` [PATCH net-next v4 4/5] net: wangxun: introduce soft quiesce callbacks for AER recovery Jiawen Wu
2026-06-01 9:32 ` Loktionov, Aleksandr
2026-06-01 9:37 ` Jiawen Wu
2026-06-01 10:09 ` Loktionov, Aleksandr
2026-06-02 2:12 ` Jiawen Wu
2026-06-01 7:22 ` [PATCH net-next v4 5/5] net: wangxun: implement pci_error_handlers ops Jiawen Wu
2026-06-01 9:37 ` Loktionov, Aleksandr
2026-06-02 2:28 ` Jiawen Wu [this message]
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='088f01dcf237$73f9dc30$5bed9490$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fabio.baltieri@gmail.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=joe@dama.to \
--cc=johannes@sipsolutions.net \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=leitao@debian.org \
--cc=linux@armlinux.org.uk \
--cc=mengyuanlou@net-swift.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=u.kleine-koenig@baylibre.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