Re: ((struct pci_dev*)dev)->resource[...].start

From: Jonathan Lundell (jlundell@pobox.com)
Date: Wed May 16 2001 - 18:06:51 EST


At 5:37 PM -0400 2001-05-16, Jeff Garzik wrote:
>This is not a safe assumption, because the OS may reprogram the PCI BARs
>at certain times. The rule is: ALWAYS read from dev->resource[] unless
>you are a bus driver (PCI bridges, for example, need to assign
>resources).

Would you please elaborate? If I understand what you're saying, you
can't rely on the "pointer" returned by ioremap() because the OS
might reprogram the relevant BAR out from under you. So one would
need to know: when does a driver have to re-ioremap() due to the BAR
having been (potentially) changed? I'd expect the answer to be: for
all practical purposes never.

-- 
/Jonathan Lundell.
-
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/



This archive was generated by hypermail 2b29 : Wed May 23 2001 - 21:00:20 EST