From: Takashi Iwai <tiwai@suse.de>
To: Stephane Alnet <alsa-dev@shimaore.net>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [PATCH] work on usb_submit_urb returning -22 and "bad: scheduling while atomic!"
Date: Wed, 16 Jul 2003 12:31:40 +0200 [thread overview]
Message-ID: <s5hel0q225v.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0307122309230.1504-101000@kani-keli.alnet.home>
At Sat, 12 Jul 2003 23:45:08 -0500 (CDT),
Stephane Alnet wrote:
>
> I hit two different problems; the first one has already been mentioned on
> the list a couple days ago and shows up as:
>
> ALSA sound/usb/usbaudio.c:685: cannot submit datapipe for urb 0, err = -22
> (-22 is -EINVAL)
>
> After some parsing of usb_submit_urb, I added some debugs in usbaudio.c
> and found out that urb->interval was set to 0, an invalid value. So I
> forced it to 1 and things started to work. (Obviously the proper fix may
> be to find why it's not properly initialized in the first place.)
yeah, that's a known problem of usb-audio driver on the recent 2.5/2.6
kernel...
> However I still had the "bad: scheduling while atomic!" problem I reported
> earlier on the list; sometimes I'd also get "Debug: sleeping function
> called from illegal context at kernel/sched.c:1489".
these errors should have been fixed on 0.9.5.
usb_submit_urb() was called in prepare callback of ALSA, which is
supposed to be atomic.
> Looking at the output
> from my debugs I saw that in some cases we were calling usb_submit_urb
> with a non-NULL urb->hcpriv, which isn't valid either.
hmm, this looks bad.
> So, I'm not sure what the root cause for this last problem is (besides the
> fact that schedule() is called within schedule()), but I kind of worked
> around it by guarding all the usb_submit_urb calls with a check for a NULL
> urb->hcpriv. I still get the same oopses when opening the device, and
> sound quality gets down under load (lost packets), but otherwise things
> seem to be working much better.
>
> Attached are the diffs I made; it's getting late here so I'll check back
> on it tomorrow, but hopefully that'll give somebody some ideas of what I
> did. :-]
thanks for the patch.
i was working on this yesterday, 2.6.0-test1 was succesfully built,
and... this morning i found my harddisk crashed completely :-<
too bad.
i still have only a 2.4 environment, so fixing this problem might take
a bit longer time. please be patient.
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
prev parent reply other threads:[~2003-07-16 10:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-13 4:45 [PATCH] work on usb_submit_urb returning -22 and "bad: scheduling while atomic!" Stephane Alnet
2003-07-16 10:31 ` Takashi Iwai [this message]
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=s5hel0q225v.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-dev@shimaore.net \
--cc=alsa-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.