- Convert PCI core error codes to proper error numbers since latter get

propagated all the way up to the module loading functions
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmZldWsACgkQEsHwGGHe
 VUosPRAAkB7aKg5Z+AO1NOrVzPRIRy4khOELcaLR9mjc8aKEM5cgVH96tyb/gDRC
 r/0hqaggMYPu8xqKdl54tiCiVjhR11tdy22pTkh9B6aMOHVp4PyHYmB2GrhI+tgS
 w18ksk29gZl/lcc/tcanMqgrS91K2IiWp9USv3DlzTB/PEqvZd5yPo7iOiCeCTXV
 VGQZCgI7QnA5d09F6M577vV0Ox7al5r2RA3iqlJ1fv3KLbHwfIGzV8U8qSK8vma0
 mX8tu0up8ApzW5P/CxQ/VOfWGWsJK+jdABBlbXWKmY7ABGCGob9cMSPNFWHoAc+F
 3OqVEIJeW0vS6/VlZjqbmc6sV67acLwLtB21xuXpVX8tDgp9U7brXFGYCJ5z/GWf
 Uft7yXymk7y+QQ82TDF3EDjBMASLMdaioj3i9FMGi/nhbgQdNl88ebHL+G1bq2nU
 Yy6fcdTiladVT2WvXLwnwn3QE6SHiK6vbiBai9WN5n1aCByiurm0S71uqU9w34cl
 YTMojEH1GqooAkeCzHSHd0Vv4Lijtjw9N+UlDpJdhjRDWCPFQ7Bvtn3dNcL/PlDK
 L8aU2bQoiW9Cey3012i+gYl8bEgaZ/x63kUoJ37XuwmR5JpniOOt3r2uRiyr2w3k
 9VtOfyRjy4ISMxmL3rvNwMFm7pwC4t7FpyWedSO79rfvy+8hrVs=
 =TDV6
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-06-09 08:49:13 -07:00
commit 637c2dfcd9
2 changed files with 7 additions and 5 deletions

View File

@ -81,7 +81,7 @@ int __amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset,
amd64_warn("%s: error reading F%dx%03x.\n",
func, PCI_FUNC(pdev->devfn), offset);
return err;
return pcibios_err_to_errno(err);
}
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,
amd64_warn("%s: error writing to F%dx%03x.\n",
func, PCI_FUNC(pdev->devfn), offset);
return err;
return pcibios_err_to_errno(err);
}
/*
@ -1025,8 +1025,10 @@ static int gpu_get_node_map(struct amd64_pvt *pvt)
}
ret = pci_read_config_dword(pdev, REG_LOCAL_NODE_TYPE_MAP, &tmp);
if (ret)
if (ret) {
ret = pcibios_err_to_errno(ret);
goto out;
}
gpu_node_map.node_count = FIELD_GET(LNTM_NODE_COUNT, tmp);
gpu_node_map.base_node_id = FIELD_GET(LNTM_BASE_NODE_ID, tmp);

View File

@ -800,7 +800,7 @@ static int errcmd_enable_error_reporting(bool enable)
rc = pci_read_config_word(imc->pdev, ERRCMD_OFFSET, &errcmd);
if (rc)
return rc;
return pcibios_err_to_errno(rc);
if (enable)
errcmd |= ERRCMD_CE | ERRSTS_UE;
@ -809,7 +809,7 @@ static int errcmd_enable_error_reporting(bool enable)
rc = pci_write_config_word(imc->pdev, ERRCMD_OFFSET, errcmd);
if (rc)
return rc;
return pcibios_err_to_errno(rc);
return 0;
}