Rev 2479 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2479 | Rev 4682 | ||
|---|---|---|---|
| Line 77... | Line 77... | ||
| 77 | a->debug("...sanity check"); |
77 | a->debug("...sanity check"); |
| 78 | d.bus = 0; |
78 | d.bus = 0; |
| 79 | d.func = 0; |
79 | d.func = 0; |
| 80 | for (d.dev = 0; d.dev < 32; d.dev++) { |
80 | for (d.dev = 0; d.dev < 32; d.dev++) { |
| 81 | u16 class, vendor; |
81 | u16 class, vendor; |
| 82 | if (m->read(&d, PCI_CLASS_DEVICE, (byte *) & class, |
82 | if ((m->read(&d, PCI_CLASS_DEVICE, (byte *) & class, |
| 83 | sizeof(class)) |
83 | sizeof(class)) |
| 84 | && (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST) |
84 | && (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST) |
| 85 | || class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)) |
85 | || class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA))) |
| 86 | || m->read(&d, PCI_VENDOR_ID, (byte *) & vendor, |
86 | || (m->read(&d, PCI_VENDOR_ID, (byte *) & vendor, |
| 87 | sizeof(vendor)) |
87 | sizeof(vendor)) |
| 88 | && (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL) |
88 | && (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL) |
| 89 | || vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ))) { |
89 | || vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))) { |
| 90 | a->debug("...outside the Asylum at 0/%02x/0", |
90 | a->debug("...outside the Asylum at 0/%02x/0", |
| 91 | d.dev); |
91 | d.dev); |
| 92 | return 1; |
92 | return 1; |
| 93 | } |
93 | } |
| 94 | } |
94 | } |