Displaying 1 result from an estimated 1 matches for "pci_mkaddr".
Did you mean:
pci_addr
2008 Jun 11
0
[PATCH] pci: fix off-by-one error and introduce MAX_PCI_FUNC
...evice_count = 0;
pci_bus_list->count = 0;;
- for (dev = 0; dev <= 0x1f; dev++) {
- maxfunc = 0;
- for (func = 0; func <= maxfunc; func++) {
+ for (dev = 0; dev < MAX_PCI_DEVICES; dev++) {
+ maxfunc = 1;
+ for (func = 0; func < maxfunc; func++) {
a = pci_mkaddr(bus, dev, func, 0);
did = pci_readl(a);
@@ -374,7 +374,8 @@
hdrtype = pci_readb(a + 0x0e);
if (hdrtype & 0x80)
- maxfunc = 7; /* Multifunction device */
+ /* Multifunction device */
+ maxfunc = MAX_PCI_FUNC;
rid = pci_readb(a + 0x08);
sid = pci_readl(a + 0x2c);
@@ -401,7 +...