Re: pci_scan, tulip, 3c59x, multiple detections and others

Petr Vandrovec Ing. VTEI (VANDROVE@vc.cvut.cz)
Tue, 28 Sep 1999 11:52:03 MET-1


On 28 Sep 99 at 10:39, Alan Cox wrote:
> > (4) modify scan.c to add 'PCISCAN_WANT_PHYSICAL' flag, which
> > skips ioremap()...
> (5) put in the request_mem_region defines as I've been doing.
If you are talking about ac9, then you should know that ac9 is BROKEN. It
registers virtual device address instead of physical.
It is from my ac9, you can see strange region d2864000 and nothing
registered for real region at e3000000 :-( After change, you'll get nice
indented eth0 at e3000000.

00000000-0009ffff : System RAM
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-0fffffff : System RAM
00100000-001e6da7 : Kernel code
001e6da8-00207713 : Kernel data
d2864000-d286407f : eth0
d8000000-dbffffff : Intel 440BX - 82443BX Host
dc000000-dc003fff : Matrox G400
dd000000-dd7fffff : Matrox G400
e0000000-e1ffffff : Matrox G400
e2000000-e203ffff : DEC DC21142
e3000000-e300007f : DEC DC21142
e3001000-e3001fff : Brooktree Bt848
e3002000-e3002fff : Brooktree Bt878 2nd Contr. (?)
e3003000-e3003fff : Brooktree Bt878

You must obtain physical address:

{
unsigned long physbase;

physbase = pdev->resource[(pci_tbl[chip_idx].pci_flags >> 4) & 0xF].start;
if (pci_tbl[chip_idx].pci_flags & PCI_USES_IO)
request_region(physbase, pci_tbl[chip_idx].io_size, dev->name);
else
request_mem_region(physbase, pci_tbl[chip_idx].io_size, dev->name);
}

Using physbase instead of ioaddr is important part of change... But adding
this to all Donalds drivers does not look like intelligent solution to me...
pci_scan now does check_{mem_,}region, so why it could not do
request_{mem_,}region too? When we can add five lines into pci's scan.c
and remove 8 lines from each network driver, benefit looks clear to me.
Petr

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/