Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44813
b: refs/heads/master
c: 7a38050
h: refs/heads/master
i:
  44811: 14140c6
v: v3
  • Loading branch information
Michael Ellerman authored and Greg Kroah-Hartman committed Dec 20, 2006
1 parent 3cdc7b5 commit f06971d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d010b51c7ea9c28e30a476032615941aa77b1498
refs/heads/master: 7a380507c48f7894bae7d367375313df9d51b2e5
28 changes: 16 additions & 12 deletions trunk/drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,19 +1644,23 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_
* return 1 if a HT MSI capability is found and enabled */
static int __devinit msi_ht_cap_enabled(struct pci_dev *dev)
{
u8 pos;
int ttl;
for (pos = pci_find_capability(dev, PCI_CAP_ID_HT), ttl = 48;
pos && ttl;
pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_HT), ttl--) {
u32 cap_hdr;
/* MSI mapping section according to Hypertransport spec */
if (pci_read_config_dword(dev, pos, &cap_hdr) == 0
&& (cap_hdr & 0xf8000000) == 0xa8000000 /* MSI mapping */) {
printk(KERN_INFO "PCI: Found HT MSI mapping on %s with capability %s\n",
pci_name(dev), cap_hdr & 0x10000 ? "enabled" : "disabled");
return (cap_hdr & 0x10000) != 0; /* MSI mapping cap enabled */
int pos, ttl = 48;

pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING);
while (pos && ttl--) {
u8 flags;

if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS,
&flags) == 0)
{
printk(KERN_INFO "PCI: Found %s HT MSI Mapping on %s\n",
flags & HT_MSI_FLAGS_ENABLE ?
"enabled" : "disabled", pci_name(dev));
return (flags & HT_MSI_FLAGS_ENABLE) != 0;
}

pos = pci_find_next_ht_capability(dev, pos,
HT_CAPTYPE_MSI_MAPPING);
}
return 0;
}
Expand Down

0 comments on commit f06971d

Please sign in to comment.