Commit 4cac2eb1 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Jesse Barnes

PCI hotplug: shpchp: don't blindly claim non-AMD 0x7450 device IDs

Previously we claimed device ID 0x7450, regardless of the vendor, which is
clearly wrong.  Now we'll claim that device ID only for AMD.

I suspect this was just a typo in the original code, but it's possible this
change will break shpchp on non-7450 AMD bridges.  If so, we'll have to fix
them as we find them.

Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638863Reported-by: default avatarRalf Jung <ralfjung-e@gmx.de>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent b3c00454
...@@ -278,8 +278,8 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value) ...@@ -278,8 +278,8 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
static int is_shpc_capable(struct pci_dev *dev) static int is_shpc_capable(struct pci_dev *dev)
{ {
if ((dev->vendor == PCI_VENDOR_ID_AMD) || (dev->device == if (dev->vendor == PCI_VENDOR_ID_AMD &&
PCI_DEVICE_ID_AMD_GOLAM_7450)) dev->device == PCI_DEVICE_ID_AMD_GOLAM_7450)
return 1; return 1;
if (!pci_find_capability(dev, PCI_CAP_ID_SHPC)) if (!pci_find_capability(dev, PCI_CAP_ID_SHPC))
return 0; return 0;
......
...@@ -944,8 +944,8 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) ...@@ -944,8 +944,8 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev)
ctrl->pci_dev = pdev; /* pci_dev of the P2P bridge */ ctrl->pci_dev = pdev; /* pci_dev of the P2P bridge */
ctrl_dbg(ctrl, "Hotplug Controller:\n"); ctrl_dbg(ctrl, "Hotplug Controller:\n");
if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device == if (pdev->vendor == PCI_VENDOR_ID_AMD &&
PCI_DEVICE_ID_AMD_GOLAM_7450)) { pdev->device == PCI_DEVICE_ID_AMD_GOLAM_7450) {
/* amd shpc driver doesn't use Base Offset; assume 0 */ /* amd shpc driver doesn't use Base Offset; assume 0 */
ctrl->mmio_base = pci_resource_start(pdev, 0); ctrl->mmio_base = pci_resource_start(pdev, 0);
ctrl->mmio_size = pci_resource_len(pdev, 0); ctrl->mmio_size = pci_resource_len(pdev, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment