[Top] [All Lists]

Re: CVS linux

To: Jun Sun <>
Subject: Re: CVS linux
From: "Gleb O. Raiko" <>
Date: Wed, 21 Apr 2004 12:55:06 +0400
Cc: Ralf Baechle <>,
Organization: NIISI RAN
Original-recipient: rfc822;
References: <> <> <> <>
Jun Sun wrote:
> Has anybody succssfully used pci_assign_unassigned_resources() in latest 2.4?
> It was badly broken in early 2.4 kernels while pci_auto was the only
> option.

In fact, I have used pci_assign_unassigned_resources() from early 2.4
days. The only code I had to supply was
fixup of PCI-PCI bridge spaces which was done in pcibios_fixup_bus,
something like
        if(!bus->self) /* Primary busses */
                bus->resource[0] = &ioport_resource;
                bus->resource[1] = &iomem_resource;
        else /* busses behind PCI-PCI bridges */
            for IO, MEM, and PREFETCH spaces:
                bus->resource[i] =
                bus->resource[i]->start =
                bus->resource[i]->end   = bus->parent->resource[i]->end;
                bus->resource[i]->flags =
                bus->resource[i]->name  = bus->name;

Ah, I had to disable ISA mapping in 2.4.25.

After that, pci_assign_unassigned_resources() assigns all resources
properly. If for some reason, you have to preserve PBAR's values
assigned by a BIOS, setup pci_dev.resource[].parent before invoking
> So at most you can only say "pci_assign_unassigned_resources() can
> finally does what pci_auto does". :)



<Prev in Thread] Current Thread [Next in Thread>