Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Tejun Heo <tj@kernel.org>, linux-ide@vger.kernel.org
Cc: vladimir.barinov@cogentembedded.com
Subject: Re: [PATCH v3 1/4] libata: add R-Car SATA driver
Date: Sun, 26 May 2013 03:16:53 +0400	[thread overview]
Message-ID: <51A14665.3070508@cogentembedded.com> (raw)
In-Reply-To: <519FF3D6.2090202@cogentembedded.com>

Hello.

On 05/25/2013 03:12 AM, Sergei Shtylyov wrote:

>
>     Tejun, a question for you... see below.
>
>> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
>>
>> Add Renesas R-Car on-chip 3Gbps SATA controller driver.
>>
>> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
>> [Sergei: few bugs fixed, significant cleanup]
>
>     Not all bugs turned out to be fixed... :-/
>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> [...]
>> Index: renesas/drivers/ata/sata_rcar.c
>> ===================================================================
>> --- /dev/null
>> +++ renesas/drivers/ata/sata_rcar.c
>> @@ -0,0 +1,910 @@
> [...]
>> +static void sata_rcar_bmdma_fill_sg(struct ata_queued_cmd *qc)
>> +{
>> +    struct ata_port *ap = qc->ap;
>> +    struct ata_bmdma_prd *prd = ap->bmdma_prd;
>> +    struct scatterlist *sg;
>> +    unsigned int si, pi;
>> +
>> +    pi = 0;
>> +    for_each_sg(qc->sg, sg, qc->n_elem, si) {
>> +        u32 addr, sg_len, len;
>> +
>> +        /*
>> +         * Note: h/w doesn't support 64-bit, so we unconditionally
>> +         * truncate dma_addr_t to u32.
>> +         */
>> +        addr = (u32)sg_dma_address(sg);
>> +        sg_len = sg_dma_len(sg);
>> +
>> +        /* H/w transfer count is only 29 bits long, let's be careful */
>> +        while (sg_len) {
>> +            len = sg_len;
>> +            if (len > 0x1ffffffe)
>
>    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'.

WBR, Sergei


  reply	other threads:[~2013-05-25 23:16 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 [this message]
2013-05-25 23:20     ` Tejun Heo
2013-05-25 23:23       ` Tejun Heo
2013-05-25 23:34         ` Sergei Shtylyov
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=51A14665.3070508@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox