From: Christoph Hellwig <hch@lst.de>
To: tj@kernel.org
Cc: hare@suse.com, damien.lemoal@hgst.com, linux-ide@vger.kernel.org,
Hannes Reinecke <hare@suse.de>
Subject: [PATCH 02/10] libata: use ata_is_ncq() accessors
Date: Thu, 14 Jul 2016 09:05:43 +0900 [thread overview]
Message-ID: <1468454751-12466-3-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1468454751-12466-1-git-send-email-hch@lst.de>
From: Hannes Reinecke <hare@suse.de>
Use accessor functions instead of the raw value.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/ata/libahci.c | 2 +-
drivers/ata/libata-core.c | 4 ++--
drivers/ata/libata-scsi.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 71b0719..3e69c20 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1975,7 +1975,7 @@ unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
*/
pp->active_link = qc->dev->link;
- if (qc->tf.protocol == ATA_PROT_NCQ)
+ if (ata_is_ncq(qc->tf.protocol))
writel(1 << qc->tag, port_mmio + PORT_SCR_ACT);
if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 077daf0..f5eb07e 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4842,7 +4842,7 @@ int ata_std_qc_defer(struct ata_queued_cmd *qc)
{
struct ata_link *link = qc->dev->link;
- if (qc->tf.protocol == ATA_PROT_NCQ) {
+ if (ata_is_ncq(qc->tf.protocol)) {
if (!ata_tag_valid(link->active_tag))
return 0;
} else {
@@ -5007,7 +5007,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
ata_sg_clean(qc);
/* command should be marked inactive atomically with qc completion */
- if (qc->tf.protocol == ATA_PROT_NCQ) {
+ if (ata_is_ncq(qc->tf.protocol)) {
link->sactive &= ~(1 << qc->tag);
if (!link->sactive)
ap->nr_active_links--;
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 3dca0d1..0447a39 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3130,8 +3130,8 @@ 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)
+ /* For NCQ commands copy the tag value */
+ if (ata_is_ncq(tf->protocol))
tf->nsect = qc->tag << 3;
/* enforce correct master/slave bit */
--
2.1.4
next prev parent reply other threads:[~2016-07-14 0:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-14 0:05 ZAC fixes Christoph Hellwig
2016-07-14 0:05 ` [PATCH 01/10] libata: return boolean values from ata_is_* Christoph Hellwig
2016-07-14 0:05 ` Christoph Hellwig [this message]
2016-07-14 0:05 ` [PATCH 03/10] libsas: use ata_is_ncq() and ata_has_dma() accessors Christoph Hellwig
2016-07-14 14:45 ` Tejun Heo
2016-07-14 0:05 ` [PATCH 04/10] ata: add ata_is_fpdma() accessor Christoph Hellwig
2016-07-14 14:37 ` Tejun Heo
2016-07-14 15:15 ` Hannes Reinecke
2016-07-14 15:19 ` Tejun Heo
2016-07-14 16:01 ` Hannes Reinecke
2016-07-15 6:13 ` Christoph Hellwig
2016-07-15 7:07 ` Hannes Reinecke
2016-07-15 7:26 ` Christoph Hellwig
2016-07-14 0:05 ` [PATCH 05/10] ata: fixup ATA_PROT_NODATA Christoph Hellwig
2016-07-14 0:05 ` [PATCH 06/10] libata-eh: decode all taskfile protocols Christoph Hellwig
2016-07-14 11:51 ` Sergei Shtylyov
2016-07-14 14:48 ` Tejun Heo
2016-07-14 23:08 ` Christoph Hellwig
2016-07-14 0:05 ` [PATCH 07/10] ata: Handle ATA NCQ NO-DATA commands correctly Christoph Hellwig
2016-07-14 0:05 ` [PATCH 08/10] libata-scsi: Fix translation of REPORT ZONES command Christoph Hellwig
2016-07-14 0:05 ` [PATCH 09/10] libata-scsi: Fix ZBC management out command translation Christoph Hellwig
2016-07-14 11:54 ` Sergei Shtylyov
2016-07-14 0:05 ` [PATCH 10/10] libata-scsi: minor cleanup for ata_scsi_zbc_out_xlat Christoph Hellwig
2016-07-15 12:09 ` Tejun Heo
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=1468454751-12466-3-git-send-email-hch@lst.de \
--to=hch@lst.de \
--cc=damien.lemoal@hgst.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=linux-ide@vger.kernel.org \
--cc=tj@kernel.org \
/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).