lkml.org 
[lkml]   [1998]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectDual PCI bus support
Hi,

Can you test the following patch? It should make the secondary PCI bus
happy. In case it helps, please include output of 'lspci -vvx' as well.

Thanks
Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"Who is General Failure and why is he reading my disk?"



--- drivers/pci/pci.c 1998/04/25 07:54:55 1.80
+++ drivers/pci/pci.c 1998/04/30 22:23:03
@@ -92,7 +92,7 @@

__initfunc(unsigned int pci_scan_bus(struct pci_bus *bus))
{
- unsigned int devfn, l, max, class;
+ unsigned int devfn, l, max, class, host_bridges = 0;
unsigned char cmd, irq, tmp, hdr_type, is_multi = 0;
struct pci_dev *dev;
struct pci_bus *child;
@@ -133,11 +133,12 @@
pcibios_read_config_dword(bus->number, devfn, PCI_CLASS_REVISION, &class);
class >>= 8; /* upper 3 bytes */
dev->class = class;
+ class >>= 8;
dev->hdr_type = hdr_type;

switch (hdr_type & 0x7f) { /* header type */
case PCI_HEADER_TYPE_NORMAL: /* standard header */
- if (class >> 8 == PCI_CLASS_BRIDGE_PCI)
+ if (class == PCI_CLASS_BRIDGE_PCI)
goto bad;
/*
* If the card generates interrupts, read IRQ number
@@ -159,7 +160,7 @@
dev->rom_address = (l == 0xffffffff) ? 0 : l;
break;
case PCI_HEADER_TYPE_BRIDGE: /* bridge header */
- if (class >> 8 != PCI_CLASS_BRIDGE_PCI)
+ if (class != PCI_CLASS_BRIDGE_PCI && class != PCI_CLASS_BRIDGE_HOST)
goto bad;
for (reg = 0; reg < 2; reg++) {
pcibios_read_config_dword(bus->number, devfn, PCI_BASE_ADDRESS_0 + (reg << 2), &l);
@@ -169,7 +170,7 @@
dev->rom_address = (l == 0xffffffff) ? 0 : l;
break;
case PCI_HEADER_TYPE_CARDBUS: /* CardBus bridge header */
- if (class >> 16 != PCI_BASE_CLASS_BRIDGE)
+ if (class != PCI_CLASS_BRIDGE_CARDBUS)
goto bad;
for (reg = 0; reg < 2; reg++) {
pcibios_read_config_dword(bus->number, devfn, PCI_CB_MEMORY_BASE_0 + (reg << 3), &l);
@@ -217,7 +218,7 @@
/*
* If it's a bridge, scan the bus behind it.
*/
- if (class >> 8 == PCI_CLASS_BRIDGE_PCI) {
+ if (class == PCI_CLASS_BRIDGE_PCI || (class == PCI_CLASS_BRIDGE_HOST && host_bridges++)) {
unsigned int buses;
unsigned short cr;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.035 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site