linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Tejun Heo <tj@kernel.org>
Cc: Damien Le Moal <damien.lemoal@hgst.com>,
	linux-ide@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 4/6] ata: fixup ATA_PROT_NODATA
Date: Mon, 20 Jun 2016 13:39:14 +0200	[thread overview]
Message-ID: <1466422756-126637-5-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1466422756-126637-1-git-send-email-hare@suse.de>

The taskfile protocol is a numeric value, and can not be ORed.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/ata/libata-core.c | 4 ++--
 drivers/ata/libata-eh.c   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index e798915..d200102 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1238,7 +1238,7 @@ static int ata_read_native_max_address(struct ata_device *dev, u64 *max_sectors)
 	} else
 		tf.command = ATA_CMD_READ_NATIVE_MAX;
 
-	tf.protocol |= ATA_PROT_NODATA;
+	tf.protocol = ATA_PROT_NODATA;
 	tf.device |= ATA_LBA;
 
 	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
@@ -1297,7 +1297,7 @@ static int ata_set_max_sectors(struct ata_device *dev, u64 new_sectors)
 		tf.device |= (new_sectors >> 24) & 0xf;
 	}
 
-	tf.protocol |= ATA_PROT_NODATA;
+	tf.protocol = ATA_PROT_NODATA;
 	tf.device |= ATA_LBA;
 
 	tf.lbal = (new_sectors >> 0) & 0xff;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 61dc7a9..7832e55 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3177,7 +3177,7 @@ static void ata_eh_park_issue_cmd(struct ata_device *dev, int park)
 	}
 
 	tf.flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR;
-	tf.protocol |= ATA_PROT_NODATA;
+	tf.protocol = ATA_PROT_NODATA;
 	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
 	if (park && (err_mask || tf.lbal != 0xc4)) {
 		ata_dev_err(dev, "head unload failed!\n");
-- 
1.8.5.6


  parent reply	other threads:[~2016-06-20 11:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 11:39 [PATCH 0/6] libata: Fixup ATA NCQ NON-DATA commands Hannes Reinecke
2016-06-20 11:39 ` [PATCH 1/6] libata: use ata_is_ncq() accessors Hannes Reinecke
2016-06-20 11:39 ` [PATCH 2/6] libsas: use ata_is_ncq() and ata_has_dma() accessors Hannes Reinecke
2016-06-20 15:40   ` Tejun Heo
2016-06-21  5:44     ` Hannes Reinecke
2016-06-20 11:39 ` [PATCH 3/6] ata: add ata_is_fpdma() accessor Hannes Reinecke
2016-06-20 15:42   ` Tejun Heo
2016-06-21  5:49     ` Hannes Reinecke
2016-06-21 15:45       ` Tejun Heo
2016-06-20 11:39 ` Hannes Reinecke [this message]
2016-06-20 15:44   ` [PATCH 4/6] ata: fixup ATA_PROT_NODATA Tejun Heo
2016-06-21  5:52     ` Hannes Reinecke
2016-06-20 11:39 ` [PATCH 5/6] libata-eh: decode all taskfile protocols Hannes Reinecke
2016-06-20 11:39 ` [PATCH 6/6] ata: Handle ATA NCQ NO-DATA commands correctly Hannes Reinecke
2016-06-21  1:14   ` Damien Le Moal

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=1466422756-126637-5-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=damien.lemoal@hgst.com \
    --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).