Patch "PCI: aardvark: Indicate error in 'val' when config read fails" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PCI: aardvark: Indicate error in 'val' when config read fails

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-aardvark-indicate-error-in-val-when-config-read-fails.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Mon Nov 29 01:32:04 PM CET 2021
From: "Marek Behún" <kabel@xxxxxxxxxx>
Date: Wed, 24 Nov 2021 23:49:17 +0100
Subject: PCI: aardvark: Indicate error in 'val' when config read fails
To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Sasha Levin <sashal@xxxxxxxxxx>
Cc: pali@xxxxxxxxxx, stable@xxxxxxxxxxxxxxx, "Bjorn Helgaas" <helgaas@xxxxxxxxxx>, "Lorenzo Pieralisi" <lorenzo.pieralisi@xxxxxxx>, "Marek Behún" <kabel@xxxxxxxxxx>
Message-ID: <20211124224933.24275-9-kabel@xxxxxxxxxx>

From: Pali Rohár <pali@xxxxxxxxxx>

commit b1bd5714472cc72e14409f5659b154c765a76c65 upstream.

Most callers of config read do not check for return value. But most of the
ones that do, checks for error indication in 'val' variable.

This patch updates error handling in advk_pcie_rd_conf() function. If PIO
transfer fails then 'val' variable is set to 0xffffffff which indicates
failture.

Link: https://lore.kernel.org/r/20200528162604.GA323482@bjorn-Precision-5520
Link: https://lore.kernel.org/r/20200601130315.18895-1-pali@xxxxxxxxxx
Reported-by: Bjorn Helgaas <helgaas@xxxxxxxxxx>
Signed-off-by: Pali Rohár <pali@xxxxxxxxxx>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
Signed-off-by: Marek Behún <kabel@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/pci/host/pci-aardvark.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -631,8 +631,10 @@ static int advk_pcie_rd_conf(struct pci_
 	advk_writel(pcie, 1, PIO_START);
 
 	ret = advk_pcie_wait_pio(pcie);
-	if (ret < 0)
+	if (ret < 0) {
+		*val = 0xffffffff;
 		return PCIBIOS_SET_FAILED;
+	}
 
 	/* Check PIO status and get the read result */
 	ret = advk_pcie_check_pio_status(pcie, val);


Patches currently in stable-queue which might be from kabel@xxxxxxxxxx are

queue-4.14/pci-aardvark-move-pcie-reset-card-code-to-advk_pcie_train_link.patch
queue-4.14/pci-aardvark-introduce-an-advk_pcie_valid_device-helper.patch
queue-4.14/pci-aardvark-update-comment-about-disabling-link-training.patch
queue-4.14/pci-aardvark-train-link-immediately-after-enabling-training.patch
queue-4.14/arm64-dts-marvell-armada-37xx-declare-pcie-reset-pin.patch
queue-4.14/pci-aardvark-replace-custom-macros-by-standard-linux-pci_regs.h-macros.patch
queue-4.14/pci-aardvark-fix-a-leaked-reference-by-adding-missing-of_node_put.patch
queue-4.14/pci-aardvark-fix-pcie-max-payload-size-setting.patch
queue-4.14/pinctrl-armada-37xx-correct-pwm-pins-definitions.patch
queue-4.14/arm64-dts-marvell-armada-37xx-set-pcie_reset_pin-to-gpio-function.patch
queue-4.14/pci-aardvark-configure-pcie-resources-from-ranges-dt-property.patch
queue-4.14/pci-aardvark-improve-link-training.patch
queue-4.14/pci-aardvark-fix-link-training.patch
queue-4.14/pci-aardvark-fix-checking-for-link-up-via-ltssm-state.patch
queue-4.14/pci-aardvark-issue-perst-via-gpio.patch
queue-4.14/pinctrl-armada-37xx-correct-mpp-definitions.patch
queue-4.14/pci-add-pci_exp_lnkctl2_tls-macros.patch
queue-4.14/pci-aardvark-wait-for-endpoint-to-be-ready-before-training-link.patch
queue-4.14/pinctrl-armada-37xx-add-missing-pin-pcie1-wakeup.patch
queue-4.14/pci-aardvark-fix-compilation-on-s390.patch
queue-4.14/pci-aardvark-fix-i-o-space-page-leak.patch
queue-4.14/pci-aardvark-don-t-touch-pcie-registers-if-no-card-connected.patch
queue-4.14/pci-aardvark-remove-pcie-outbound-window-configuration.patch
queue-4.14/pci-aardvark-indicate-error-in-val-when-config-read-fails.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux