usx2y: prevent oops & dead keyboard on hot usb unplugging
Quoted 11 lines · --- Takashi Iwai
At Fri, 15 Apr 2005 15:59:25 +0200 (CEST),
Quoted 4 lines · karsten wiese
Quoted 1 line · --- Lee Revell
On Thu, 2005-04-14 at 20:59 +0200, karsten wiese
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 3 lines
Hi Clemens & Takashi
Please commit the patch.
Quoted 11 lines
Quoted 3 lines
Quoted 1 line
Is the ALSA in kernel 2.6.11 affected? If so, this
Think so, yes. The keyboard dead effect + described
oops
Quoted 2 lines
has been around for quiet a long time. (There is a lkml mail from yesterday about an
usb-cellphone
Quoted 3 lines
setup,
where the same oops + dead keyboard happens also:
http://marc.theaimsgroup.com/?i=<20050414230621.49663f75.vsu%20()%20altlinux%20!%20ru>
Quoted 40 lines
Quoted 4 lines
)
There is also an alsa-bug with snd-usb-audio in the bugbase.
Clemens seams not to be convinced about this aproachyet.
Quoted 11 lines
maybe 'cause the comment of
snd_card_free_in_threadexplicitly states that its the one to be called for hotplug:
/**
*snd_card_free_in_thread- callsnd_card_free()in
thread
* @card: soundcard structure
*
* This function schedules the call ofsnd_card_free()
function in a
* work queue. When all devices are released(non-busy),
Quoted 4 lines
the work
* is woken up and callssnd_card_free(). *
* When a card can be disconnected at any time byhotplug
Quoted 2 lines
service,
* this function should be used in disconnect (ordetach)
Quoted 4 lines
callback
* instead of callingsnd_card_free()directly. *
* Returns - zero otherwise a negative error code ifthe
Quoted 4 lines
start of thread failed.
*/Also I remember , that
snd_card_freedidn't work okwhen i
Quoted 1 line
used it in the first implementations of usx2y-module
some 2
Quoted 3 lines
years ago.
but that was on kernel 2.4.something....... maybe above comment is from kernel 2.4 also and the
Quoted 6 lines
hotplug
Quoted 1 line
system has changed ? anybody?
Might be. To be sure, check whether the release fops is called
properly before you callingsnd_card_free().
You mean snd_card_disconnect()?
That's called with the same argument and beforesnd_card_free().
Karsten
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
At Fri, 15 Apr 2005 16:28:54 +0200 (CEST),
Quoted 69 lines · karsten wiese
Quoted 11 lines · --- Takashi Iwai
At Fri, 15 Apr 2005 15:59:25 +0200 (CEST),
Quoted 4 lines · karsten wiese
Quoted 1 line · --- Lee Revell
On Thu, 2005-04-14 at 20:59 +0200, karsten wiese
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 3 lines
Hi Clemens & Takashi
Please commit the patch.
Quoted 11 lines
Quoted 3 lines
Quoted 1 line
Is the ALSA in kernel 2.6.11 affected? If so, this
Think so, yes. The keyboard dead effect + described
oops
Quoted 2 lines
has been around for quiet a long time. (There is a lkml mail from yesterday about an
usb-cellphone
Quoted 3 lines
setup,
where the same oops + dead keyboard happens also:http://marc.theaimsgroup.com/?i=<20050414230621.49663f75.vsu%20()%20altlinux%20!%20ru>
Quoted 43 lines
Quoted 4 lines
)
There is also an alsa-bug with snd-usb-audio in the bugbase.
Clemens seams not to be convinced about this aproachyet.
Quoted 11 lines
maybe 'cause the comment of
snd_card_free_in_threadexplicitly states that its the one to be called for hotplug:
/**
*snd_card_free_in_thread- callsnd_card_free()in
thread
* @card: soundcard structure
*
* This function schedules the call ofsnd_card_free()
function in a
* work queue. When all devices are released(non-busy),
Quoted 4 lines
the work
* is woken up and callssnd_card_free(). *
* When a card can be disconnected at any time byhotplug
Quoted 2 lines
service,
* this function should be used in disconnect (ordetach)
Quoted 4 lines
callback
* instead of callingsnd_card_free()directly. *
* Returns - zero otherwise a negative error code ifthe
Quoted 4 lines
start of thread failed.
*/Also I remember , that
snd_card_freedidn't work okwhen i
Quoted 1 line
used it in the first implementations of usx2y-module
some 2
Quoted 3 lines
years ago.
but that was on kernel 2.4.something....... maybe above comment is from kernel 2.4 also and thehotplug
Quoted 1 line
system has changed ? anybody?
Quoted 7 lines
Quoted 3 lines
Might be. To be sure, check whether the release fops is called
properly before you callingsnd_card_free().You mean
snd_card_disconnect()?
That's called with the same argument and beforesnd_card_free().
No, I mean snd_card_free(), which you changed from snd_card_free_in_thread(). Someone has to release the files (i.e. call release fops eventually) before clean up everything via snd_card_free().
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click