lkml.org 
[lkml]   [2005]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Ignore disabled ROM resources at setup
On 8/29/05, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> While looking there, I also noticed pci_map_rom_copy() stuff and I'm
> surprised it was ever accepted in the tree. While I can understand that
> we might need to keep a cached copy of the ROM content (due to cards
> like matrox who can't enable both the ROM and the BARs among other
> issues), the whole idea of whacking a kernel virtual pointer in the
> struct resource->start of the ROM bar is just too disgusting for words
> and will probably cause "intersting" side effects in /proc, sysfs and
> others... Shouldn't we just have a pointer in pci_dev for the optional
> "ROM cache" instead ?

We should just delete the ROM copy stuff. It is there because the PCI
spec allows for the ROM address decoder to be reused and the PCI
people wanted it for completeness. It is legal to build a card that
uses the address decoder to get at the ROM, then when the ROM was run
it would set the same address decoder to decode other hardware on the
card. You need to copy the ROM since once the decoder is changed you
can't get to the ROM any more.

As far as I can tell no one has built recent hardware this way. But I
believe there are some old SCSI controllers that do this. I provided a
ROM API for disabling sysfs access, if we identify one of these cards
we should just add a call to it's driver to disable ROM access instead
of bothering with the copy. Currently the copy is not being used
anywhere in the kernel.

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

\
 
 \ /
  Last update: 2005-08-30 06:37    [W:0.074 / U:11.700 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site