From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org, vladimir.barinov@cogentembedded.com
Subject: Re: [PATCH v3 1/4] libata: add R-Car SATA driver
Date: Sun, 26 May 2013 03:34:54 +0400 [thread overview]
Message-ID: <51A14A9E.5060605@cogentembedded.com> (raw)
In-Reply-To: <20130525232301.GB11304@mtj.dyndns.org>
On 05/26/2013 03:23 AM, Tejun Heo wrote:
> On Sun, May 26, 2013 at 08:20:24AM +0900, Tejun Heo wrote:
>> Hey,
>>
>> On Sun, May 26, 2013 at 03:16:53AM +0400, Sergei Shtylyov wrote:
>>>> This value should have been put into the 'dma_boundary' field of the
>>>> 'struct scsi_host_template', IIUC. Tejun, if I do it, do I need
>>>> this check at all?
>>> You haven't replied, so I went and searched an answer myself. Indeed,
>>> it's enough to specify the right 'dma_boundary' and stop bothering about it.
>>> Expect two patches to the driver. I think the correct branch for
>>> them will be
>>> 'for-3.11'.
>> I was just about to reply. Yes, it should be enough. Both block
>> layer and the dma machniery honors the DMA boundary and segment size,
>> which are configured from __scsi_alloc_queue().
> But I'm a bit confused about ata_bmdma_fill_sg(). ATA_BMDMA_SHT sets
> the DMA boundary to 0xffff, so I have no idea why it's explicitly
> checking the DMA boundary in the function again. What am I missing?
Because with SFF-8038i (BMIDE) controllers transfer can't cross
64KiB address boundaries. This function has to break up those S/G
entries that do cross them. I.e. the PRD length is actually additionally
limited by an offset of its start within 64KiB memory segment.
Does this make sense? Or does the block layer already care about this?
Hm, I'm not confident now, should revisit this after some sleep.
WBR, Sergei
next prev parent reply other threads:[~2013-05-25 23:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-20 20:10 [PATCH v3 1/4] libata: add R-Car SATA driver Sergei Shtylyov
2013-05-24 23:12 ` Sergei Shtylyov
2013-05-25 23:16 ` Sergei Shtylyov
2013-05-25 23:20 ` Tejun Heo
2013-05-25 23:23 ` Tejun Heo
2013-05-25 23:34 ` Sergei Shtylyov [this message]
2013-05-26 0:23 ` Tejun Heo
2013-05-27 20:32 ` Sergei Shtylyov
2013-05-28 0:09 ` Tejun Heo
2013-05-28 12:19 ` Sergei Shtylyov
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=51A14A9E.5060605@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-ide@vger.kernel.org \
--cc=tj@kernel.org \
--cc=vladimir.barinov@cogentembedded.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 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.