tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pci_mapreg_map() with disabled device
Hi!
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?
Yesterday I had a case where an ohci(4) device had no PCI_COMMAND_IO_ENABLE
and no PCI_COMMAND_MEM_ENABLE bit set in the PCI_COMMAND_STATUS_REG.
Nevertheless pci_mapreg_map() tried to map an illegal address space,
which resulted in a panic, when running a kernel with DEBUG option:
ohci0 at pci1 dev 25 function 0: Apple Computer Intrepid USB Controller (rev.
0x00)
extent_alloc_region: extent 'uninorth mem-space' (0x80000000 - 0xf3ffffff)
extent_alloc_region: start 0x0, end 0xfff
panic: extent_alloc_region: region lies outside extent
Wouldn't it be better to check whether a space is enabled in the device,
before trying to map it?
--
Frank Wille
Home |
Main Index |
Thread Index |
Old Index