From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Dave Airlie <airlied@gmail.com>
Cc: Rajesh Shah <rajesh.shah@intel.com>,
gregkh@suse.de, ak@suse.de, linux-pci@atrey.karlin.mff.cuni.cz,
linux-kernel@vger.kernel.org, akpm@osdl.org,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: i386/x86_84: disable PCI resource decode on device disable
Date: Thu, 04 May 2006 17:44:21 +0800 [thread overview]
Message-ID: <4459CCF5.9080106@gmail.com> (raw)
In-Reply-To: <21d7e9970605032016w2a092ce9qb2bff38e739bca5@mail.gmail.com>
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
next prev parent reply other threads:[~2006-05-04 9:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-03 22:27 i386/x86_84: disable PCI resource decode on device disable Rajesh Shah
2006-05-04 3:16 ` Dave Airlie
2006-05-04 9:44 ` Antonino A. Daplas [this message]
2006-05-04 20:01 ` Rajesh Shah
2006-05-04 20:33 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4459CCF5.9080106@gmail.com \
--to=adaplas@gmail.com \
--cc=airlied@gmail.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=rajesh.shah@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).