Re: [PATCH v9] block: Add n64 cart driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux