linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Lauri Kasanen <cand@gmx.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-mips@vger.kernel.org, tsbogend@alpha.franken.de,
	axboe@kernel.dk, linux-block@vger.kernel.org,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH v9] block: Add n64 cart driver
Date: Fri, 22 Jan 2021 17:08:28 +0000	[thread overview]
Message-ID: <20210122170828.GA237009@infradead.org> (raw)
In-Reply-To: <20210122185619.980fa4f713b8f57528c3af9e@gmx.com>

On Fri, Jan 22, 2021 at 06:56:19PM +0200, Lauri Kasanen wrote:
> > What alignment does the hardware require?
> 
> It requires 8-byte alignment, but the buffer must also be physically
> contiguous.

If you want a single contiguous buffer you must use the
blk_queue_max_segments() API to ask for a single contiguous segment.

> I grepped around, but apparently no driver under drivers/block does
> direct DMA to the bio buffer. They all use their own buffer and memcpy,
> like this patch. ps3vram, ps3disk, amiflop, etc etc.
> 
> If all existing drivers use their own buffer, why is a different
> approach required for new drivers?

That selections is a bunch of weirdo legacy drivers.  If you want
to look at something reasonably modern but still simple take a look
at drivers/block/virtio_blk.c.

  reply	other threads:[~2021-01-22 17:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22  9:00 [PATCH v9] block: Add n64 cart driver Lauri Kasanen
2021-01-22 11:17 ` Christoph Hellwig
2021-01-22 13:58   ` Lauri Kasanen
2021-01-22 16:18     ` Christoph Hellwig
2021-01-22 16:23       ` Lauri Kasanen
2021-01-22 16:39         ` Christoph Hellwig
2021-01-22 16:56           ` Lauri Kasanen
2021-01-22 17:08             ` Christoph Hellwig [this message]
2021-01-22 17:11             ` Keith Busch
2021-01-22 18:01               ` Lauri Kasanen
2021-01-22 18:20                 ` Christoph Hellwig

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=20210122170828.GA237009@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=cand@gmx.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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).