diff --git a/patches.suse/PCI-aardvark-Increase-polling-delay-to-1.5s-while-wa.patch b/patches.suse/PCI-aardvark-Increase-polling-delay-to-1.5s-while-wa.patch new file mode 100644 index 0000000..5c99f31 --- /dev/null +++ b/patches.suse/PCI-aardvark-Increase-polling-delay-to-1.5s-while-wa.patch @@ -0,0 +1,54 @@ +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Thu, 22 Jul 2021 16:40:39 +0200 +Subject: PCI: aardvark: Increase polling delay to 1.5s while waiting for PIO + response +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: 02bcec3ea5591720114f586960490b04b093a09e +Patch-mainline: 5.15-rc1 +References: git-fixes + +Measurements in different conditions showed that aardvark hardware PIO +response can take up to 1.44s. Increase wait timeout from 1ms to 1.5s to +ensure that we do not miss responses from hardware. After 1.44s hardware +returns errors (e.g. Completer abort). + +The previous two patches fixed checking for PIO status, so now we can use +it to also catch errors which are reported by hardware after 1.44s. + +After applying this patch, kernel can detect and print PIO errors to dmesg: + + [ 6.879999] advk-pcie d0070000.pcie: Non-posted PIO Response Status: CA, 0xe00 @ 0x100004 + [ 6.896436] advk-pcie d0070000.pcie: Posted PIO Response Status: COMP_ERR, 0x804 @ 0x100004 + [ 6.913049] advk-pcie d0070000.pcie: Posted PIO Response Status: COMP_ERR, 0x804 @ 0x100010 + [ 6.929663] advk-pcie d0070000.pcie: Non-posted PIO Response Status: CA, 0xe00 @ 0x100010 + [ 6.953558] advk-pcie d0070000.pcie: Posted PIO Response Status: COMP_ERR, 0x804 @ 0x100014 + [ 6.970170] advk-pcie d0070000.pcie: Non-posted PIO Response Status: CA, 0xe00 @ 0x100014 + [ 6.994328] advk-pcie d0070000.pcie: Posted PIO Response Status: COMP_ERR, 0x804 @ 0x100004 + +Without this patch kernel prints only a generic error to dmesg: + + [ 5.246847] advk-pcie d0070000.pcie: config read/write timed out + +Link: https://lore.kernel.org/r/20210722144041.12661-3-pali@kernel.org +Signed-off-by: Pali Rohár +Signed-off-by: Lorenzo Pieralisi +Reviewed-by: Marek Behún +Cc: stable@vger.kernel.org # 7fbcb5da811b ("PCI: aardvark: Don't rely on jiffies while holding spinlock") +Signed-off-by: Jiri Slaby +--- + drivers/pci/host/pci-aardvark.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/pci/host/pci-aardvark.c ++++ b/drivers/pci/host/pci-aardvark.c +@@ -169,7 +169,7 @@ + (PCIE_CONF_BUS(bus) | PCIE_CONF_DEV(PCI_SLOT(devfn)) | \ + PCIE_CONF_FUNC(PCI_FUNC(devfn)) | PCIE_CONF_REG(where)) + +-#define PIO_RETRY_CNT 500 ++#define PIO_RETRY_CNT 750000 /* 1.5 s */ + #define PIO_RETRY_DELAY 2 /* 2 us*/ + + #define LINK_WAIT_MAX_RETRIES 10 diff --git a/series.conf b/series.conf index 176fa50..e6ba3ff 100644 --- a/series.conf +++ b/series.conf @@ -61602,6 +61602,7 @@ patches.suse/PCI-Return-0-data-on-pciconfig_read-CAP_SYS_ADMIN-fa.patch patches.suse/PCI-Add-ACS-quirks-for-Cavium-multi-function-devices.patch patches.suse/PCI-aardvark-Fix-checking-for-PIO-status.patch + patches.suse/PCI-aardvark-Increase-polling-delay-to-1.5s-while-wa.patch patches.suse/msft-hv-2426-PCI-hv-Support-for-create-interrupt-v3.patch patches.suse/profiling-fix-shift-out-of-bounds-bugs.patch patches.suse/prctl-allow-to-setup-brk-for-et_dyn-executables.patch