From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Torsten Schenk <torsten.schenk@zoho.com>,
Takashi Iwai <tiwai@suse.de>
Subject: [ 25/45] ALSA: 6fire: make buffers DMA-able (midi)
Date: Sun, 18 Aug 2013 13:36:14 -0700 [thread overview]
Message-ID: <20130818203622.751615025@linuxfoundation.org> (raw)
In-Reply-To: <20130818203620.996166594@linuxfoundation.org>
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Torsten Schenk <torsten.schenk@zoho.com>
commit 4c2aee0032b70083dafebd733ed9c774633b2fa3 upstream.
Patch makes midi output buffer DMA-able by allocating it separately.
Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/usb/6fire/midi.c | 16 +++++++++++++++-
sound/usb/6fire/midi.h | 6 +-----
2 files changed, 16 insertions(+), 6 deletions(-)
--- a/sound/usb/6fire/midi.c
+++ b/sound/usb/6fire/midi.c
@@ -19,6 +19,10 @@
#include "chip.h"
#include "comm.h"
+enum {
+ MIDI_BUFSIZE = 64
+};
+
static void usb6fire_midi_out_handler(struct urb *urb)
{
struct midi_runtime *rt = urb->context;
@@ -156,6 +160,12 @@ int usb6fire_midi_init(struct sfire_chip
if (!rt)
return -ENOMEM;
+ rt->out_buffer = kzalloc(MIDI_BUFSIZE, GFP_KERNEL);
+ if (!rt->out_buffer) {
+ kfree(rt);
+ return -ENOMEM;
+ }
+
rt->chip = chip;
rt->in_received = usb6fire_midi_in_received;
rt->out_buffer[0] = 0x80; /* 'send midi' command */
@@ -169,6 +179,7 @@ int usb6fire_midi_init(struct sfire_chip
ret = snd_rawmidi_new(chip->card, "6FireUSB", 0, 1, 1, &rt->instance);
if (ret < 0) {
+ kfree(rt->out_buffer);
kfree(rt);
snd_printk(KERN_ERR PREFIX "unable to create midi.\n");
return ret;
@@ -197,6 +208,9 @@ void usb6fire_midi_abort(struct sfire_ch
void usb6fire_midi_destroy(struct sfire_chip *chip)
{
- kfree(chip->midi);
+ struct midi_runtime *rt = chip->midi;
+
+ kfree(rt->out_buffer);
+ kfree(rt);
chip->midi = NULL;
}
--- a/sound/usb/6fire/midi.h
+++ b/sound/usb/6fire/midi.h
@@ -16,10 +16,6 @@
#include "common.h"
-enum {
- MIDI_BUFSIZE = 64
-};
-
struct midi_runtime {
struct sfire_chip *chip;
struct snd_rawmidi *instance;
@@ -32,7 +28,7 @@ struct midi_runtime {
struct snd_rawmidi_substream *out;
struct urb out_urb;
u8 out_serial; /* serial number of out packet */
- u8 out_buffer[MIDI_BUFSIZE];
+ u8 *out_buffer;
int buffer_offset;
void (*in_received)(struct midi_runtime *rt, u8 *data, int length);
next prev parent reply other threads:[~2013-08-18 20:43 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 20:35 [ 00/45] 3.10.8-stable review Greg Kroah-Hartman
2013-08-18 20:35 ` [ 01/45] perf/x86: Fix intel QPI uncore event definitions Greg Kroah-Hartman
2013-08-18 20:35 ` [ 02/45] perf/arm: Fix armpmu_map_hw_event() Greg Kroah-Hartman
2013-08-18 20:35 ` [ 03/45] memcg: dont initialize kmem-cache destroying work for root caches Greg Kroah-Hartman
2013-08-18 20:35 ` [ 04/45] microblaze: fix clone syscall Greg Kroah-Hartman
2013-08-18 20:35 ` [ 05/45] x86 get_unmapped_area(): use proper mmap base for bottom-up direction Greg Kroah-Hartman
2013-08-18 20:35 ` [ 06/45] fs/proc/task_mmu.c: fix buffer overflow in add_page_map() Greg Kroah-Hartman
2013-08-18 20:35 ` [ 07/45] sched: Ensure update_cfs_shares() is called for parents of continuously-running tasks Greg Kroah-Hartman
2013-08-18 20:35 ` [ 08/45] elevator: Fix a race in elevator switching Greg Kroah-Hartman
2013-08-18 20:35 ` [ 09/45] ARM: KVM: perform save/restore of PAR Greg Kroah-Hartman
2013-08-18 20:35 ` [ 10/45] ARM: KVM: add missing dsb before invalidating Stage-2 TLBs Greg Kroah-Hartman
2013-08-18 20:36 ` [ 11/45] ARM: KVM: clear exclusive monitor on all exception returns Greg Kroah-Hartman
2013-08-18 20:36 ` [ 12/45] iwl4965: set power mode early Greg Kroah-Hartman
2013-08-18 20:36 ` [ 13/45] iwl4965: reset firmware after rfkill off Greg Kroah-Hartman
2013-08-18 20:36 ` [ 14/45] mac80211: ignore HT primary channel while connected Greg Kroah-Hartman
2013-08-18 20:36 ` [ 15/45] mac80211: fix infinite loop in ieee80211_determine_chantype Greg Kroah-Hartman
2013-08-18 20:36 ` [ 16/45] mac80211: continue using disabled channels while connected Greg Kroah-Hartman
2013-08-18 20:36 ` [ 17/45] can: pcan_usb: fix wrong memcpy() bytes length Greg Kroah-Hartman
2013-08-18 20:36 ` [ 18/45] genetlink: fix family dump race Greg Kroah-Hartman
2013-08-18 20:36 ` [ 19/45] cfg80211: fix P2P GO interface teardown Greg Kroah-Hartman
2013-08-18 20:36 ` [ 20/45] ASoC: dapm: Fix empty list check in dapm_new_mux() Greg Kroah-Hartman
2013-08-18 20:36 ` [ 21/45] ASoC: cs42l52: Reorder Min/Max and update to SX_TLV for Beep Volume Greg Kroah-Hartman
2013-08-18 20:36 ` [ 22/45] ASoC: tegra: fix Tegra30 I2S capture parameter setup Greg Kroah-Hartman
2013-08-18 20:36 ` [ 23/45] ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam C525 Greg Kroah-Hartman
2013-08-18 20:36 ` [ 24/45] ALSA: 6fire: make buffers DMA-able (pcm) Greg Kroah-Hartman
2013-08-18 20:36 ` Greg Kroah-Hartman [this message]
2013-08-18 20:36 ` [ 26/45] ALSA: hda - Fix missing mute controls for CX5051 Greg Kroah-Hartman
2013-08-18 20:36 ` [ 27/45] ALSA: hda - Add pinfix for LG LW25 laptop Greg Kroah-Hartman
2013-08-18 20:36 ` [ 28/45] ALSA: hda - Add a fixup for Gateway LT27 Greg Kroah-Hartman
2013-08-19 17:42 ` Nathanael D. Noblet
2013-08-19 17:48 ` Greg Kroah-Hartman
2013-08-19 18:10 ` Takashi Iwai
2013-08-18 20:36 ` [ 29/45] nl80211: fix another nl80211_fam.attrbuf race Greg Kroah-Hartman
2013-08-18 20:36 ` [ 30/45] usb: add two quirky touchscreen Greg Kroah-Hartman
2013-08-18 20:36 ` [ 31/45] USB: ti_usb_3410_5052: fix big-endian firmware handling Greg Kroah-Hartman
2013-08-18 20:36 ` [ 32/45] USB: mos7840: fix big-endian probe Greg Kroah-Hartman
2013-08-18 20:36 ` [ 33/45] USB: mos7720: fix broken control requests Greg Kroah-Hartman
2013-08-18 20:36 ` [ 34/45] USB: keyspan: fix null-deref at disconnect and release Greg Kroah-Hartman
2013-08-18 20:36 ` [ 35/45] USB: EHCI: accept very late isochronous URBs Greg Kroah-Hartman
2013-08-18 20:36 ` [ 36/45] USB-Serial: Fix error handling of usb_wwan Greg Kroah-Hartman
2013-08-18 20:36 ` [ 37/45] PM / QoS: Fix workqueue deadlock when using pm_qos_update_request_timeout() Greg Kroah-Hartman
2013-08-18 20:36 ` [ 38/45] wusbcore: fix kernel panic when disconnecting a wireless USB->serial device Greg Kroah-Hartman
2013-08-18 20:36 ` [ 39/45] Fix TLB gather virtual address range invalidation corner cases Greg Kroah-Hartman
2013-08-18 20:36 ` [ 40/45] ARM: 7809/1: perf: fix event validation for software group leaders Greg Kroah-Hartman
2013-08-18 20:36 ` [ 41/45] m68k: Truncate base in do_div() Greg Kroah-Hartman
2013-08-18 20:39 ` Geert Uytterhoeven
2013-08-18 20:50 ` Greg Kroah-Hartman
2013-08-18 20:36 ` [ 42/45] m68k/atari: ARAnyM - Fix NatFeat module support Greg Kroah-Hartman
2013-08-18 20:36 ` [ 43/45] s390: Fix broken build Greg Kroah-Hartman
2013-08-18 20:36 ` [ 44/45] jbd2: Fix use after free after error in jbd2_journal_dirty_metadata() Greg Kroah-Hartman
2013-08-18 20:36 ` [ 45/45] cpuset: fix the return value of cpuset_write_u64() Greg Kroah-Hartman
2013-08-19 1:43 ` [ 00/45] 3.10.8-stable review Guenter Roeck
2013-08-19 3:30 ` Greg Kroah-Hartman
2013-08-19 22:48 ` Shuah Khan
2013-08-19 23:11 ` Greg Kroah-Hartman
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=20130818203622.751615025@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=torsten.schenk@zoho.com \
/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;
as well as URLs for NNTP newsgroup(s).