lkml.org 
[lkml]   [2004]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Driver Core patches for 2.6.10-rc1
Russell King writes:

> On Wed, Nov 10, 2004 at 01:57:17PM +1100, Paul Mackerras wrote:
> > So we can get a driver's probe method called concurrently with its
> > bus's suspend or resume method.
>
> If correct, we probably have rather a lot of buggy drivers, because
> I certainly was not aware that this could happen. I suspect the
> average driver writer also would not be aware of that.

No doubt. I'd still like to hear from Greg or Pat about what the
concurrency rules are supposed to be, or were intended to be.

Note also that I said the *bus's* suspend/resume method. For PCI, we
have some protection since the PCI suspend/resume methods won't call
the individual pci driver's suspend/resume until pci_dev->driver is
set, which happens after the pci driver's probe routine has returned
(but of course the store to pci_dev->driver can get reordered on
some architectures since there is no barrier).

However, pci_dev->driver only gets cleared *after* the driver's remove
method returns. Thus it would be quite possible for a PCI device to
have its suspend/resume methods called while another CPU is in its
remove method.

I think that what has saved us to some extent is that we only do
suspend/resume on UP machines so far.

Regards,
Paul.

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

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