Skip to content

Commit 289e3ea

Browse files
Naveenaidubjorn-helgaas
authored andcommitted
PCI: Use PCI_ERROR_RESPONSE to identify config read errors
Include PCI_ERROR_RESPONSE along with 0xFFFF and 0xFFFFFFFF in the comment about identifying config read errors. This makes checks for config read errors easier to find. Comment change only. Link: https://lore.kernel.org/r/866e2db544df45af70df7e64659bf02e03998ae3.1637243717.git.naveennaidu479@gmail.com Signed-off-by: Naveen Naidu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent a18a025 commit 289e3ea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/pci/access.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val)
412412
if (pcie_capability_reg_implemented(dev, pos)) {
413413
ret = pci_read_config_word(dev, pci_pcie_cap(dev) + pos, val);
414414
/*
415-
* Reset *val to 0 if pci_read_config_word() fails, it may
416-
* have been written as 0xFFFF if hardware error happens
417-
* during pci_read_config_word().
415+
* Reset *val to 0 if pci_read_config_word() fails; it may
416+
* have been written as 0xFFFF (PCI_ERROR_RESPONSE) if the
417+
* config read failed on PCI.
418418
*/
419419
if (ret)
420420
*val = 0;
@@ -447,9 +447,9 @@ int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *val)
447447
if (pcie_capability_reg_implemented(dev, pos)) {
448448
ret = pci_read_config_dword(dev, pci_pcie_cap(dev) + pos, val);
449449
/*
450-
* Reset *val to 0 if pci_read_config_dword() fails, it may
451-
* have been written as 0xFFFFFFFF if hardware error happens
452-
* during pci_read_config_dword().
450+
* Reset *val to 0 if pci_read_config_dword() fails; it may
451+
* have been written as 0xFFFFFFFF (PCI_ERROR_RESPONSE) if
452+
* the config read failed on PCI.
453453
*/
454454
if (ret)
455455
*val = 0;

0 commit comments

Comments
 (0)