Re: i386/x86_84: disable PCI resource decode on device disable

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

 



Dave Airlie wrote:
>>
>> When a PCI device is disabled via pci_disable_device(), it's still
>> left decoding its BAR resource ranges even though its driver
>> will have likely released those regions (and may even have
>> unloaded). pci_enable_device() already explicitly enables
>> BAR resource decode for the device being enabled. This patch
>> disables resource decode for the PCI device being disabled,
>> making it symmetric with the enable call.
>>
>> I saw this while doing something else, not because of a
>> problem report. Still, seems to be the correct thing to do.
> 
> I'm just wondering how this will react with VGA devices being run by
> fbdev or the drm, I know the DRM never calls pci_disable_device, as
> the card might require the bars enabled so it can do VGA, and which if
> it is your primary VGA card, can cause you all kinds of troubles...
> (like losing text mode)..

Most, if not all PCI-based framebuffer drivers call pci_disable_device()
in their unload routine. Although it's very rare that framebuffer drivers
are unloaded, if you do, and the the resources are also disabled, it will
kill the VGA core of the card.  You lose your text console and even
hang the machine.

> 
> Alan Cox mentioned this somewhere before in relation to video cards..

Alan Cox, if I remember correctly, advises against calling pci_disable_device()
for video drivers when they unload.

Tony
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux