[lkml]   [2004]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] missing pci_disable_device()
On Thu, Sep 09, 2004 at 07:29:09PM +0900, Kenji Kaneshige wrote:
> Greg KH wrote:
> >>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?
> Thank you for your advice.
> I changed my patch based on your feedback. But I have one
> concern about putting "WARN_ON(1);". I'm worrying that people
> might be surprised if stack dump is shown on their console,
> especially if the broken driver handles many devices.
> For example, following console messages were displayed when I
> tested my patch by loading/unloading 'uhci_hcd' which handles
> two devices on my machine. How do you think?

I like Alan's advice. Also, a patch for the uhci-hcd driver would be
nice to have :)


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:06    [W:3.081 / U:0.004 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site