Re: [PATCH] add PCI ROMs to sysfs

From: Jesse Barnes
Date: Tue Aug 03 2004 - 12:09:54 EST


On Monday, August 2, 2004 7:32 pm, Jon Smirl wrote:
> My original version have this in it:
>
> /* assign the ROM an address if it doesn't have one */
> if (r->parent == NULL)
> pci_assign_resource(dev->pdev, PCI_ROM_RESOURCE);
>
>
> if (r->parent) {
> release_resource(r);
> r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
> r->end -= r->start;
> r->start = 0;
> }
>
> I was running this code on both 2.4/2.6 but I may have needed to do
> this for 2.4. Is it consistent to have pci_assign_resource() and then
> use release_resource()?
>
> My i875P AGP controller has a ROM on it as well as my two video cards.

So it seems there's some redundancy here--some platforms will map the ROMs at
discovery time while on others we have to map them explicitly? Which should
we count on? I was assuming the former in the last patch I posted, and would
like to keep it that way unless there's some reason not to.

Thanks,
Jesse
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/