aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@hgst.com>2016-07-13 20:05:49 -0400
committerTejun Heo <tj@kernel.org>2016-07-15 08:08:13 -0400
commit3f17422b425afd91f4fb45b8f47ffd61b02c0bb8 (patch)
tree446678f58dfa60dfc60a5ac2cda6ef99fcf4c261 /drivers/ata
parent5b844b63ddfb65aef923eaabe0420196fd71dd13 (diff)
libata-scsi: Fix translation of REPORT ZONES command
Include reporting options when translating REPORT ZONES commmand to ATA NCQ, and make sure we only look at the actually specified bits in the CDB for the options. Signed-off-by: Damien Le Moal <damien.lemoal@hgst.com> [hch: update patch description] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 901b46a6e993..45d8ae63cdf0 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3468,7 +3468,7 @@ static unsigned int ata_scsi_zbc_in_xlat(struct ata_queued_cmd *qc)
3468 goto invalid_param_len; 3468 goto invalid_param_len;
3469 } 3469 }
3470 sect = n_block / 512; 3470 sect = n_block / 512;
3471 options = cdb[14]; 3471 options = cdb[14] & 0xbf;
3472 3472
3473 if (ata_ncq_enabled(qc->dev) && 3473 if (ata_ncq_enabled(qc->dev) &&
3474 ata_fpdma_zac_mgmt_in_supported(qc->dev)) { 3474 ata_fpdma_zac_mgmt_in_supported(qc->dev)) {
@@ -3478,7 +3478,7 @@ static unsigned int ata_scsi_zbc_in_xlat(struct ata_queued_cmd *qc)
3478 tf->nsect = qc->tag << 3; 3478 tf->nsect = qc->tag << 3;
3479 tf->feature = sect & 0xff; 3479 tf->feature = sect & 0xff;
3480 tf->hob_feature = (sect >> 8) & 0xff; 3480 tf->hob_feature = (sect >> 8) & 0xff;
3481 tf->auxiliary = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES; 3481 tf->auxiliary = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES | (options << 8);
3482 } else { 3482 } else {
3483 tf->command = ATA_CMD_ZAC_MGMT_IN; 3483 tf->command = ATA_CMD_ZAC_MGMT_IN;
3484 tf->feature = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES; 3484 tf->feature = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES;