search for: maxfunc

Displaying 3 results from an estimated 3 matches for "maxfunc".

2008 Jun 11
0
[PATCH] pci: fix off-by-one error and introduce MAX_PCI_FUNC
...y to detect 256 buses */ + for (bus = 0; bus < MAX_PCI_BUSES; bus++) { dprintf("Probing bus 0x%02x... \n", bus); @@ -360,9 +360,9 @@ pci_bus_list->pci_bus[bus].pci_device_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);...
2005 Apr 21
2
ethersel.c32 issues
...g_type = PCI_CFG_TYPE2; + } else + dprintf("unable to determine PCI bios cfg mechanism.\n"); + } + } + + return lastbus; +} + static char * skipspace(char *p) { @@ -205,13 +236,23 @@ static struct match * pciscan(struct match *list) { - unsigned int bus, dev, func, maxfunc; + unsigned int bus, dev, func, maxfunc, maxbus; uint32_t did, sid; uint8_t hdrtype, rid; pciaddr_t a; struct match *m; + int bios_maxbus; + + + if ((bios_maxbus = get_bios()) < 0) { + dprintf("PCI bios not detected.\n"); + maxbus = 0xff; + } else { + maxbus =...
2009 Mar 22
2
[PATCH 1/3] pci: remove (void)cfgtype;
Remove "(void)cfgtype;" from com32/lib/pci/scan.c. - Sebastian Index: syslinux-3.74-pre11-2-g4fc8259/com32/lib/pci/scan.c =================================================================== --- syslinux-3.74-pre11-2-g4fc8259.orig/com32/lib/pci/scan.c +++ syslinux-3.74-pre11-2-g4fc8259/com32/lib/pci/scan.c @@ -441,7 +441,6 @@ struct pci_domain *pci_scan(void) int cfgtype;