All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Johannes Stezenbach <js@sig21.net>
Cc: linux-mtd@lists.infradead.org,
	David Brownell <dbrownell@users.sourceforge.net>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: m25p80: make command buffer DMA-safe
Date: Tue, 10 Nov 2009 16:54:07 +0200	[thread overview]
Message-ID: <1257864847.21596.769.camel@localhost> (raw)
In-Reply-To: <20091103100018.GA20519@sig21.net>

On Tue, 2009-11-03 at 11:00 +0100, Johannes Stezenbach wrote:
> On Tue, Nov 03, 2009 at 08:36:05AM +0200, Artem Bityutskiy wrote:
> > On Wed, 2009-10-28 at 14:21 +0100, Johannes Stezenbach wrote:
> > > spi_write() requires the buffer to be DMA-safe, kmalloc()
> > > it seperately to ensure this.
> > 
> > Even though it is just 4 or 5 bytes it can do DMA? Does not sound too
> > sane to use DMA in that case. Does this patch fix a real error?
> > 
> > I do not know much about SPI, but for me it sounds like there should be
> > a method to ask SPI to avoid using DMA, and you should use that method.
> 
> It fixes a real error -- with an out-of-tree driver and ancient kernel.
> For the flash read/write case it is used with list-DMA (e.g. write 4 bytes,
> read 64KB).  There are extensive comments in include/linux/spi/spi.h
> which document the DMA-safe requirement of the buffers.

Pushed to my l2-mtd-2.6 tree, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Johannes Stezenbach <js@sig21.net>
Cc: David Woodhouse <dwmw2@infradead.org>,
	David Brownell <dbrownell@users.sourceforge.net>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: m25p80: make command buffer DMA-safe
Date: Tue, 10 Nov 2009 16:54:07 +0200	[thread overview]
Message-ID: <1257864847.21596.769.camel@localhost> (raw)
In-Reply-To: <20091103100018.GA20519@sig21.net>

On Tue, 2009-11-03 at 11:00 +0100, Johannes Stezenbach wrote:
> On Tue, Nov 03, 2009 at 08:36:05AM +0200, Artem Bityutskiy wrote:
> > On Wed, 2009-10-28 at 14:21 +0100, Johannes Stezenbach wrote:
> > > spi_write() requires the buffer to be DMA-safe, kmalloc()
> > > it seperately to ensure this.
> > 
> > Even though it is just 4 or 5 bytes it can do DMA? Does not sound too
> > sane to use DMA in that case. Does this patch fix a real error?
> > 
> > I do not know much about SPI, but for me it sounds like there should be
> > a method to ask SPI to avoid using DMA, and you should use that method.
> 
> It fixes a real error -- with an out-of-tree driver and ancient kernel.
> For the flash read/write case it is used with list-DMA (e.g. write 4 bytes,
> read 64KB).  There are extensive comments in include/linux/spi/spi.h
> which document the DMA-safe requirement of the buffers.

Pushed to my l2-mtd-2.6 tree, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)


  reply	other threads:[~2009-11-10 14:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 13:21 [PATCH] mtd: m25p80: make command buffer DMA-safe Johannes Stezenbach
2009-11-03  6:36 ` Artem Bityutskiy
2009-11-03  6:36   ` Artem Bityutskiy
2009-11-03 10:00   ` Johannes Stezenbach
2009-11-03 10:00     ` Johannes Stezenbach
2009-11-10 14:54     ` Artem Bityutskiy [this message]
2009-11-10 14:54       ` Artem Bityutskiy

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=1257864847.21596.769.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=dwmw2@infradead.org \
    --cc=js@sig21.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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.