Added debug output for unsupported PCI-to-PCI bridges.

This commit is contained in:
Philip Homburg 2005-08-26 11:36:57 +00:00
parent 4cf7769a5d
commit 9fc2555e6f
2 changed files with 26 additions and 1 deletions

View file

@ -692,7 +692,8 @@ int busind;
int devind, i;
int ind, type;
u16_t vid, did;
u8_t sbusn;
u8_t sbusn, baseclass, subclass, infclass;
u32_t t3;
vid= did= 0; /* lint */
for (devind= 0; devind< nr_pcidev; devind++)
@ -711,7 +712,27 @@ int busind;
break;
}
if (pci_pcibridge[i].vid == 0)
{
if (debug)
{
/* Report unsupported bridges */
baseclass= pci_attr_r8(devind, PCI_BCR);
subclass= pci_attr_r8(devind, PCI_SCR);
infclass= pci_attr_r8(devind, PCI_PIFR);
t3= ((baseclass << 16) | (subclass << 8) |
infclass);
if (t3 != PCI_T3_PCI2PCI &&
t3 != PCI_T3_PCI2PCI_SUBTR)
{
/* No a PCI-to-PCI bridge */
continue;
}
printf(
"Ignoring unknown PCI-to-PCI bridge: %04X/%04X\n",
vid, did);
}
continue;
}
type= pci_pcibridge[i].type;
if (debug)

View file

@ -49,6 +49,10 @@ _PROTOTYPE( void pci_attr_w32, (int devind, int port, u32_t value) );
#define PCI_ILR 0x3C /* Interrupt Line Register */
#define PCI_IPR 0x3D /* Interrupt Pin Register */
/* Device type values as ([PCI_BCR] << 16) | ([PCI_SCR] << 8) | [PCI_PIFR] */
#define PCI_T3_PCI2PCI 0x060400 /* PCI-to-PCI Bridge device */
#define PCI_T3_PCI2PCI_SUBTR 0x060401 /* Subtr. PCI-to-PCI Bridge */
/* PCI bridge devices (AGP) */
#define PPB_SBUSN 0x19 /* Secondary Bus Number */