PCI patch for 2.3.18, version 2

Martin Mares (mj@ucw.cz)
Sun, 12 Sep 1999 21:12:15 +0200


Hello, world!\n

There is another PCI patch for 2.3.18. I've changed the resource management
stuff in arch/i386/kernel/bios32.c, so that it should be able to cope even with
the most weird BIOSes and not change device addresses unless it's unavoidable.

The patch is available at ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/alpha/l-pci-2.3.18-2.gz.

If you have a machine with multiple PCI buses or a BIOS which is known to
forget to assign some addresses or to enable some PCI devices, please give
it a try and tell me whether it works.

Changelog: (against stock 2.3.18)

o Include <asm/pci.h> from <linux/pci.h>, removed all other refs to <asm/pci.h>.
o PC: Removed pci_bios_find_class, it wasn't used anyway.
o Reverted change from 2.3.18. Resource assignment should really be
architecture specific since things like ISA mirror protection and
I/O port ranges vary from arch to arch.
o PC: Rewrote resource allocation, make it re-use as much from the original
configuration as possible, but re-assign addresses when needed. See
comments in the code for the whole algorithm. Also, S3 fixup works again.
o pci_find_parent_resource: Use just the resources of the parent bus and
don't climb up the bus tree, because there is no sense in doing that.
o PC: When "pci=rom" is not given, disable all expansion ROMs to avoid
address decoder sharing problems.
o PC: Address space collision or I/O address out of range -> complain
and reset the region, it will be re-assigned later.
o PC: Call pci_read_bridge_bases() from pcibios_fixup_bus(), so that
the per-bridge resources broken by 2.3.17 work again.
o Don't link syscall.o and setup.o on the PC, they aren't used anyway.
o Removed the "BUG: Parent resource not found" message -- this really
can occur if some crappy PC BIOS assigns an out-of-range address
to a I/O region. Grrr.
o Slot name is available as pci_dev->slot_name (Linus, I hope the name
is no more confusing... :))
o Use slot_name for all error messages during PCI probing.
o pci_read_bridge_bases() is now passed only a bus pointer and it exits
cleanly if the bus has no upstream bridge.
o pci_dev->hdr_type is now a stripped-down header type (i.e., without
the multi-function flag in bit 7).
o setup.c: Handle expansion ROMs on bridges correctly. To avoid code
duplication, we cache address of the rom base register in pci_dev.
o pci.h: Moved the ID list to <linux/pci_ids.h> which is included from pci.h.
This will allow us to generate the ID list automatically one day and makes
pci.h more readable.
o pci.h: Fake pci_find_subsys as well if no CONFIG_PCI.

Still on my TODO list:

o Use IRQ mapping info to find host bridges (I already have some code,
but it needs polishing)
o USB IRQ problems
o PCI DMA functions (see <asm-sparc64/pci.h> and arch/sparc64/kernel/pci_iommu.c
for an example implementation -- good work, Dave!)
o ioctl() for setting of kernel view of IRQ's and addresses.
o Update Documentation/pci.txt.
o Helper functions for PCI device init and resource allocation.
o Read all the PCI sources and search for bugs :-)
o create devlist.h and pci_ids.h from pci.ids
o interrupt resources?
o name -> slot_name in drivers etc.

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
"A sine curve goes off to infinity or at least the end of the blackboard."

- 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/