Patch "PCI/AER: Decode Requester ID when no error info found" has been added to the 6.1-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/AER: Decode Requester ID when no error info found

to the 6.1-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-aer-decode-requester-id-when-no-error-info-found.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 6e02125ddaaf567b94d15203eace27ac50789f0c
Author: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Date:   Wed Dec 6 16:42:30 2023 -0600

    PCI/AER: Decode Requester ID when no error info found
    
    [ Upstream commit 1291b716bbf969e101d517bfb8ba18d958f758b8 ]
    
    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) and the Requester ID of the
    message source (Error Source Identification).
    
    aer_print_port_info() prints the Requester ID from the Root Port Error
    Source in the usual Linux "bb:dd.f" format, but when find_source_device()
    finds no error details in the hierarchy below the Root Port, it printed the
    raw Requester ID without decoding it.
    
    Decode the Requester ID in the usual Linux format so it matches other
    messages.
    
    Sample message changes:
    
      - pcieport 0000:00:1c.5: AER: Correctable error received: 0000:00:1c.5
      - pcieport 0000:00:1c.5: AER: can't find device of ID00e5
      + pcieport 0000:00:1c.5: AER: Correctable error message received from 0000:00:1c.5
      + pcieport 0000:00:1c.5: AER: found no error details for 0000:00:1c.5
    
    Link: https://lore.kernel.org/r/20231206224231.732765-3-helgaas@xxxxxxxxxx
    Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
    Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index e2d8a74f83c3..5426f450ce91 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -748,7 +748,7 @@ static void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info)
 	u8 bus = info->id >> 8;
 	u8 devfn = info->id & 0xff;
 
-	pci_info(dev, "%s%s error received: %04x:%02x:%02x.%d\n",
+	pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d\n",
 		 info->multi_error_valid ? "Multiple " : "",
 		 aer_error_severity_string[info->severity],
 		 pci_domain_nr(dev->bus), bus, PCI_SLOT(devfn),
@@ -936,7 +936,12 @@ static bool find_source_device(struct pci_dev *parent,
 		pci_walk_bus(parent->subordinate, find_device_iter, e_info);
 
 	if (!e_info->error_dev_num) {
-		pci_info(parent, "can't find device of ID%04x\n", e_info->id);
+		u8 bus = e_info->id >> 8;
+		u8 devfn = e_info->id & 0xff;
+
+		pci_info(parent, "found no error details for %04x:%02x:%02x.%d\n",
+			 pci_domain_nr(parent->bus), bus, PCI_SLOT(devfn),
+			 PCI_FUNC(devfn));
 		return false;
 	}
 	return true;




[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