tech-kern archive

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

Re: pci_mapreg_map() with disabled device

On Thu, 1 Dec 2011 13:06:33 +0000
"Jonathan A. Kollasch" <> wrote:

> On Thu, Dec 01, 2011 at 10:12:44AM +0100, Frank Wille wrote:
> > Is there a reason why pci_mapreg_map() calls bus_space_map() for a
> > memory or i/o space, even when all spaces have been disabled on the
> > device?
> Not necessarily, on x86 it's not uncommon for the I/O or Memory enable
> bit to be set wrong by the firmware, even sometimes when the firmware
> has allocated resources to the BARs.

Hmm.. that's bad.
Maybe we could check additionally whether the BAR is 0?

> > Wouldn't it be better to check whether a space is enabled in the
> > device, before trying to map it?
> You mean we don't anymore?  I thought that didn't change.

There is no such check in pci_mapreg_map().

Frank Wille

Home | Main Index | Thread Index | Old Index