Skip to content

Commit 637c2df

Browse files
committed
Merge tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras
Pull EDAC fixes from Borislav Petkov: - Convert PCI core error codes to proper error numbers since latter get propagated all the way up to the module loading functions * tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/igen6: Convert PCIBIOS_* return codes to errnos EDAC/amd64: Convert PCIBIOS_* return codes to errnos
2 parents 771ed66 + f8367a7 commit 637c2df

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

drivers/edac/amd64_edac.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int __amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset,
8181
amd64_warn("%s: error reading F%dx%03x.\n",
8282
func, PCI_FUNC(pdev->devfn), offset);
8383

84-
return err;
84+
return pcibios_err_to_errno(err);
8585
}
8686

8787
int __amd64_write_pci_cfg_dword(struct pci_dev *pdev, int offset,
@@ -94,7 +94,7 @@ int __amd64_write_pci_cfg_dword(struct pci_dev *pdev, int offset,
9494
amd64_warn("%s: error writing to F%dx%03x.\n",
9595
func, PCI_FUNC(pdev->devfn), offset);
9696

97-
return err;
97+
return pcibios_err_to_errno(err);
9898
}
9999

100100
/*
@@ -1025,8 +1025,10 @@ static int gpu_get_node_map(struct amd64_pvt *pvt)
10251025
}
10261026

10271027
ret = pci_read_config_dword(pdev, REG_LOCAL_NODE_TYPE_MAP, &tmp);
1028-
if (ret)
1028+
if (ret) {
1029+
ret = pcibios_err_to_errno(ret);
10291030
goto out;
1031+
}
10301032

10311033
gpu_node_map.node_count = FIELD_GET(LNTM_NODE_COUNT, tmp);
10321034
gpu_node_map.base_node_id = FIELD_GET(LNTM_BASE_NODE_ID, tmp);

drivers/edac/igen6_edac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ static int errcmd_enable_error_reporting(bool enable)
800800

801801
rc = pci_read_config_word(imc->pdev, ERRCMD_OFFSET, &errcmd);
802802
if (rc)
803-
return rc;
803+
return pcibios_err_to_errno(rc);
804804

805805
if (enable)
806806
errcmd |= ERRCMD_CE | ERRSTS_UE;
@@ -809,7 +809,7 @@ static int errcmd_enable_error_reporting(bool enable)
809809

810810
rc = pci_write_config_word(imc->pdev, ERRCMD_OFFSET, errcmd);
811811
if (rc)
812-
return rc;
812+
return pcibios_err_to_errno(rc);
813813

814814
return 0;
815815
}

0 commit comments

Comments
 (0)