diff mbox

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

Message ID BL2PR04MB19693FF61F004AA64A6541BC9F490@BL2PR04MB1969.namprd04.prod.outlook.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Damien Le Moal May 18, 2016, 12:53 a.m. UTC
Set reporting options when translating REPORT ZONES
commmand to ATA NCQ.

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

  	    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;
diff mbox

Patch

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) &&