Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10679
b: refs/heads/master
c: 1410dc1
h: refs/heads/master
i:
  10677: 4bf48bd
  10675: 8e640d7
  10671: 7bac694
v: v3
  • Loading branch information
rajesh.shah@intel.com authored and Greg Kroah-Hartman committed Oct 28, 2005
1 parent fe9c308 commit a6adeaf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 424600f9706b20a8a33ad928d3d0326bd88679bc
refs/heads/master: 1410dc1cef1e2f5e90c1fcb97041f42e0eee35b4
14 changes: 14 additions & 0 deletions trunk/drivers/pci/hotplug/shpchp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,17 @@ static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_sp
return 0;
}

static int is_shpc_capable(struct pci_dev *dev)
{
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 1;

return 0;
}

static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int rc;
Expand All @@ -359,6 +370,9 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
int first_device_num; /* first PCI device number supported by this SHPC */
int num_ctlr_slots; /* number of slots supported by this SHPC */

if (!is_shpc_capable(pdev))
return -ENODEV;

ctrl = (struct controller *) kmalloc(sizeof(struct controller), GFP_KERNEL);
if (!ctrl) {
err("%s : out of memory\n", __FUNCTION__);
Expand Down

0 comments on commit a6adeaf

Please sign in to comment.