Re: [BUG](-mm)pci_disable_device function clear bars_enabled element

Rajesh Shah
2006-06-01T18:39:36Z

On Thu, Jun 01, 2006 at 11:15:59AM -0600, Grant Grundler wrote:
> + The device driver needs to call pci_request_region() to make sure
> +no other device is already using the same resource. The driver is expected
> +to determine MMIO and IO Port resource availability _before_ calling
> +pci_enable_device(). Conversely, drivers should call pci_release_region()
> +_after_ calling pci_disable_device(). The idea is to prevent two devices
> +colliding on the same address range.
> +
A quick look in the drivers directory shows that _lots_ of drivers
violate this rule. In fact, I suspect Kaneshige-san made the original
incorrect assumption since there were so many drivers out there
which do it in the wrong order.

Rajesh