Only in hw/vfb: Makefile Only in hw/xfree86: Makefile diff -ubBr /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c hw/xfree86/common/xf86Bus.c --- /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c 2004-07-06 09:49:13.000000000 -0500 +++ hw/xfree86/common/xf86Bus.c 2005-12-25 00:32:17.000000000 -0600 @@ -2948,14 +2948,20 @@ CheckGenericGA(); if (primaryBus.type != BUS_NONE) { char *bus; - char *loc = xnfcalloc(1,9); + char *loc = xnfcalloc(1,14); if (loc == NULL) return; switch (primaryBus.type) { case BUS_PCI: bus = "PCI"; + if (pciNumBuses < 256) sprintf(loc," %2.2x:%2.2x:%1.1x",primaryBus.id.pci.bus, primaryBus.id.pci.device,primaryBus.id.pci.func); + else + sprintf(loc," %2.2x@%4.4x:%2.2x:%1.1x", + primaryBus.id.pci.bus & 0xff, + primaryBus.id.pci.bus >> 8, + primaryBus.id.pci.device,primaryBus.id.pci.func); break; case BUS_ISA: bus = "ISA"; diff -ubBr /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/common/xf86Helper.c hw/xfree86/common/xf86Helper.c --- /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/common/xf86Helper.c 2004-08-02 14:35:07.000000000 -0500 +++ hw/xfree86/common/xf86Helper.c 2005-12-25 00:32:18.000000000 -0600 @@ -1795,9 +1795,18 @@ if (devBus) dev = devBus; /* busID preferred */ if (!dev) { if (xf86CheckPciSlot(pPci->bus, pPci->device, pPci->func)) { - xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section " + if (pciNumBuses < 256) + xf86MsgVerb(X_WARNING, 0, + "%s: No matching Device section " "for instance (BusID PCI:%i:%i:%i) found\n", driverName, pPci->bus, pPci->device, pPci->func); + else + xf86MsgVerb(X_WARNING, 0, + "%s: No matching Device section " + "for instance (BusID " + "PCI:%2.2x@%4.4i:%2.2i:%2.2i) found\n", + driverName, pPci->bus & 0xff, pPci->bus >> 8, + pPci->device, pPci->func); } } else { numClaimedInstances++; Only in hw/xfree86/ddc: Makefile Only in hw/xfree86/doc: Makefile Only in hw/xfree86/doc/man: Makefile Only in hw/xfree86/drivers: Makefile Only in hw/xfree86/drivers/v4l: Makefile Only in hw/xfree86/dummylib: Makefile Only in hw/xfree86/etc: Makefile diff -ubBr /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/etc/pcitweak.c hw/xfree86/etc/pcitweak.c --- /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/etc/pcitweak.c 2003-11-25 13:28:43.000000000 -0600 +++ hw/xfree86/etc/pcitweak.c 2005-12-25 00:32:11.000000000 -0600 @@ -213,15 +213,22 @@ * be zero, although it doing this isn't encouraged. */ - char *p, *s, *end; + char *p, *s, *d, *end; s = strdup(busID); p = strtok(s, ":"); if (p == NULL || *p == 0) return FALSE; + d = strpbrk(p,"@"); + if (d != NULL) + *(d++) = 0; *bus = strtoul(p, &end, 16); if (*end != '\0') return FALSE; + if (d != NULL && *d != 0) + *bus += strtoul(d,&end,16) << 8; + if (*end != '\0') + return FALSE; p = strtok(NULL, ":"); if (p == NULL || *p == 0) return FALSE; diff -ubBr /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/etc/scanpci.c hw/xfree86/etc/scanpci.c --- /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/etc/scanpci.c 2004-04-23 14:53:57.000000000 -0500 +++ hw/xfree86/etc/scanpci.c 2005-12-25 00:32:11.000000000 -0600 @@ -226,11 +226,19 @@ exit(1); } + if (pciNumBuses < 256) { printf("\npci bus 0x%04x cardnum 0x%02x function 0x%02x:" " vendor 0x%04x device 0x%04x\n", pcr->busnum, pcr->devnum, pcr->funcnum, pcr->pci_vendor, pcr->pci_device); + } else { + printf("\npci bus 0x%02x @ 0x%04x cardnum 0x%02x function 0x%02x:" + " vendor 0x%04x device 0x%04x\n", + (pcr->busnum) & 0xff, (pcr->busnum >> 8), + pcr->devnum, pcr->funcnum, + pcr->pci_vendor, pcr->pci_device); + } ScanPciFindPciNamesByDevice(pcr->pci_vendor, pcr->pci_device, pcr->pci_subsys_vendor, pcr->pci_subsys_card, &vname, &dname, &svname, &sname); Only in hw/xfree86/fbdevhw: Makefile Only in hw/xfree86/getconfig: Makefile Only in hw/xfree86/input: Makefile Only in hw/xfree86/input/acecad: Makefile Only in hw/xfree86/input/aiptek: Makefile Only in hw/xfree86/input/calcomp: Makefile Only in hw/xfree86/input/citron: Makefile Only in hw/xfree86/input/digitaledge: Makefile Only in hw/xfree86/input/dmc: Makefile Only in hw/xfree86/input/dynapro: Makefile Only in hw/xfree86/input/elographics: Makefile Only in hw/xfree86/input/fpit: Makefile Only in hw/xfree86/input/hyperpen: Makefile Only in hw/xfree86/input/jamstudio: Makefile Only in hw/xfree86/input/keyboard: Makefile Only in hw/xfree86/input/magellan: Makefile Only in hw/xfree86/input/microtouch: Makefile Only in hw/xfree86/input/mouse: Makefile Only in hw/xfree86/input/mutouch: Makefile Only in hw/xfree86/input/palmax: Makefile Only in hw/xfree86/input/penmount: Makefile Only in hw/xfree86/input/spaceorb: Makefile Only in hw/xfree86/input/summa: Makefile Only in hw/xfree86/input/tek4957: Makefile Only in hw/xfree86/input/ur98: Makefile Only in hw/xfree86/input/void: Makefile Only in hw/xfree86/input/wacom: Makefile Only in hw/xfree86/int10: Makefile Only in hw/xfree86/loader: Makefile diff -ubBr /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/Pci.c --- /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c 2004-12-14 23:52:16.000000000 -0600 +++ hw/xfree86/os-support/bus/Pci.c 2005-12-25 00:32:18.000000000 -0600 @@ -624,6 +624,7 @@ int sec_bus, pri_bus; static int previousBus = 0; Bool speculativeProbe = FALSE; + Bool inLoop = FALSE; unsigned char base_class, sub_class; #ifdef DEBUGPCI @@ -660,7 +661,7 @@ /* * Is current dev a multifunction device? */ - if (!speculativeProbe && pciMfDev(pciBusNum, pciDevNum)) + if (!inLoop && !speculativeProbe && pciMfDev(pciBusNum, pciDevNum)) /* Probe for other functions */ pciFuncNum = 1; else @@ -693,6 +694,7 @@ speculativeProbe = FALSE; } + do { if (++pciBusNum >= pciMaxBusNum) { #ifdef DEBUGPCI ErrorF("pciGenFindNext: out of buses\n"); @@ -700,6 +702,8 @@ /* No more buses. All done for now */ return(PCI_NOT_FOUND); } + } while (pciBusInfo[pciBusNum] && + (pciBusInfo[pciBusNum]->numDevices == 0)); pciDevNum = 0; } @@ -730,8 +734,10 @@ #ifdef DEBUGPCI ErrorF("pciGenFindNext: pciDeviceTag = 0x%lx, devid = 0x%lx\n", pciDeviceTag, devid); #endif - if ((CARD16)(devid + 1U) <= (CARD16)1UL) + if ((CARD16)(devid + 1U) <= (CARD16)1UL) { + inLoop = TRUE; continue; /* Nobody home. Next device please */ + } /* * Some devices mis-decode configuration cycles in such a way as to @@ -742,9 +748,11 @@ for (;;) { if (++pciDevNum >= pciBusInfo[pciBusNum]->numDevices) goto NextSpeculativeBus; - if (devid != - pciReadLong(PCI_MAKE_TAG(pciBusNum, pciDevNum, 0), - PCI_ID_REG)) + inProbe = TRUE; + tmp = pciReadLong(PCI_MAKE_TAG(pciBusNum, pciDevNum, 0), + PCI_ID_REG); + inProbe = FALSE; + if (devid != tmp) break; } @@ -1035,6 +1043,7 @@ devp->pci_vendor, devp->pci_device, devp->pci_rev_id, devp->pci_base_class, devp->pci_sub_class); #else + if (pciNumBuses < 256) xf86MsgVerb(X_INFO, 2, "PCI: %.2x:%02x:%1x: chip %04x,%04x" " card %04x,%04x rev %02x class %02x,%02x,%02x hdr %02x\n", devp->busnum, devp->devnum, devp->funcnum, @@ -1043,6 +1052,18 @@ devp->pci_rev_id, devp->pci_base_class, devp->pci_sub_class, devp->pci_prog_if, devp->pci_header_type); + else + xf86MsgVerb(X_INFO, 2, "PCI: %.4x@%.2x:%02x:%1x: chip %04x,%04x" + " card %04x,%04x rev %02x class %02x,%02x,%02x" + " hdr %02x\n", + PCI_BUS_NO_DOMAIN(devp->busnum), + PCI_DOM_FROM_BUS(devp->busnum), + devp->devnum, devp->funcnum, + devp->pci_vendor, devp->pci_device, + devp->pci_subsys_vendor, devp->pci_subsys_card, + devp->pci_rev_id, devp->pci_base_class, + devp->pci_sub_class, devp->pci_prog_if, + devp->pci_header_type); #endif pci_devp[idx++] = devp; @@ -1190,10 +1211,18 @@ /* if we use a mem base save it and move it out of the way */ if (b_reg >= 0 && b_reg <= 5) { savebase = pciReadLong(Tag, PCI_MAP_REG_START+(b_reg<<2)); + if (pciNumBuses < 256) xf86MsgVerb(X_INFO,5,"xf86ReadPciBios: modifying membase[%i]" " for device %i:%i:%i\n", basereg, (int)PCI_BUS_FROM_TAG(Tag), (int)PCI_DEV_FROM_TAG(Tag), (int)PCI_FUNC_FROM_TAG(Tag)); + else + xf86MsgVerb(X_INFO,5,"xf86ReadPciBios: modifying membase[%i]" + " for device %i@%i:%i:%i\n", basereg, + (int)PCI_DOM_FROM_BUS(PCI_BUS_FROM_TAG(Tag)), + (int)PCI_BUS_NO_DOMAIN(PCI_BUS_FROM_TAG(Tag)), + (int)PCI_DEV_FROM_TAG(Tag), + (int)PCI_FUNC_FROM_TAG(Tag)); pciWriteLong(Tag, PCI_MAP_REG_START + (b_reg << 2), (CARD32)~0); } diff -ubBr /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h hw/xfree86/os-support/bus/Pci.h --- /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h 2004-08-11 16:14:17.000000000 -0500 +++ hw/xfree86/os-support/bus/Pci.h 2005-12-25 00:32:18.000000000 -0600 @@ -116,9 +116,14 @@ /* by xf86scanpci */ #if defined(sun) && defined(SVR4) && defined(sparc) # define MAX_PCI_BUSES 4096 /* Max number of PCI buses */ -#elif defined(__alpha__) && defined (linux) +#elif defined (linux) +# if defined (__alpha__) # define MAX_PCI_DOMAINS 512 # define PCI_DOM_MASK 0x01fful +# else +# define MAX_PCI_DOMAINS 64 +# define PCI_DOM_MASK 0x003ful +# endif # define MAX_PCI_BUSES (MAX_PCI_DOMAINS*256) /* 256 per domain */ #else # define MAX_PCI_BUSES 256 /* Max number of PCI buses */ diff -ubBr /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c hw/xfree86/os-support/bus/linuxPci.c --- /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c 2004-12-14 23:48:20.000000000 -0600 +++ hw/xfree86/os-support/bus/linuxPci.c 2005-12-25 00:32:19.000000000 -0600 @@ -101,7 +101,9 @@ static int linuxPciOpenFile(PCITAG tag) { - static int lbus,ldev,lfunc,fd = -1; + static int lbus = -1,ldev,lfunc,fd = -1; + static int lbus_found = FALSE; + static int has_domain = -1; int bus, dev, func; char file[32]; struct stat ignored; @@ -109,30 +111,73 @@ bus = PCI_BUS_FROM_TAG(tag); dev = PCI_DEV_FROM_TAG(tag); func = PCI_FUNC_FROM_TAG(tag); + + if (has_domain == -1) { + if (lbus == bus) + return -1; + + sprintf (file,"/proc/bus/pci/%02x", bus & 0xff); + if (stat(file, &ignored) >= 0) + has_domain = 0; + else { + sprintf (file,"/proc/bus/pci/%04x:%02x", + PCI_DOM_FROM_BUS(bus), bus & 0xff); + if (stat (file, &ignored) >= 0) + has_domain = 1; + else { + lbus = bus; + lbus_found = FALSE; + return -1; + } + } + } + if (fd == -1 || bus != lbus || dev != ldev || func != lfunc) { + + if (bus != lbus) + lbus_found = FALSE; + else if (!lbus_found) + return -1; + + lbus = bus; + ldev = dev; + lfunc = func; + if (fd != -1) close(fd); - if (bus < 256) { - sprintf(file,"/proc/bus/pci/%02x",bus); - if (stat(file, &ignored) < 0) - sprintf(file, "/proc/bus/pci/0000:%02x/%02x.%1x", + if (bus < 256) { /* domain 0 or no domains */ + if (has_domain == 1) + sprintf (file, "/proc/bus/pci/0000:%02x/%02x.%1x", bus, dev, func); else - sprintf(file, "/proc/bus/pci/%02x/%02x.%1x", + sprintf (file, "/proc/bus/pci/%02x/%02x.%1x", bus, dev, func); } else { - sprintf(file,"/proc/bus/pci/%04x",bus); - if (stat(file, &ignored) < 0) - sprintf(file, "/proc/bus/pci/0000:%04x/%02x.%1x", - bus, dev, func); - else - sprintf(file, "/proc/bus/pci/%04x/%02x.%1x", - bus, dev, func); + if (has_domain == 0) + return -1; + + sprintf (file, "/proc/bus/pci/%04x:%02x/%02x.%1x", + PCI_DOM_FROM_BUS(bus), + bus & 0xff, dev, func); } fd = open(file,O_RDWR); - lbus = bus; - ldev = dev; - lfunc = func; + if (!lbus_found) { + if (fd != -1) + lbus_found = TRUE; + else { + if (has_domain == 1) + sprintf (file, "/proc/bus/pci/%04x:%02x", + PCI_DOM_FROM_BUS(bus), bus & 0xff); + else if (bus < 256) + sprintf (file, "/proc/bus/pci/%02x", bus); + else { + lbus_found = FALSE; + return -1; + } + if (stat(file, &ignored) >= 0) + lbus_found = TRUE; + } + } } return fd; } Only in hw/xfree86/parser: Makefile Only in hw/xfree86/rac: Makefile Only in hw/xfree86/ramdac: Makefile Only in hw/xfree86/scanpci: Makefile Only in hw/xfree86/scanpci/module: Makefile diff -ubBr /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/scanpci/xf86ScanPci.c hw/xfree86/scanpci/xf86ScanPci.c --- /var/tmp/portage/xorg-x11-6.8.2-r6/work/xc/programs/Xserver/hw/xfree86/scanpci/xf86ScanPci.c 2004-04-23 14:54:15.000000000 -0500 +++ hw/xfree86/scanpci/xf86ScanPci.c 2005-12-25 00:32:12.000000000 -0600 @@ -338,15 +338,27 @@ xf86MsgVerb(X_NONE,0,"No PCI info available\n"); return; } - xf86MsgVerb(X_NONE,0,"Probing for PCI devices (Bus:Device:Function)\n\n"); + if (pciNumBuses < 256) + xf86MsgVerb(X_NONE,0, + "Probing for PCI devices (Bus:Device:Function)\n\n"); + else + xf86MsgVerb(X_NONE,0, + "Probing for PCI devices (Bus@Domain:Device:Function)\n\n"); for (i = 0; (pcrp = pcrpp[i]); i++) { const char *svendorname = NULL, *subsysname = NULL; const char *vendorname = NULL, *devicename = NULL; Bool noCard = FALSE; const char *prefix1 = "", *prefix2 = ""; + if (pciNumBuses < 256) xf86MsgVerb(X_NONE, -verbosity, "(%d:%d:%d) ", pcrp->busnum, pcrp->devnum, pcrp->funcnum); + else + xf86MsgVerb(X_NONE, -verbosity, "(%d@%d:%d:%d) ", + (int) pcrp->busnum && 0xff, + (int) pcrp->busnum >> 8, + (int) pcrp->devnum, + (int) pcrp->funcnum); /* * Lookup as much as we can about the device. Only in hw/xfree86/sdk: Makefile Only in hw/xfree86/vbe: Makefile Only in hw/xfree86/vgahw: Makefile Only in hw/xfree86/xf86cfg: Makefile Only in hw/xfree86/xf86config: Makefile Only in hw/xfree86/xf8_32wid: Makefile Only in hw/xnest: Makefile