aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usx2y
diff options
context:
space:
mode:
authorKarsten Wiese <annabellesgarden@yahoo.de>2005-04-20 04:12:35 -0400
committerJaroslav Kysela <perex@suse.cz>2005-05-29 04:04:47 -0400
commit230cd5e24853ed4dd960461989b8ed0986d37a99 (patch)
tree234496e25ba4fbbd6e920829987afc1f9fcade78 /sound/usb/usx2y
parentfe5ac9dcfe3b219209cf8e08347cce47658267d0 (diff)
[ALSA] prevent oops & dead keyboard on usb unplugging while the device is being used
USB generic driver,USB USX2Y Without this patch, some usb kobjects, which are parents to the usx2y's kobjects can be freed before the usx2y's. This led to an oops in get_kobj_path_length() and a dead keyboard, when the usx2y's kobjects were freed. The patch ensures the correct sequence. Tested ok on kernel 2.6.12-rc2. Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usx2y')
-rw-r--r--sound/usb/usx2y/usbusx2y.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c
index b06a267e5da..89ee8b73201 100644
--- a/sound/usb/usx2y/usbusx2y.c
+++ b/sound/usb/usx2y/usbusx2y.c
@@ -1,6 +1,11 @@
1/* 1/*
2 * usbusy2y.c - ALSA USB US-428 Driver 2 * usbusy2y.c - ALSA USB US-428 Driver
3 * 3 *
42005-04-14 Karsten Wiese
5 Version 0.8.7.2:
6 Call snd_card_free() instead of snd_card_free_in_thread() to prevent oops with dead keyboard symptom.
7 Tested ok with kernel 2.6.12-rc2.
8
42004-12-14 Karsten Wiese 92004-12-14 Karsten Wiese
5 Version 0.8.7.1: 10 Version 0.8.7.1:
6 snd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device being open. 11 snd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device being open.
@@ -143,7 +148,7 @@
143 148
144 149
145MODULE_AUTHOR("Karsten Wiese <annabellesgarden@yahoo.de>"); 150MODULE_AUTHOR("Karsten Wiese <annabellesgarden@yahoo.de>");
146MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7.1"); 151MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7.2");
147MODULE_LICENSE("GPL"); 152MODULE_LICENSE("GPL");
148MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}"); 153MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}");
149 154
@@ -430,8 +435,6 @@ static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr)
430 if (ptr) { 435 if (ptr) {
431 usX2Ydev_t* usX2Y = usX2Y((snd_card_t*)ptr); 436 usX2Ydev_t* usX2Y = usX2Y((snd_card_t*)ptr);
432 struct list_head* p; 437 struct list_head* p;
433 if (usX2Y->chip_status == USX2Y_STAT_CHIP_HUP) // on 2.6.1 kernel snd_usbmidi_disconnect()
434 return; // calls us back. better leave :-) .
435 usX2Y->chip.shutdown = 1; 438 usX2Y->chip.shutdown = 1;
436 usX2Y->chip_status = USX2Y_STAT_CHIP_HUP; 439 usX2Y->chip_status = USX2Y_STAT_CHIP_HUP;
437 usX2Y_unlinkSeq(&usX2Y->AS04); 440 usX2Y_unlinkSeq(&usX2Y->AS04);
@@ -443,7 +446,7 @@ static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr)
443 } 446 }
444 if (usX2Y->us428ctls_sharedmem) 447 if (usX2Y->us428ctls_sharedmem)
445 wake_up(&usX2Y->us428ctls_wait_queue_head); 448 wake_up(&usX2Y->us428ctls_wait_queue_head);
446 snd_card_free_in_thread((snd_card_t*)ptr); 449 snd_card_free((snd_card_t*)ptr);
447 } 450 }
448} 451}
449 452