From: Breno Leitao <leitao@debian.org>
To: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: netdev@vger.kernel.org,
"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>,
"Aleksandr Loktionov" <aleksandr.loktionov@intel.com>,
"Jacob Keller" <jacob.e.keller@intel.com>,
"Michal Swiatkowski" <michal.swiatkowski@linux.intel.com>,
"Simon Horman" <horms@kernel.org>, "Kees Cook" <kees@kernel.org>,
"Larysa Zaremba" <larysa.zaremba@intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Thomas Gleixner" <tglx@kernel.org>,
"Rongguang Wei" <weirongguang@kylinos.cn>,
"Uwe Kleine-König (The Capable Hub)"
<u.kleine-koenig@baylibre.com>,
"Fabio Baltieri" <fabio.baltieri@gmail.com>
Subject: Re: [PATCH net-next v9 5/5] net: wangxun: add pcie error handler
Date: Wed, 1 Jul 2026 03:44:34 -0700 [thread overview]
Message-ID: <akTvTF7n9P1lrqCN@gmail.com> (raw)
In-Reply-To: <20260701072357.33984-6-jiawenwu@trustnetic.com>
On Wed, Jul 01, 2026 at 03:23:57PM +0800, Jiawen Wu wrote:
> +static pci_ers_result_t wx_io_slot_reset(struct pci_dev *pdev)
> +{
> + struct wx *wx = pci_get_drvdata(pdev);
> + pci_ers_result_t result;
> +
> + if (pci_enable_device_mem(pdev)) {
> + wx_err(wx, "Cannot re-enable PCI device after reset.\n");
> + result = PCI_ERS_RESULT_DISCONNECT;
> + } else {
> + /* make all memory operations done before clearing the flag */
> + smp_mb__before_atomic();
> + clear_bit(WX_STATE_DISABLED, wx->state);
> + clear_bit(WX_FLAG_NEED_PCIE_RECOVERY, wx->flags);
> + pci_set_master(pdev);
> + pci_restore_state(pdev);
> + pci_wake_from_d3(pdev, false);
> +
> + rtnl_lock();
> + if (netif_running(wx->netdev) && wx->down_suspend)
> + wx->down_suspend(wx);
> + if (wx->do_reset)
> + wx->do_reset(wx->netdev, false);
> + rtnl_unlock();
> + result = PCI_ERS_RESULT_RECOVERED;
> + }
> +
> + pci_aer_clear_nonfatal_status(pdev);
After bfcb79fca19d ("PCI/ERR: Run error recovery callbacks for all
affected devices"), AER errors are always cleared by the PCI core and
drivers don't need to do it themselves.
next prev parent reply other threads:[~2026-07-01 10:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 7:23 [PATCH net-next v9 0/5] net: wangxun: timeout and error Jiawen Wu
2026-07-01 7:23 ` [PATCH net-next v9 1/5] net: ngbe: implement libwx reset ops Jiawen Wu
2026-07-01 7:23 ` [PATCH net-next v9 2/5] net: wangxun: add Tx timeout process Jiawen Wu
2026-07-01 7:23 ` [PATCH net-next v9 3/5] net: wangxun: add reinit parameter to wx->do_reset callback Jiawen Wu
2026-07-01 7:23 ` [PATCH net-next v9 4/5] net: wangxun: implement soft quiesce for PCIe error recovery Jiawen Wu
2026-07-01 7:23 ` [PATCH net-next v9 5/5] net: wangxun: add pcie error handler Jiawen Wu
2026-07-01 10:44 ` Breno Leitao [this message]
2026-07-02 2:35 ` Jiawen Wu
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=akTvTF7n9P1lrqCN@gmail.com \
--to=leitao@debian.org \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fabio.baltieri@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jiawenwu@trustnetic.com \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux@armlinux.org.uk \
--cc=mengyuanlou@net-swift.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=tglx@kernel.org \
--cc=u.kleine-koenig@baylibre.com \
--cc=weirongguang@kylinos.cn \
/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.