[kernel] r13067 - in dists/lenny/linux-2.6/debian: . patches/bugfix/all patches/series
Dann Frazier
dannf at alioth.debian.org
Mon Mar 9 14:23:25 UTC 2009
Author: dannf
Date: Mon Mar 9 14:23:23 2009
New Revision: 13067
Log:
ALSA: Fix OOPS with MIDI in caiaq driver. (Closes: #518900)
Added:
dists/lenny/linux-2.6/debian/patches/bugfix/all/alsa-caiaq-fix-oops-with-midi.patch
Modified:
dists/lenny/linux-2.6/debian/changelog
dists/lenny/linux-2.6/debian/patches/series/14
Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog (original)
+++ dists/lenny/linux-2.6/debian/changelog Mon Mar 9 14:23:23 2009
@@ -16,6 +16,7 @@
- Add support for Toshiba L305
* Add USB mass storage quirk for "Kyocera / Contax SL300R T*" digital
cameras. (Closes: #518899)
+ * ALSA: Fix OOPS with MIDI in caiaq driver. (Closes: #518900)
[ dann frazier ]
* Fix softlockups in sungem driver (Closes: #514624)
@@ -41,7 +42,7 @@
* [nfs] Backport upstream patches to fix NFS "task blocked for more than 120
seconds" issue (Closes: #518431)
- -- dann frazier <dannf at debian.org> Sun, 08 Mar 2009 22:49:52 -0600
+ -- dann frazier <dannf at debian.org> Mon, 09 Mar 2009 08:18:55 -0600
linux-2.6 (2.6.26-13) unstable; urgency=high
Added: dists/lenny/linux-2.6/debian/patches/bugfix/all/alsa-caiaq-fix-oops-with-midi.patch
==============================================================================
--- (empty file)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/all/alsa-caiaq-fix-oops-with-midi.patch Mon Mar 9 14:23:23 2009
@@ -0,0 +1,104 @@
+commit f3f80a9205da74fa56d613f4c14b88b6e4e6caa8
+Author: Takashi Iwai <tiwai at suse.de>
+Date: Thu Jan 8 15:32:56 2009 +0100
+
+ ALSA: caiaq - Fix Oops with MIDI
+
+ The snd-usb-caiaq driver causes Oops occasionally when accessing MIDI
+ devices. This patch fixes the Oops and invalid URB submission errors
+ as well.
+
+ Cc: stable at kernel.org
+ Signed-off-by: Takashi Iwai <tiwai at suse.de>
+
+diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/caiaq-device.h
+index f9fbdba..ab56e73 100644
+--- a/sound/usb/caiaq/caiaq-device.h
++++ b/sound/usb/caiaq/caiaq-device.h
+@@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
+ wait_queue_head_t ep1_wait_queue;
+ wait_queue_head_t prepare_wait_queue;
+ int spec_received, audio_parm_answer;
++ int midi_out_active;
+
+ char vendor_name[CAIAQ_USB_STR_LEN];
+ char product_name[CAIAQ_USB_STR_LEN];
+diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
+index 30b57f9..f19fd36 100644
+--- a/sound/usb/caiaq/caiaq-midi.c
++++ b/sound/usb/caiaq/caiaq-midi.c
+@@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_open(struct snd_rawmidi_substream *substrea
+
+ static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream *substream)
+ {
++ struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
++ if (dev->midi_out_active) {
++ usb_kill_urb(&dev->midi_out_urb);
++ dev->midi_out_active = 0;
++ }
+ return 0;
+ }
+
+@@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
+
+ dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
+ dev->midi_out_buf[1] = 0; /* port */
+- len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3, EP1_BUFSIZE-3);
++ len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
++ EP1_BUFSIZE - 3);
+
+ if (len <= 0)
+ return;
+@@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
+
+ ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
+ if (ret < 0)
+- log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed, %d\n",
+- substream, ret);
++ log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,"
++ "ret=%d, len=%d\n",
++ substream, ret, len);
++ else
++ dev->midi_out_active = 1;
+ }
+
+ static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
+ {
+ struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
+
+- if (dev->midi_out_substream != NULL)
+- return;
+-
+- if (!up) {
++ if (up) {
++ dev->midi_out_substream = substream;
++ if (!dev->midi_out_active)
++ snd_usb_caiaq_midi_send(dev, substream);
++ } else {
+ dev->midi_out_substream = NULL;
+- return;
+ }
+-
+- dev->midi_out_substream = substream;
+- snd_usb_caiaq_midi_send(dev, substream);
+ }
+
+
+@@ -161,16 +167,14 @@ int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *device)
+ void snd_usb_caiaq_midi_output_done(struct urb* urb)
+ {
+ struct snd_usb_caiaqdev *dev = urb->context;
+- char *buf = urb->transfer_buffer;
+
++ dev->midi_out_active = 0;
+ if (urb->status != 0)
+ return;
+
+ if (!dev->midi_out_substream)
+ return;
+
+- snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
+- dev->midi_out_substream = NULL;
+ snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
+ }
+
Modified: dists/lenny/linux-2.6/debian/patches/series/14
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/14 (original)
+++ dists/lenny/linux-2.6/debian/patches/series/14 Mon Mar 9 14:23:23 2009
@@ -19,3 +19,4 @@
+ bugfix/all/SUNRPC-Ensure-the-server-closes-sockets-in-a-timely.patch
+ bugfix/all/svc-Clean-up-deferred-requests-on-transport-destruc.patch
+ bugfix/all/usb-unusual-dev-kyocera-contax-sl300r-t.patch
++ bugfix/all/alsa-caiaq-fix-oops-with-midi.patch
More information about the Kernel-svn-changes
mailing list