Re: CVS Update@xxxxxxxxx: linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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->self->resource[PCI_BRIDGE_RESOURCES+i];
                bus->resource[i]->start =
bus->parent->resource[i]->start;
                bus->resource[i]->end   = bus->parent->resource[i]->end;
                bus->resource[i]->flags =
bus->parent->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
pci_assign_unassigned_resources.
> 
> So at most you can only say "pci_assign_unassigned_resources() can
> finally does what pci_auto does". :)

Exactly.

Regards,
Gleb.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux