From: Greg KH <greg@kroah.com>
To: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
akpm@osdl.org, bjorn.helgaas@hp.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] missing pci_disable_device()
Date: Wed, 8 Sep 2004 23:20:09 -0700 [thread overview]
Message-ID: <20040909062009.GD10428@kroah.com> (raw)
In-Reply-To: <413FF05B.8090505@jp.fujitsu.com>
On Thu, Sep 09, 2004 at 02:55:39PM +0900, Kenji Kaneshige wrote:
> Alan Cox wrote:
> > On Mer, 2004-09-08 at 04:14, Kenji Kaneshige wrote:
> >> > Think about unloading frame buffers or PCI devices with multiple
> >> > functions and multiple drivers. I agree the drivers definitely want
> >> > fixing where appropriate. I'm not sure your approach is safe (although a
> >>
> >> I don't understand what you are worried about. Could you tell me
> >> what would be a problem with frame buffers or PCI devices with
> >> multiple functions?
> >
> > If I have a framebuffer driver loaded for my video card in bitmap mode
> > all is well. If I unload it you then disable the video hardware even
> > though it would still be otherwise usable in text mode.
> >
> > The same occurs when one PCI device has multiple functions (not PCI
> > functions but linux drivers using it). There are some examples of this
> > such as the CS5520 where one BAR is the IDE controller.
> >
>
> Thank you for answering.
>
> I understand that there are some devices that need to be enabled
> even after their drivers are unloaded, and my approach might not
> be safe in this case. I think the best way to solve the problem
> (missing pci_disable_device) is to fix broken drivers one by one.
> I think debug printk will helpful to fix those drivers, but I
> don't know what kind of message is appropriate...
Yes, this should be pointed out with a warning message, which will be
safer. How about something like:
dev_warn(&pci_dev->dev, "Device was removed without properly "
"calling pci_disable_device(), please fix.\n");
WARN_ON(1);
Care to redo your patch with that?
thanks,
greg k-h
next prev parent reply other threads:[~2004-09-09 6:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-07 1:26 [PATCH] missing pci_disable_device() Kenji Kaneshige
2004-09-07 9:49 ` Alan Cox
2004-09-08 3:14 ` Kenji Kaneshige
2004-09-08 12:39 ` Alan Cox
2004-09-09 5:55 ` Kenji Kaneshige
2004-09-09 6:20 ` Greg KH [this message]
2004-09-09 10:29 ` Kenji Kaneshige
2004-09-09 13:11 ` Alan Cox
2004-09-10 7:58 ` Kenji Kaneshige
2004-09-09 17:33 ` Greg KH
2004-09-09 19:38 ` Jeff Garzik
2004-09-10 8:18 ` Kenji Kaneshige
2004-09-13 3:55 ` Kenji Kaneshige
2004-09-14 20:47 ` Greg KH
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=20040909062009.GD10428@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bjorn.helgaas@hp.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
/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