On Tue, 23 Aug 2011 10:16:43 -0600 Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote: > 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=638863 > Reported-by: Ralf Jung <ralfjung-e@xxxxxx> > Cc: Joerg Roedel <joerg.roedel@xxxxxxx> > Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > --- > drivers/pci/hotplug/shpchp_core.c | 4 ++-- > drivers/pci/hotplug/shpchp_hpc.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c > index aca972b..dd7e0c5 100644 > --- a/drivers/pci/hotplug/shpchp_core.c > +++ b/drivers/pci/hotplug/shpchp_core.c > @@ -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) > { > - if ((dev->vendor == PCI_VENDOR_ID_AMD) || (dev->device == > - PCI_DEVICE_ID_AMD_GOLAM_7450)) > + if (dev->vendor == PCI_VENDOR_ID_AMD && > + dev->device == PCI_DEVICE_ID_AMD_GOLAM_7450) > return 1; > if (!pci_find_capability(dev, PCI_CAP_ID_SHPC)) > return 0; > diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c > index 36547f0..75ba231 100644 > --- a/drivers/pci/hotplug/shpchp_hpc.c > +++ b/drivers/pci/hotplug/shpchp_hpc.c > @@ -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_dbg(ctrl, "Hotplug Controller:\n"); > > - if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device == > - PCI_DEVICE_ID_AMD_GOLAM_7450)) { > + if (pdev->vendor == PCI_VENDOR_ID_AMD && > + pdev->device == PCI_DEVICE_ID_AMD_GOLAM_7450) { > /* amd shpc driver doesn't use Base Offset; assume 0 */ > ctrl->mmio_base = pci_resource_start(pdev, 0); > ctrl->mmio_size = pci_resource_len(pdev, 0); > > Great, looks good. I'll queue it up for Linus (assume a cc: stable is ok too?). Ralf, can I get a tested-by? Thanks, -- Jesse Barnes, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html