PCI/VPD: Add pci_vpd_check_csum()
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 20 Aug 2021 20:32:42 +0000 (15:32 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 20 Aug 2021 20:48:47 +0000 (15:48 -0500)
commit6107e5cb907cffc5576cc1297847f9fc69a8d5d9
tree298f8f2585311874a1b60faa149fc009d1cbb5b0
parent9e515c9f6c0b6f0ace6f5cf2202b527d745b494d
PCI/VPD: Add pci_vpd_check_csum()

VPD checksum information and checksum calculation are specified by PCIe
r5.0, sec 6.28.2.2.  Therefore checksum handling can and should be moved
into the PCI VPD core.

Add pci_vpd_check_csum() to validate the VPD checksum.

[bhelgaas: split to separate patch]
Link: https://lore.kernel.org/r/1643bd7a-088e-1028-c9b0-9d112cf48d63@gmail.com
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/vpd.c
include/linux/pci.h