From: Tejun Heo <tj@kernel.org>
To: Vinayak Kale <vinayak.kale@gmail.com>
Cc: sumit.g.gupta@seagate.com,
Vinayak Kale <vinayak.kale@seagate.com>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: add support for NCQ commands for SG interface
Date: Thu, 22 Oct 2015 17:57:17 +0900 [thread overview]
Message-ID: <20151022085717.GB24379@mtj.duckdns.org> (raw)
In-Reply-To: <CACLWs=VWXTd6ZcDQCGXHkngf72RpiqDVkZKXrWJC7Rmx_giWsA@mail.gmail.com>
Hello,
On Wed, Oct 21, 2015 at 10:39:32AM +0530, Vinayak Kale wrote:
...
> > diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> > index 0d7f0da..5b0a5ab 100644
> > --- a/drivers/ata/libata-scsi.c
> > +++ b/drivers/ata/libata-scsi.c
> > @@ -2914,12 +2914,14 @@ ata_scsi_map_proto(u8 byte1)
> > case 5: /* PIO Data-out */
> > return ATA_PROT_PIO;
> >
> > + case 12: /* FPDMA */
> > + return ATA_PROT_NCQ;
> > +
> > case 0: /* Hard Reset */
> > case 1: /* SRST */
> > case 8: /* Device Diagnostic */
> > case 9: /* Device Reset */
> > case 7: /* DMA Queued */
> > - case 12: /* FPDMA */
> > case 15: /* Return Response Info */
> > default: /* Reserved */
> > break;
> > @@ -2963,7 +2965,7 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
> > tf->hob_lbal = cdb[7];
> > tf->hob_lbam = cdb[9];
> > tf->hob_lbah = cdb[11];
> > - tf->flags |= ATA_TFLAG_LBA48;
> > + tf->flags |= (ATA_TFLAG_LBA48 | ATA_TFLAG_LBA);
> > } else
> > tf->flags &= ~ATA_TFLAG_LBA48;
> >
> > @@ -2992,6 +2994,10 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
> > tf->command = cdb[9];
> > }
> >
> > + /* For NCQ commands with FPDMA protocol, copy the tag value */
> > + if (tf->protocol == ATA_PROT_NCQ)
> > + tf->nsect = qc->tag << 3;
> > +
> > /* enforce correct master/slave bit */
> > tf->device = dev->devno ?
> > tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;
>
> Any comments on this?
It looks like it'd work given that it's forcing qc->tag into
tf->nsect. What's the use case tho?
Thanks.
--
tejun
next prev parent reply other threads:[~2015-10-22 8:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 11:48 vinayak.kale
2015-10-17 12:00 ` Sergei Shtylyov
2015-10-17 12:25 ` Vinayak Kale
2015-10-17 18:42 ` Sergei Shtylyov
2015-10-19 6:55 ` Vinayak Kale
2015-10-21 5:09 ` Vinayak Kale
2015-10-22 8:57 ` Tejun Heo [this message]
[not found] ` <CAAtun4jvUaVsGSofq5n-sJzmSf4qBsPvQ7WU6dOik4JYSMnZNw@mail.gmail.com>
2015-10-23 5:39 ` Tejun Heo
2015-10-23 20:08 ` Vinayak Kale
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=20151022085717.GB24379@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sumit.g.gupta@seagate.com \
--cc=vinayak.kale@gmail.com \
--cc=vinayak.kale@seagate.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
all inboxes | Powered by JetHome®