From: David Brownell <david-b@pacbell.net>
To: linux-usb-devel@lists.sourceforge.net
Cc: Lee Revell <rlrevell@joe-job.com>, Greg KH <greg@kroah.com>,
Lukas Hejtmanek <xhejtman@mail.muni.cz>,
linux-kernel@vger.kernel.org
Subject: Re: [linux-usb-devel] Re: Scheduling while atomic (2.6.10-rc3-bk13)
Date: Mon, 20 Dec 2004 13:31:35 -0800 [thread overview]
Message-ID: <200412201331.35652.david-b@pacbell.net> (raw)
In-Reply-To: <1103576264.1252.87.camel@krustophenia.net>
On Monday 20 December 2004 12:57 pm, Lee Revell wrote:
> On Mon, 2004-12-20 at 11:52 -0800, David Brownell wrote:
> > Here's a quick'n'dirty patch, msleep --> mdelay. I'd rather
> > not mdelay for that long, but this late in 2.6.10 it's safer.
> > (And this is also what OHCI does in that same code path.)
>
> Ugh. 20ms is WAY too long to hold a spinlock. That's guaranteed to
> cause audio skips.
During system resume? :)
Anyone trying to use audio devices during system resume
probably deserves what they get, just now. Best for them
to wait until after the system finishes resuming before
they start playing audio again. (Over for example the
USB speaker hookup they were using... which has been
suspended for more than 20msec already!)
> Isn't there another way?
>
> If OHCI calls mdelay(20) while holding a spinlock that needs to be
> fixed.
Eventually this is worth fixing ... after Linux behaves
sanely with selective device suspend/resume.
So for example, with PCI devices it sure _ought_ to be
reasonable to put devices into PCI_D3hot state, with
other active devices in PCI_D0 state and the CPU running
in C0 (or C1, C2, C3 as appropriate) ... and then rely
on ACPI to handle the device signaling PME# sanely,
by resuming the device issuing that signal. (And to
do similar things for non-PCI/non-ACPI systems, too.)
Until then, there's no real point in trying to rework
those parts of usbcore to support selective resume
of HCDs. Such code would never be used, and those
changes would conflict with more important work that's
going on. (Both in terms of lines-of-code changing,
and in terms of opportunity costs.)
On the other hand, if you want to help fix all that,
we'd sure like to see your patches!
- Dave
next prev parent reply other threads:[~2004-12-20 21:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-19 23:10 Scheduling while atomic (2.6.10-rc3-bk13) Lukas Hejtmanek
2004-12-20 18:48 ` Greg KH
2004-12-20 19:52 ` David Brownell
2004-12-20 20:57 ` Lee Revell
2004-12-20 21:31 ` David Brownell [this message]
2004-12-20 21:32 ` [linux-usb-devel] " Lee Revell
2004-12-21 19:20 ` 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=200412201331.35652.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=rlrevell@joe-job.com \
--cc=xhejtman@mail.muni.cz \
/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