From: Lukas Wunner <lukas@wunner•de>
To: Thinh Tran <thinhtr@linux•ibm.com>
Cc: netdev@vger•kernel.org, kuba@kernel•org,
anthony.l.nguyen@intel•com, aleksandr.loktionov@intel•com,
przemyslaw.kitszel@intel•com, pmenzel@molgen•mpg.de,
jesse.brandeburg@intel•com, davem@davemloft•net,
edumazet@google•com, pabeni@redhat•com,
intel-wired-lan@lists•osuosl.org, rob.thomas@ibm•com,
Jacob Keller <jacob.e.keller@intel•com>
Subject: Re: [PATCH iwl-net V4,2/2] i40e: Fully suspend and resume IO operations in EEH case
Date: Thu, 7 Aug 2025 06:50:09 +0200 [thread overview]
Message-ID: <aJQwgTbRY59C196Z@wunner.de> (raw)
In-Reply-To: <20240515210705.620-3-thinhtr@linux.ibm.com>
On Wed, May 15, 2024 at 04:07:05PM -0500, Thinh Tran wrote:
> When EEH events occurs, the callback functions in the i40e, which are
> managed by the EEH driver, will completely suspend and resume all IO
> operations.
>
> - In the PCI error detected callback, replaced i40e_prep_for_reset()
> with i40e_io_suspend(). The change is to fully suspend all I/O
> operations
> - In the PCI error slot reset callback, replaced pci_enable_device_mem()
> with pci_enable_device(). This change enables both I/O and memory of
> the device.
> - In the PCI error resume callback, replaced i40e_handle_reset_warning()
> with i40e_io_resume(). This change allows the system to resume I/O
> operations
The above was applied as commit c80b6538d35a.
> @@ -16481,7 +16483,8 @@ static pci_ers_result_t i40e_pci_error_slot_reset(struct pci_dev *pdev)
> u32 reg;
>
> dev_dbg(&pdev->dev, "%s\n", __func__);
> - if (pci_enable_device_mem(pdev)) {
> + /* enable I/O and memory of the device */
> + if (pci_enable_device(pdev)) {
> dev_info(&pdev->dev,
> "Cannot re-enable PCI device after reset.\n");
> result = PCI_ERS_RESULT_DISCONNECT;
Why was this change made?
The driver calls pci_enable_device_mem() in i40e_probe(),
so calling pci_enable_device() here doesn't seem to make any sense.
The difference between pci_enable_device() and pci_enable_device_mem()
is that the former also enables access to the I/O Space of the device.
However I/O Space access is usually not used outside of x86.
And your patch targets powerpc because you seek to support EEH,
a powerpc-specific mechanism.
Unfortunately the commit message is not helpful at all because it
merely lists the code changes in prose form but doesn't explain
the *reason* for the change.
Thanks,
Lukas
prev parent reply other threads:[~2025-08-07 4:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 21:07 [PATCH iwl-net V4,0/2] Fix repeated EEH reports in MSI domain Thinh Tran
2024-05-15 21:07 ` [PATCH iwl-net V4,1/2] i40e: factoring out i40e_suspend/i40e_resume Thinh Tran
2024-05-16 8:50 ` Simon Horman
2024-05-16 19:11 ` [Intel-wired-lan] [PATCH iwl-net V4, 1/2] " Jacob Keller
2024-05-16 21:34 ` Thinh Tran
2024-05-23 17:57 ` Pucha, HimasekharX Reddy
2024-05-15 21:07 ` [PATCH iwl-net V4,2/2] i40e: Fully suspend and resume IO operations in EEH case Thinh Tran
2024-05-16 8:51 ` Simon Horman
2024-05-23 17:59 ` [Intel-wired-lan] [PATCH iwl-net V4, 2/2] " Pucha, HimasekharX Reddy
2025-08-07 4:50 ` Lukas Wunner [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=aJQwgTbRY59C196Z@wunner.de \
--to=lukas@wunner$(echo .)de \
--cc=aleksandr.loktionov@intel$(echo .)com \
--cc=anthony.l.nguyen@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=intel-wired-lan@lists$(echo .)osuosl.org \
--cc=jacob.e.keller@intel$(echo .)com \
--cc=jesse.brandeburg@intel$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=pmenzel@molgen$(echo .)mpg.de \
--cc=przemyslaw.kitszel@intel$(echo .)com \
--cc=rob.thomas@ibm$(echo .)com \
--cc=thinhtr@linux$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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