From: Jussi Kivilinna <jussi.kivilinna-X3B1VOXEql0@public.gmane.org>
To: Torsten Schenk <torsten.schenk-ytc+IHgoah0@public.gmane.org>
Cc: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [alsa-devel] [PATCH] 6fire: fix DMA issues with URB transfer_buffer usage
Date: Wed, 07 Aug 2013 17:50:25 +0300 [thread overview]
Message-ID: <52025EB1.6090605@iki.fi> (raw)
In-Reply-To: <20130807155907.dfea021b3b73fcac33e4323d-ytc+IHgoah0@public.gmane.org>
On 07.08.2013 16:59, Torsten Schenk wrote:
> On Wed, 07 Aug 2013 14:43:43 +0200
> Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org> wrote:
>
>> At Tue, 06 Aug 2013 14:53:24 +0300,
>> Jussi Kivilinna wrote:
>>>
>>> Patch fixes 6fire not to use stack as URB transfer_buffer. URB
>>> buffers need to be DMA-able, which stack is not. Furthermore,
>>> transfer_buffer should not be allocated as part of larger device
>>> structure because DMA coherency issues and patch fixes this issue
>>> too.
>
> Thanks for the information. There is another section where this applies
> in midi.c/midi.h. I can post a patch later.
Appearently in pcm.c/pcm.h too:
http://lxr.free-electrons.com/source/sound/usb/6fire/pcm.c#L571
http://lxr.free-electrons.com/source/sound/usb/6fire/pcm.h#L35
-Jussi
>
>>>
>>> Patch is only compile tested.
>>
>> The changes look OK, but I'd like to let it checked with a real
>> hardware before putting to stable kernel.
>>
>> Torsten, could you check this?
>
> The patch works nicely.
>
> I'm just wondering if instead of calling kmalloc() every time it'd be
> better to put a global sender_buffer and a mutex into the comm_runtime
> struct and lock it every time a writeX is performed. This also would
> have the advantage that message blocks would never overlap which
> currently is possible.
>
> I can prepare a patch on top of this one and send it later, if you
> agree.
>
> Thanks,
> Torsten
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-08-07 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 11:53 [PATCH] 6fire: fix DMA issues with URB transfer_buffer usage Jussi Kivilinna
[not found] ` <20130806115324.23908.18291.stgit-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
2013-08-07 12:43 ` [alsa-devel] " Takashi Iwai
2013-08-07 13:59 ` Torsten Schenk
[not found] ` <20130807155907.dfea021b3b73fcac33e4323d-ytc+IHgoah0@public.gmane.org>
2013-08-07 14:05 ` [alsa-devel] " Takashi Iwai
2013-08-07 14:50 ` Jussi Kivilinna [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=52025EB1.6090605@iki.fi \
--to=jussi.kivilinna-x3b1voxeql0@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tiwai-l3A5Bk7waGM@public.gmane.org \
--cc=torsten.schenk-ytc+IHgoah0@public.gmane.org \
/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.