Re: [PATCH v8 2/3] PCI/AER: Disable AER service on suspend

2024-04-18 Thread Bjorn Helgaas
On Tue, Apr 16, 2024 at 12:32:24PM +0800, Kai-Heng Feng wrote: > When the power rail gets cut off, the hardware can create some electric > noise on the link that triggers AER. If IRQ is shared between AER with > PME, such AER noise will cause a spurious wakeup on system suspend. > > When the

Re: [PATCH v12 2/8] PCI: dwc: ep: Add Kernel-doc comments for APIs

2024-04-15 Thread Bjorn Helgaas
On Mon, Apr 15, 2024 at 07:30:15PM +0530, Manivannan Sadhasivam wrote: > On Fri, Apr 12, 2024 at 02:58:36PM -0500, Bjorn Helgaas wrote: > > On Wed, Mar 27, 2024 at 02:43:31PM +0530, Manivannan Sadhasivam wrote: > > > All of the APIs are missing the Kernel-doc comment

Re: [PATCH v12 8/8] PCI: endpoint: Remove "core_init_notifier" flag

2024-04-12 Thread Bjorn Helgaas
On Wed, Mar 27, 2024 at 02:43:37PM +0530, Manivannan Sadhasivam wrote: > "core_init_notifier" flag is set by the glue drivers requiring refclk from > the host to complete the DWC core initialization. Also, those drivers will > send a notification to the EPF drivers once the initialization is fully

Re: [PATCH v12 2/8] PCI: dwc: ep: Add Kernel-doc comments for APIs

2024-04-12 Thread Bjorn Helgaas
On Wed, Mar 27, 2024 at 02:43:31PM +0530, Manivannan Sadhasivam wrote: > All of the APIs are missing the Kernel-doc comments. Hence, add them. > + * dw_pcie_ep_reset_bar - Reset endpoint BAR Apparently this resets @bar for every function of the device, so it's not just a single BAR? > + *

Re: [PATCHv3 pci-next 1/2] PCI/AER: correctable error message as KERN_INFO

2024-03-26 Thread Bjorn Helgaas
On Tue, Mar 26, 2024 at 09:39:54AM +0800, Ethan Zhao wrote: > On 3/25/2024 6:15 PM, Xi Ruoyao wrote: > > On Mon, 2024-03-25 at 16:45 +0800, Ethan Zhao wrote: > > > On 3/25/2024 1:19 AM, Xi Ruoyao wrote: > > > > On Mon, 2023-09-18 at 14:39 -0500, Bjorn Helgaas wrote:

Re: [PATCH 3/4] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-03-22 Thread Bjorn Helgaas
On Tue, Feb 06, 2024 at 03:57:16PM +0200, Ilpo Järvinen wrote: > pcie_read_tlp_log() handles only 4 TLP Header Log DWORDs but TLP Prefix > Log (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. s/TLP Header Log/Header Log/ to match spec terminology (also below) > Generalize

Re: [PATCH 2/4] PCI: Generalize TLP Header Log reading

2024-03-14 Thread Bjorn Helgaas
[+cc Greg, Jeff -- ancient history, I know, sorry!] On Tue, Feb 06, 2024 at 03:57:15PM +0200, Ilpo Järvinen wrote: > Both AER and DPC RP PIO provide TLP Header Log registers (PCIe r6.1 > secs 7.8.4 & 7.9.14) to convey error diagnostics but the struct is > named after AER as the struct

Re: [PATCH 0/4] PCI: Consolidate TLP Log reading and printing

2024-03-08 Thread Bjorn Helgaas
On Tue, Feb 06, 2024 at 03:57:13PM +0200, Ilpo Järvinen wrote: > This series consolidates AER & DPC TLP Log handling code. Helpers are > added for reading and printing the TLP Log and the format is made to > include E-E Prefixes in both cases (previously only one DPC RP PIO > displayed the E-E

Re: [PATCH 1/1] PCI/portdrv: Allow DPC if the OS controls AER natively.

2024-02-21 Thread Bjorn Helgaas
[+cc Mahesh, Oliver, linuxppc-dev, since I mentioned powerpc below. Probably not of interest since this is about the ACPI EDR feature, but just FYI] On Wed, Feb 21, 2024 at 05:11:04PM -0600, Bjorn Helgaas wrote: > On Tue, Jan 23, 2024 at 09:59:21AM -0600, Bjorn Helgaas wrote: > > On Mo

Re: [PATCH v2 1/4] PCI/AER: Store more information in aer_err_info

2024-02-06 Thread Bjorn Helgaas
On Wed, Feb 07, 2024 at 12:41:41AM +0800, Wang, Qingshun wrote: > On Mon, Feb 05, 2024 at 05:12:31PM -0600, Bjorn Helgaas wrote: > > On Thu, Jan 25, 2024 at 02:27:59PM +0800, Wang, Qingshun wrote: > > > When Advisory Non-Fatal errors are raised, both correctable and > &g

Re: [PATCH v2 2/4] PCI/AER: Handle Advisory Non-Fatal properly

2024-02-05 Thread Bjorn Helgaas
In the subject, "properly" really doesn't convey information. I think this patch does two things: - Prints error bits that might be ANFE - Clears UNCOR_STATUS bits that were previously not cleared Maybe the subject line could say something about those (clearing UNCOR_STATUS might be more

Re: [PATCH v2 1/4] PCI/AER: Store more information in aer_err_info

2024-02-05 Thread Bjorn Helgaas
On Thu, Jan 25, 2024 at 02:27:59PM +0800, Wang, Qingshun wrote: > When Advisory Non-Fatal errors are raised, both correctable and > uncorrectable error statuses will be set. The current kernel code cannot > store both statuses at the same time, thus failing to handle ANFE properly. > In addition,

Re: [PATCH 1/1] PCI/DPC: Fix TLP Prefix register reading offset

2024-01-22 Thread Bjorn Helgaas
alculation into the config read. Fixes: f20c4ea49ec4 ("PCI/DPC: Add eDPC support") Link: https://lore.kernel.org/r/20240118110815.3867-1-ilpo.jarvi...@linux.intel.com Signed-off-by: Ilpo Järvinen [bhelgaas: add user-visible details to commit log] Signed-off-by: Bjorn

Re: [PATCH 1/1] PCI/DPC: Fix TLP Prefix register reading offset

2024-01-19 Thread Bjorn Helgaas
On Thu, Jan 18, 2024 at 01:08:15PM +0200, Ilpo Järvinen wrote: > The TLP Prefix Log Register consists of multiple DWORDs (PCIe r6.1 sec > 7.9.14.13) but the loop in dpc_process_rp_pio_error() keeps reading > from the first DWORD. Add the iteration count based offset calculation > into the config

[PATCH 7/8] powerpc: Fix typos

2024-01-03 Thread Bjorn Helgaas
From: Bjorn Helgaas Fix typos, most reported by "codespell arch/powerpc". Only touches comments, no code changes. Signed-off-by: Bjorn Helgaas Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/boot/Makefile | 4 ++-- ar

Re: [PATCH 2/3] PCI/AER: Decode Requester ID when no error info found

2024-01-02 Thread Bjorn Helgaas
On Tue, Jan 02, 2024 at 11:22:53AM -0800, Kuppuswamy Sathyanarayanan wrote: > On 12/6/2023 2:42 PM, Bjorn Helgaas wrote: > > From: Bjorn Helgaas > > > > When a device with AER detects an error, it logs error information in its > > own AER Error Status registers. I

Re: [PATCH 1/3] PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors

2023-12-12 Thread Bjorn Helgaas
On Tue, Dec 12, 2023 at 09:00:24AM -0600, Terry Bowman wrote: > Hi Bjorn, > > Will help prevent confusion. LGTM. Thanks a lot for taking a look at these! I'd like to give you credit in the log, e.g., "Reviewed-by: Terry Bowman ", but I'm OCD enough that I don't want to translate "LGTM" into

Re: [PATCH 0/3] PCI/AER: Clean up logging

2023-12-08 Thread Bjorn Helgaas
[+cc Jonathan] On Wed, Dec 06, 2023 at 04:42:28PM -0600, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Clean up some minor AER logging issues: > > - Log as "Correctable errors", not "Corrected errors" > > - Decode the Requester ID when we c

[PATCH 3/3] PCI/AER: Use explicit register sizes for struct members

2023-12-06 Thread Bjorn Helgaas
From: Bjorn Helgaas aer_irq() reads the AER Root Error Status and Error Source Identification (PCI_ERR_ROOT_STATUS and PCI_ERR_ROOT_ERR_SRC) registers directly into struct aer_err_source. Both registers are 32 bits, so declare the members explicitly as "u32" instead of &qu

[PATCH 2/3] PCI/AER: Decode Requester ID when no error info found

2023-12-06 Thread Bjorn Helgaas
From: Bjorn Helgaas When a device with AER detects an error, it logs error information in its own AER Error Status registers. It may send an Error Message to the Root Port (RCEC in the case of an RCiEP), which logs the fact that an Error Message was received (Root Error Status

[PATCH 1/3] PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors

2023-12-06 Thread Bjorn Helgaas
From: Bjorn Helgaas The PCIe spec classifies errors as either "Correctable" or "Uncorrectable". Previously we printed these as "Corrected" or "Uncorrected". To avoid confusion, use the same terms as the spec. One confusing situation is when one a

[PATCH 0/3] PCI/AER: Clean up logging

2023-12-06 Thread Bjorn Helgaas
From: Bjorn Helgaas Clean up some minor AER logging issues: - Log as "Correctable errors", not "Corrected errors" - Decode the Requester ID when we couldn't find detail error info Bjorn Helgaas (3): PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for erro

Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals

2023-12-01 Thread Bjorn Helgaas
[+cc scsi, powerpc folks] On Fri, Dec 01, 2023 at 02:44:47PM -0600, Bjorn Helgaas wrote: > On Fri, Nov 24, 2023 at 11:09:13AM +0200, Ilpo Järvinen wrote: > > Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines. > > > > Signed-off-by: Ilpo Järvinen > > Appli

Re: [pci:controller/xilinx-xdma] BUILD REGRESSION 8d786149d78c7784144c7179e25134b6530b714b

2023-10-31 Thread Bjorn Helgaas
On Tue, Oct 31, 2023 at 09:59:29AM -0700, Nick Desaulniers wrote: > On Tue, Oct 31, 2023 at 7:56 AM Bjorn Helgaas wrote: > > On Sat, Oct 28, 2023 at 08:22:54PM +0800, kernel test robot wrote: > > > tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git >

Re: [linux-next:master] BUILD REGRESSION c503e3eec382ac708ee7adf874add37b77c5d312

2023-10-31 Thread Bjorn Helgaas
On Tue, Oct 31, 2023 at 04:35:23AM +0800, kernel test robot wrote: > tree/branch: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > branch HEAD: c503e3eec382ac708ee7adf874add37b77c5d312 Add linux-next > specific files for 20231030 > > Error/Warning reports: > ...

Re: [pci:controller/xilinx-xdma] BUILD REGRESSION 8d786149d78c7784144c7179e25134b6530b714b

2023-10-31 Thread Bjorn Helgaas
[+cc powerpc, clang folks] On Sat, Oct 28, 2023 at 08:22:54PM +0800, kernel test robot wrote: > tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git > controller/xilinx-xdma > branch HEAD: 8d786149d78c7784144c7179e25134b6530b714b PCI: xilinx-xdma: Add > Xilinx XDMA Root

Re: [PATCH v6 1/3] PCI/AER: Factor out interrupt toggling into helpers

2023-10-25 Thread Bjorn Helgaas
On Fri, May 12, 2023 at 08:00:12AM +0800, Kai-Heng Feng wrote: > There are many places that enable and disable AER interrupt, so move > them into helpers. > > Reviewed-by: Mika Westerberg > Reviewed-by: Kuppuswamy Sathyanarayanan > > Reviewed-by: Jonathan Cameron > Signed-off-by: Kai-Heng

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Bjorn Helgaas
On Mon, Oct 16, 2023 at 12:11:04PM -0400, Frank Li wrote: > On Mon, Oct 16, 2023 at 10:22:11AM -0500, Bjorn Helgaas wrote: > > Obviously Lorenzo *could* edit all your subject lines on your behalf, > > but it makes everybody's life easier if people look at the existing >

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Bjorn Helgaas
imes. But not sure which one violate the > guide? > > @Bjorn Helgaas. How do you think so? Since Lorenzo didn't point out anything specific in the patch itself, I think he was probably referring to the subject line and this advice: - Follow the existing convention, i.e., run "git log

Re: [PATCH 0/3] PCI: PCI_HEADER_TYPE bugfix & cleanups

2023-10-03 Thread Bjorn Helgaas
On Tue, Oct 03, 2023 at 03:52:57PM +0300, Ilpo Järvinen wrote: > One bugfix and cleanups for PCI_HEADER_TYPE_* literals. > > This series only covers what's within drivers/pci/. I'd have patches > for other subsystems too but I decided to wait with them until > PCI_HEADER_TYPE_MFD is in Linus'

Re: Questions: Should kernel panic when PCIe fatal error occurs?

2023-09-26 Thread Bjorn Helgaas
On Fri, Sep 22, 2023 at 10:46:36AM +0800, Shuai Xue wrote: > ... > Actually, this is a question from my colleague from firmware team. > The original question is that: > > "Should I set CPER_SEV_FATAL for Generic Error Status Block when a > PCIe fatal error is detected? If set, kernel

Re: Questions: Should kernel panic when PCIe fatal error occurs?

2023-09-21 Thread Bjorn Helgaas
On Thu, Sep 21, 2023 at 08:10:19PM +0800, Shuai Xue wrote: > On 2023/9/21 07:02, Bjorn Helgaas wrote: > > On Mon, Sep 18, 2023 at 05:39:58PM +0800, Shuai Xue wrote: > ... > > I guess your point is that for CPER_SEV_FATAL errors, the APEI/GHES > > path always panics but th

Re: Questions: Should kernel panic when PCIe fatal error occurs?

2023-09-20 Thread Bjorn Helgaas
On Mon, Sep 18, 2023 at 05:39:58PM +0800, Shuai Xue wrote: > Hi, all folks, > > Error reporting and recovery are one of the important features of PCIe, and > the kernel has been supporting them since version 2.6, 17 years ago. > I am very curious about the expected behavior of the software. > I

Re: [PATCHv3 pci-next 1/2] PCI/AER: correctable error message as KERN_INFO

2023-09-18 Thread Bjorn Helgaas
On Mon, Sep 18, 2023 at 07:42:30PM +0800, Xi Ruoyao wrote: > ... > My workstation suffers from too much correctable AER reporting as well > (related to Intel's errata "RPL013: Incorrectly Formed PCIe Packets May > Generate Correctable Errors" and/or the motherboard design, I guess). We should

Re: [PATCH v6 2/3] PCI/AER: Disable AER interrupt on suspend

2023-08-10 Thread Bjorn Helgaas
On Thu, Aug 10, 2023 at 04:17:21PM +0800, Kai-Heng Feng wrote: > On Thu, Aug 10, 2023 at 2:52 AM Bjorn Helgaas wrote: > > On Fri, Jul 21, 2023 at 11:58:24AM +0800, Kai-Heng Feng wrote: > > > On Tue, Jul 18, 2023 at 7:17 PM Bjorn Helgaas wrote: > > > > On Fri, Ma

Re: [PATCH v6 2/3] PCI/AER: Disable AER interrupt on suspend

2023-08-09 Thread Bjorn Helgaas
On Fri, Jul 21, 2023 at 11:58:24AM +0800, Kai-Heng Feng wrote: > On Tue, Jul 18, 2023 at 7:17 PM Bjorn Helgaas wrote: > > On Fri, May 12, 2023 at 08:00:13AM +0800, Kai-Heng Feng wrote: > > > PCIe services that share an IRQ with PME, such as AER or DPC, > > > may cause

Re: [PATCH v2 1/2] PCI: Add pci_find_next_dvsec_capability to find next Designated VSEC

2023-08-08 Thread Bjorn Helgaas
Don't re-post just for this, but if you do repost, add "()" after the function name in the subject line, as you did for the 2/2 patch. On Tue, Aug 08, 2023 at 12:08:57PM +0800, Xiongfeng Wang wrote: > Some devices may have several DVSEC (Designated Vendor-Specific Extended > Capability) entries

Re: [PATCH 1/2] PCI: Add pci_find_next_dvsec_capability to find next designated VSEC

2023-08-07 Thread Bjorn Helgaas
ome devices may have several DVSEC(Designated Vendor-Specific Extended > Capability) entries with the same DVSEC ID. Add > pci_find_next_dvsec_capability() to find them all. Add space between "DVSEC" and "(Designated ...)". > Signed-off-by: Xiongfeng Wang Acked-by:

Re: [PATCH v7 2/2] PCI: rpaphp: Error out on busy status from get-sensor-state

2023-08-01 Thread Bjorn Helgaas
very state, and take > actions based on RTAS return status. This way EEH handler will not be > blocked on rpaphp_get_sensor_state() and can immediately notify driver > about the PCI error and stop any active operations. > > In normal cases (non-EEH case) rpaphp_get_sensor_state() will continue

Re: [PATCH v6 2/3] PCI/AER: Disable AER interrupt on suspend

2023-07-18 Thread Bjorn Helgaas
[+cc Rafael] On Fri, May 12, 2023 at 08:00:13AM +0800, Kai-Heng Feng wrote: > PCIe services that share an IRQ with PME, such as AER or DPC, may cause a > spurious wakeup on system suspend. To prevent this, disable the AER interrupt > notification during the system suspend process. I see that in

Re: [PATCH 0/2] PCI/AER: Remove/unexport error reporting enable/disable

2023-07-13 Thread Bjorn Helgaas
On Mon, Jul 10, 2023 at 06:21:34PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > pci_disable_pcie_error_reporting() is unused; remove it. > pci_enable_pcie_error_reporting() is used only inside aer.c; make it > static. > > Bjorn Helgaas (2): >

[PATCH 2/2] PCI/AER: Unexport pci_enable_pcie_error_reporting()

2023-07-10 Thread Bjorn Helgaas
From: Bjorn Helgaas pci_enable_pcie_error_reporting() is used only inside aer.c. Stop exposing it outside the file. Signed-off-by: Bjorn Helgaas --- drivers/pci/pcie/aer.c | 3 +-- include/linux/aer.h| 6 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/pci

[PATCH 1/2] PCI/AER: Drop unused pci_disable_pcie_error_reporting()

2023-07-10 Thread Bjorn Helgaas
From: Bjorn Helgaas pci_disable_pcie_error_reporting() has no callers. Remove it. Signed-off-by: Bjorn Helgaas --- drivers/pci/pcie/aer.c | 12 include/linux/aer.h| 5 - 2 files changed, 17 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index

[PATCH 0/2] PCI/AER: Remove/unexport error reporting enable/disable

2023-07-10 Thread Bjorn Helgaas
From: Bjorn Helgaas pci_disable_pcie_error_reporting() is unused; remove it. pci_enable_pcie_error_reporting() is used only inside aer.c; make it static. Bjorn Helgaas (2): PCI/AER: Drop unused pci_disable_pcie_error_reporting() PCI/AER: Unexport pci_enable_pcie_error_reporting() drivers

Re: [PATCH v9 00/14] pci: Work around ASMedia ASM2824 PCIe link training failures

2023-06-16 Thread Bjorn Helgaas
On Fri, Jun 16, 2023 at 01:27:52PM +0100, Maciej W. Rozycki wrote: > On Thu, 15 Jun 2023, Bjorn Helgaas wrote: > As per my earlier remark: > > > I think making a system halfway-fixed would make little sense, but with > > the actual fix actually made last as you sugge

Re: [PATCH v9 00/14] pci: Work around ASMedia ASM2824 PCIe link training failures

2023-06-15 Thread Bjorn Helgaas
On Thu, Jun 15, 2023 at 01:41:10AM +0100, Maciej W. Rozycki wrote: > On Wed, 14 Jun 2023, Bjorn Helgaas wrote: > > > > This is v9 of the change to work around a PCIe link training phenomenon > > > where a pair of devices both capable of operating at a link speed ab

Re: [PATCH v9 00/14] pci: Work around ASMedia ASM2824 PCIe link training failures

2023-06-14 Thread Bjorn Helgaas
On Sun, Jun 11, 2023 at 06:19:08PM +0100, Maciej W. Rozycki wrote: > Hi, > > This is v9 of the change to work around a PCIe link training phenomenon > where a pair of devices both capable of operating at a link speed above > 2.5GT/s seems unable to negotiate the link speed and continues

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-05-30 Thread Bjorn Helgaas
On Fri, May 12, 2023 at 02:48:51PM -0500, Bjorn Helgaas wrote: > On Fri, May 12, 2023 at 01:56:29PM +0300, Andy Shevchenko wrote: > > On Tue, May 09, 2023 at 01:21:22PM -0500, Bjorn Helgaas wrote: > > > On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > >

Re: [PATCH v4 22/23] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-05-25 Thread Bjorn Helgaas
On Thu, May 25, 2023 at 11:29:58PM +0200, Robert Richter wrote: > eOn 24.05.23 16:32:35, Bjorn Helgaas wrote: > > On Tue, May 23, 2023 at 06:22:13PM -0500, Terry Bowman wrote: > > > From: Robert Richter > > > > > > In Restricted CXL Device (RCD) mode a CXL

Re: [PATCH v4 22/23] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-05-24 Thread Bjorn Helgaas
ndler. > > [1] CXL 3.0 spec, 12.2.1.1 RCH Downstream Port-detected Errors > [2] CXL 3.0 spec, 8.1.3 PCIe DVSEC for CXL Devices > > Co-developed-by: Terry Bowman > Signed-off-by: Terry Bowman > Signed-off-by: Robert Richter > Cc: "Oliver O'Halloran" > Cc: Bjorn

Re: [PATCHv2 pci-next 2/2] PCI/AER: Rate limit the reporting of the correctable errors

2023-05-17 Thread Bjorn Helgaas
On Fri, Apr 07, 2023 at 04:46:03PM -0700, Grant Grundler wrote: > On Fri, Apr 7, 2023 at 12:46 PM Bjorn Helgaas wrote: > > On Fri, Apr 07, 2023 at 11:53:27AM -0700, Grant Grundler wrote: > > > On Thu, Apr 6, 2023 at 12:50 PM Bjorn Helgaas > > wrote: > > > >

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-05-12 Thread Bjorn Helgaas
On Fri, May 12, 2023 at 01:56:29PM +0300, Andy Shevchenko wrote: > On Tue, May 09, 2023 at 01:21:22PM -0500, Bjorn Helgaas wrote: > > On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > > > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > > &g

Re: [EXT] Re: [PATCH v2 1/1] PCI: layerscape: Add the endpoint linkup notifier support

2023-05-09 Thread Bjorn Helgaas
On Mon, May 08, 2023 at 09:45:59PM +, Frank Li wrote: > > > > Subject: [EXT] Re: [PATCH v2 1/1] PCI: layerscape: Add the endpoint > > linkup > > > > notifier support > > > > All these quoted headers are redundant clutter since we've already > > seen them when Manivannan sent his comments. It

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-05-09 Thread Bjorn Helgaas
On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > > Provide two new helper macros to iterate over PCI device resources and > > convert users. > Applied 2-7 to pci/resource for v6.4, tha

Re: [EXT] Re: [PATCH v2 1/1] PCI: layerscape: Add the endpoint linkup notifier support

2023-05-08 Thread Bjorn Helgaas
On Mon, May 08, 2023 at 01:31:26PM +, Frank Li wrote: > > -Original Message- > > From: Manivannan Sadhasivam > > Sent: Saturday, May 6, 2023 2:59 AM > > To: Frank Li > > Cc: M.H. Lian ; Mingkai Hu > > ; Roy Zang ; Lorenzo Pieralisi > > ; Rob

Re: [PATCH v4 2/3] PCI/AER: Disable AER interrupt on suspend

2023-05-05 Thread Bjorn Helgaas
On Mon, Apr 24, 2023 at 01:52:48PM +0800, Kai-Heng Feng wrote: > PCIe service that shares IRQ with PME may cause spurious wakeup on > system suspend. > > PCIe Base Spec 5.0, section 5.2 "Link State Power Management" states > that TLP and DLLP transmission is disabled for a Link in L2/L3 Ready >

Re: [PATCH v8 2/7] PCI: Export PCI link retrain timeout

2023-05-04 Thread Bjorn Helgaas
On Thu, Apr 06, 2023 at 01:21:09AM +0100, Maciej W. Rozycki wrote: > Rename LINK_RETRAIN_TIMEOUT to PCIE_LINK_RETRAIN_TIMEOUT and make it > available via "pci.h" for PCI drivers to use. > +#define PCIE_LINK_RETRAIN_TIMEOUT HZ This is basically just a rename and move, but since we're touching it

Re: [PATCH v8 7/7] PCI: Work around PCIe link training failures

2023-05-04 Thread Bjorn Helgaas
On Thu, Apr 06, 2023 at 01:21:31AM +0100, Maciej W. Rozycki wrote: > Attempt to handle cases such as with a downstream port of the ASMedia > ASM2824 PCIe switch where link training never completes and the link > continues switching between speeds indefinitely with the data link layer > never

Re: [PATCH 1/1] PCI: layerscape: Add the endpoint linkup notifier support

2023-04-28 Thread Bjorn Helgaas
On Thu, Apr 20, 2023 at 06:11:17PM -0400, Frank Li wrote: > Layerscape has PME interrupt, which can be use as linkup notifer. > Set CFG_READY bit when linkup detected. s/use/used/ s/notifer/notifier/ > +/* PEX PFa PCIE pme and message interrupt registers*/ s/pme/PME/ to match other usage and

Re: [PATCH] PCI: Use of_property_present() for testing DT property presence

2023-04-18 Thread Bjorn Helgaas
On Fri, Mar 10, 2023 at 08:47:19AM -0600, Rob Herring wrote: > It is preferred to use typed property access functions (i.e. > of_property_read_ functions) rather than low-level > of_get_property/of_find_property functions for reading properties. As > part of this, convert

Re: [PATCH v3 6/6] PCI/AER: Unmask RCEC internal errors to enable RCH downstream port error handling

2023-04-14 Thread Bjorn Helgaas
On Thu, Apr 13, 2023 at 03:38:07PM +0200, Robert Richter wrote: > On 12.04.23 16:29:01, Bjorn Helgaas wrote: > > On Tue, Apr 11, 2023 at 01:03:02PM -0500, Terry Bowman wrote: > > > From: Robert Richter > > > > > > RCEC AER corrected and uncorrectable internal

Re: [PATCH v3 5/6] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-04-14 Thread Bjorn Helgaas
On Thu, Apr 13, 2023 at 01:40:52PM +0200, Robert Richter wrote: > On 12.04.23 17:02:33, Bjorn Helgaas wrote: > > On Tue, Apr 11, 2023 at 01:03:01PM -0500, Terry Bowman wrote: > > > From: Robert Richter > ... > Let's assume just a simple CXL RCH topo

Re: [PATCH v3 5/6] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-04-12 Thread Bjorn Helgaas
rmware and queues it for recovery via pcie_do_recovery(). What if you had a CXL module that knew how to look for the CXL error status, package it up similarly, and queue it via aer_recover_queue()? > [1] CXL 3.0 spec, 12.2.1.1 RCH Downstream Port-detected Errors > [2] CXL 3.0 spec, 8.1.3 P

Re: [PATCH v3 6/6] PCI/AER: Unmask RCEC internal errors to enable RCH downstream port error handling

2023-04-12 Thread Bjorn Helgaas
Register, > 7.8.4.6 Correctable Error Mask Register > > Co-developed-by: Terry Bowman > Signed-off-by: Robert Richter > Signed-off-by: Terry Bowman > Cc: "Oliver O'Halloran" > Cc: Bjorn Helgaas > Cc: Mahesh J Salgaonkar > Cc: linuxppc-dev@l

Re: [PATCHv2 pci-next 2/2] PCI/AER: Rate limit the reporting of the correctable errors

2023-04-07 Thread Bjorn Helgaas
On Fri, Apr 07, 2023 at 11:53:27AM -0700, Grant Grundler wrote: > On Thu, Apr 6, 2023 at 12:50 PM Bjorn Helgaas wrote: > > On Fri, Mar 17, 2023 at 10:51:09AM -0700, Grant Grundler wrote: > > > From: Rajat Khandelwal > > > > > > There are many instances where

Re: [PATCHv2 pci-next 2/2] PCI/AER: Rate limit the reporting of the correctable errors

2023-04-06 Thread Bjorn Helgaas
On Fri, Mar 17, 2023 at 10:51:09AM -0700, Grant Grundler wrote: > From: Rajat Khandelwal > > There are many instances where correctable errors tend to inundate > the message buffer. We observe such instances during thunderbolt PCIe > tunneling. > > It's true that they are mitigated by the

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-04-05 Thread Bjorn Helgaas
On Wed, Apr 05, 2023 at 11:28:27AM +0300, Andy Shevchenko wrote: > On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > > > Provide two new helper macros to iterate over PCI device resources and &

Re: [PATCH v8 5/7] PCI: Allow pci_bus_for_each_resource() to take less arguments

2023-04-05 Thread Bjorn Helgaas
On Wed, Apr 05, 2023 at 02:50:47PM +0300, Andy Shevchenko wrote: > On Thu, Mar 30, 2023 at 07:24:32PM +0300, Andy Shevchenko wrote: > > Refactor pci_bus_for_each_resource() in the same way as it's done in > > pci_dev_for_each_resource() case. This will allow to hide iterator > > inside the loop,

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-04-04 Thread Bjorn Helgaas
On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > Provide two new helper macros to iterate over PCI device resources and > convert users. > > Looking at it, refactor existing pci_bus_for_each_resource() and convert > users accordingly. > > Note, the amount of lines grew due to

Re: [PATCH v2 4/5] cxl/pci: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-03-28 Thread Bjorn Helgaas
[+cc linux-pci, more error handling folks; beginning of thread at https://lore.kernel.org/all/20230323213808.398039-1-terry.bow...@amd.com/] On Mon, Mar 27, 2023 at 11:51:39PM +0200, Robert Richter wrote: > On 24.03.23 17:36:56, Bjorn Helgaas wrote: > > > The CXL d

Re: [PATCH v6 1/4] PCI: Introduce pci_dev_for_each_resource()

2023-03-23 Thread Bjorn Helgaas
On Thu, Mar 23, 2023 at 04:30:01PM +0200, Andy Shevchenko wrote: > On Wed, Mar 22, 2023 at 02:28:04PM -0500, Bjorn Helgaas wrote: > > On Mon, Mar 20, 2023 at 03:16:30PM +0200, Andy Shevchenko wrote: > ... > > > > + pci_dev_for_each_resource_p(dev, r) { > > >

Re: [PATCH v6 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource()

2023-03-22 Thread Bjorn Helgaas
On Mon, Mar 20, 2023 at 03:16:31PM +0200, Andy Shevchenko wrote: > ... > -#define pci_bus_for_each_resource(bus, res, i) > \ > - for (i = 0; \ > - (res = pci_bus_resource_n(bus, i)) || i <

Re: [PATCH v6 1/4] PCI: Introduce pci_dev_for_each_resource()

2023-03-22 Thread Bjorn Helgaas
Hi Andy and Mika, I really like the improvements here. They make the code read much better. On Mon, Mar 20, 2023 at 03:16:30PM +0200, Andy Shevchenko wrote: > From: Mika Westerberg > ... > static void fixup_winbond_82c105(struct pci_dev* dev) > { > - int i; > + struct resource *r; >

Re: [PATCHv2 pci-next 1/2] PCI/AER: correctable error message as KERN_INFO

2023-03-17 Thread Bjorn Helgaas
On Fri, Mar 17, 2023 at 11:50:22AM -0700, Sathyanarayanan Kuppuswamy wrote: > On 3/17/23 10:51 AM, Grant Grundler wrote: > > Since correctable errors have been corrected (and counted), the dmesg output > > should not be reported as a warning, but rather as "informational". > > > > Otherwise,

Re: [PATCH v3 4/9] scsi: lpfc: Change to use pci_aer_clear_uncorrect_error_status()

2023-03-15 Thread Bjorn Helgaas
On Tue, Dec 06, 2022 at 04:13:35PM -0600, Bjorn Helgaas wrote: > On Wed, Sep 28, 2022 at 06:59:41PM +0800, Zhuo Chen wrote: > > lpfc_aer_cleanup_state() requires clearing both fatal and non-fatal > > uncorrectable error status. > > I don't know what the point of lpfc_aer_cle

Re: [PATCH v3 3/9] NTB: Remove pci_aer_clear_nonfatal_status() call

2023-03-15 Thread Bjorn Helgaas
On Wed, Sep 28, 2022 at 06:59:40PM +0800, Zhuo Chen wrote: > There is no need to clear error status during init code, so remove it. > > Signed-off-by: Zhuo Chen Can you send this to the NTB folks? It doesn't depend on anything, so no real reason to merge via the PCI tree. To help reviewers,

Re: [PATCH v3 1/9] PCI/AER: Add pci_aer_clear_uncorrect_error_status() to PCI core

2023-03-15 Thread Bjorn Helgaas
On Wed, Sep 28, 2022 at 06:59:38PM +0800, Zhuo Chen wrote: > In lpfc_aer_cleanup_state(), uncorrectable error status needs to be > cleared, which can be done by calling pci_aer_clear_nonfatal_status() > and pci_aer_clear_fatal_status(). Meanwhile they can be combined in > one function (the same in

Re: [PATCH 1/1] PCI: layerscape: Add the workaround for A-010305

2023-03-14 Thread Bjorn Helgaas
On Thu, Jan 12, 2023 at 02:44:33PM -0500, Frank Li wrote: > From: Xiaowei Bao > > When a link down or hot reset event occurs, the PCI Express EP > controller's Link Capabilities Register should retain the values of > the Maximum Link Width and Supported Link Speed configured by RCW. Can you

Re: [PATCH] PCI/AER: correctable error message as KERN_INFO

2023-03-14 Thread Bjorn Helgaas
On Tue, Feb 28, 2023 at 10:04:53PM -0800, Grant Grundler wrote: > Since correctable errors have been corrected (and counted), the dmesg output > should not be reported as a warning, but rather as "informational". > > Otherwise, using a certain well known vendor's PCIe parts in a USB4 docking >

Re: [PATCH] PCI/AER: correctable error message as KERN_INFO

2023-03-08 Thread Bjorn Helgaas
On Wed, Mar 08, 2023 at 12:00:48PM -0800, Grant Grundler wrote: > Ping? Did I miss an email or other work that this patch collides with? Nope, we typically make topic branches based on -rc1, so not much happens during the merge window. -rc1 was tagged Sunday, so things will start appearing in

Re: [PATCH RFC] PCI/AER: Enable internal AER errors by default

2023-02-13 Thread Bjorn Helgaas
l the errors we can, but I'm a little wary if the spec authors thought it was important to mask these by default. > [1] > https://lore.kernel.org/all/167604864163.2392965.5102660329807283871.stgit@djiang5-mobl3.local/ > > Cc: Bjorn Helgaas > Cc: Jonathan Cameron > Cc: Dan Willi

Re: [External] : [PATCH v3 1/1] PCI: layerscape: Add EP mode support for ls1028a

2023-02-10 Thread Bjorn Helgaas
On Fri, Feb 10, 2023 at 11:51:46PM +0530, ALOK TIWARI wrote: > LGTM, Thanks a lot for looking at this! In the Linux world, "LGTM" is not something a maintainer can really act on. If you respond with a "Reviewed-by" tag as described here:

Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a

2023-02-08 Thread Bjorn Helgaas
On Tue, Feb 07, 2023 at 04:20:21PM +, Frank Li wrote: > > Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP > > mode support for ls1028a > > > > { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, > > + { .compatible = "fsl,ls1028a-pcie-ep",

Re: [PATCH V2] PCI/AER: Configure ECRC only AER is native

2023-01-12 Thread Bjorn Helgaas
On Thu, Jan 12, 2023 at 12:51:11PM +0530, Vidya Sagar wrote: > As the ECRC configuration bits are part of AER registers, configure > ECRC only if AER is natively owned by the kernel. > > Signed-off-by: Vidya Sagar Applied to pci/aer for v6.3, thanks! > --- > v2: > * Updated

Re: [PATCH V1] PCI/AER: Configure ECRC only AER is native

2023-01-12 Thread Bjorn Helgaas
On Wed, Jan 11, 2023 at 03:27:51PM -0800, Sathyanarayanan Kuppuswamy wrote: > On 1/11/23 3:10 PM, Bjorn Helgaas wrote: > > On Wed, Jan 11, 2023 at 01:42:21PM -0800, Sathyanarayanan Kuppuswamy wrote: > >> On 1/11/23 12:31 PM, Vidya Sagar wrote: > >>> As the ECRC conf

Re: [PATCH V1] PCI/AER: Configure ECRC only AER is native

2023-01-11 Thread Bjorn Helgaas
On Wed, Jan 11, 2023 at 01:42:21PM -0800, Sathyanarayanan Kuppuswamy wrote: > On 1/11/23 12:31 PM, Vidya Sagar wrote: > > As the ECRC configuration bits are part of AER registers, configure > > ECRC only if AER is natively owned by the kernel. > > ecrc command line option takes "bios/on/off" as

Re: [PATCH net-next 2/7] PCI: Remove PCI IDs used by the Sun Cassini driver

2023-01-10 Thread Bjorn Helgaas
On Fri, Jan 06, 2023 at 02:00:15PM -0800, Anirudh Venkataramanan wrote: > The previous patch removed the Cassini driver (drivers/net/ethernet/sun). > With this, PCI_DEVICE_ID_NS_SATURN and PCI_DEVICE_ID_SUN_CASSINI are > unused. Remove them. > > Cc: Leon Romanovsky > Signed-off-by: Anirudh

Re: [PATCH] PCI/AER: Rate limit the reporting of the correctable errors

2023-01-03 Thread Bjorn Helgaas
[+cc Paul, Sasha, Leon, Frederick] (Please cc folks who have commented on previous versions of your patch.) On Tue, Jan 03, 2023 at 10:25:48PM +0530, Rajat Khandelwal wrote: > There are many instances where correctable errors tend to inundate > the message buffer. We observe such instances

Re: [PATCH v3 4/9] scsi: lpfc: Change to use pci_aer_clear_uncorrect_error_status()

2022-12-06 Thread Bjorn Helgaas
[moved James, Dick, LPFC supporters to "to"] On Wed, Sep 28, 2022 at 06:59:41PM +0800, Zhuo Chen wrote: > lpfc_aer_cleanup_state() requires clearing both fatal and non-fatal > uncorrectable error status. I don't know what the point of lpfc_aer_cleanup_state() is. AER errors should be handled

Re: [PATCH v3 8/9] PCI/ERR: Clear fatal error status when pci_channel_io_frozen

2022-12-06 Thread Bjorn Helgaas
Hi Zhuo, On Wed, Sep 28, 2022 at 06:59:45PM +0800, Zhuo Chen wrote: > When state is pci_channel_io_frozen in pcie_do_recovery(), the > severity is fatal and fatal error status should be cleared. > So add pci_aer_clear_fatal_status(). > > Signed-off-by: Zhuo Chen > --- > drivers/pci/pcie/err.c

Re: [PATCH v3 3/9] NTB: Remove pci_aer_clear_nonfatal_status() call

2022-12-06 Thread Bjorn Helgaas
On Wed, Sep 28, 2022 at 02:03:55PM +0300, Serge Semin wrote: > On Wed, Sep 28, 2022 at 06:59:40PM +0800, Zhuo Chen wrote: > > There is no need to clear error status during init code, so remove it. > > Why do you think there isn't? Justify in more details. Thanks for taking a look, Sergey! I

[PATCH] cxl: Remove unnecessary cxl_pci_window_alignment()

2022-12-05 Thread Bjorn Helgaas
From: Bjorn Helgaas cxl_pci_window_alignment() is referenced only via the struct pci_controller_ops.window_alignment function pointer, and only in the powerpc implementation of pcibios_window_alignment(). pcibios_window_alignment() defaults to returning 1 if the function pointer is NULL, which

Re: [patch 01/39] PCI/MSI: Check for MSI enabled in __pci_msix_enable()

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:15PM +0100, Thomas Gleixner wrote: > PCI/MSI and PCI/MSI-X are mutually exclusive, but the MSI-X enable code > lacks a check for already enabled MSI. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.c |

Re: [patch 28/39] PCI/MSI: Move pci_irq_get_affinity() to api.c

2022-11-16 Thread Bjorn Helgaas
rest of the > file. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas One nit below. > --- > drivers/pci/msi/api.c | 43 +++ > drivers/pci/msi/msi.c | 38 -- &

Re: [patch 37/39] PCI/MSI: Remove redundant msi_check() callback

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:14PM +0100, Thomas Gleixner wrote: > All these sanity checks are now done _before_ any allocation work > happens. No point in doing it twice. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/

Re: [patch 36/39] PCI/MSI: Validate MSIX contiguous restriction early

2022-11-16 Thread Bjorn Helgaas
; Just do it right away before doing any other work along with the other > sanity checks on that array. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas s/indicies/indices/ (commit log) s/irqdomain/irq domain/? IIRC previous logs used "irq domain" s/MSIX/MSI-X/ (sub

Re: [patch 35/39] PCI/MSI: Reject MSI-X early

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:11PM +0100, Thomas Gleixner wrote: > Similar to PCI multi-MSI reject MSI-X enablement when a irq domain is > attached to the device which does not support MSI-X. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pc

Re: [patch 34/39] PCI/MSI: Reject multi-MSI early

2022-11-16 Thread Bjorn Helgaas
ed which has the feature flag set > > DENY_LEGACY returns only true when: > - there is a irq domain attached which has the feature flag set > > This allows to use the function universally without ifdeffery in the > calling code. > > Signed-off-by: Thomas Gleixner Acked-by: Bj

Re: [patch 33/39] PCI/MSI: Sanitize MSI-X checks

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:07PM +0100, Thomas Gleixner wrote: > There is no point in doing the same sanity checks over and over in a loop > during MSI-X enablement. Put them in front of the loop and return early > when they fail. > > Signed-off-by: Thomas Gleixner Acked-by

Re: [patch 32/39] PCI/MSI: Reorder functions in msi.c

2022-11-16 Thread Bjorn Helgaas
ely non-obvious. > > Reorder everthing so common helpers, MSI and MSI-X specific functions are > grouped together. s/everthing/everything/ > Suggested-by: Thomas Gleixner > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas I assume

  1   2   3   4   5   6   7   8   9   >