[PATCH 1/3] libata-scsi: Fix translation of REPORT ZONES command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set reporting options when translating REPORT ZONES
commmand to ATA NCQ.

Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxx>
---
  drivers/ata/libata-scsi.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index b86af14..8b375c7 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3454,7 +3454,7 @@ static unsigned int ata_scsi_zbc_in_xlat(struct 
ata_queued_cmd *qc)
  		goto invalid_param_len;
  	}
  	sect = n_block / 512;
-	options = cdb[14];
+	options = cdb[14] & 0xbf;

  	if (ata_ncq_enabled(qc->dev) &&
  	    ata_fpdma_zac_mgmt_in_supported(qc->dev)) {
@@ -3464,7 +3464,7 @@ static unsigned int ata_scsi_zbc_in_xlat(struct 
ata_queued_cmd *qc)
  		tf->nsect = qc->tag << 3;
  		tf->feature = sect & 0xff;
  		tf->hob_feature = (sect >> 8) & 0xff;
-		tf->auxiliary = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES;
+		tf->auxiliary = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES | (options << 8);
  	} else {
  		tf->command = ATA_CMD_ZAC_MGMT_IN;
  		tf->feature = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES;
-- 
2.5.5


-- 
Damien Le Moal, Ph.D.
Sr. Manager, System Software Group, HGST Research,
HGST, a Western Digital company
Damien.LeMoal@xxxxxxxx
(+81) 0466-98-3593 (ext. 513593)
1 kirihara-cho, Fujisawa,
Kanagawa, 252-0888 Japan
www.hgst.com
Western Digital Corporation (and its subsidiaries) E-mail Confidentiality Notice & Disclaimer:

This e-mail and any files transmitted with it may contain confidential or legally privileged information of WDC and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux