RE: [PATCH] Add PCI device IDs for family 17h, model 70h

Ghannam, Yazen
2019-09-06T01:41:53Z

> -----Original Message-----
> From: Isaac Vaughn <isaac.vaughn@Knights.ucf.edu>
> Sent: Thursday, September 5, 2019 8:02 PM
> To: Borislav Petkov <bp@alien8.de>
> Cc: Isaac Vaughn <isaac.vaughn@Knights.ucf.edu>; Ghannam, Yazen <Yazen.Ghannam@amd.com>; trivial@kernel.org; linux-
> edac@vger.kernel.org
> Subject: [PATCH] Add PCI device IDs for family 17h, model 70h
>
> Add the new Family 17h Model 70h PCI IDs (device 18h functions 0,3,4,6)
> to the kernel, the hwmon module, and the AMD64 EDAC module.
>
> Signed-off-by: Isaac Vaughn <isaac.vaughn@knights.ucf.edu>
> ---
> arch/x86/kernel/amd_nb.c | 5 +++++
> drivers/edac/amd64_edac.c | 13 +++++++++++++
> drivers/edac/amd64_edac.h | 3 +++
> drivers/hwmon/k10temp.c | 1 +
> include/linux/pci_ids.h | 1 +
> 5 files changed, 23 insertions(+)
>
> diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
> index d63e63b7d1d9..08cc057126ba 100644
> --- a/arch/x86/kernel/amd_nb.c
> +++ b/arch/x86/kernel/amd_nb.c
> @@ -18,9 +18,11 @@
> #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450
> #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0
> #define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480
> +#define PCI_DEVICE_ID_AMD_17H_M70H_ROOT 0x1480

Since this ID is already defined, you don't need to add it again.

The code that searches for the PCI device will match on the ID and return a
pointer to the device. The name we associate with the ID is arbitrary. By
convention, we use the family/model where the ID first appears, but the
name itself isn't important.

Thanks,
Yazen