diff mbox

[v2,1/3] Add ZBC <-> ZAC xlat support for report, open, close, reset, finish

Message ID 1459884568-12091-2-git-send-email-shaun@tancheff.com (mailing list archive)
State Deferred, archived
Headers show

Commit Message

Shaun Tancheff April 5, 2016, 7:29 p.m. UTC
Add SCSI <-> ATA translation layer for ZBC commands:
  - Open, Close, and Finish zones

Signed-off-by: Shaun Tancheff <shaun.tancheff@seagate.com>
---
 drivers/ata/libata-scsi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index f06f389..ad6a8a2 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3504,7 +3504,10 @@  static unsigned int ata_scsi_zbc_out_xlat(struct ata_queued_cmd *qc)
 	/* Compatibility with ZBC r01 */
 	if (!sa)
 		sa = ZO_RESET_WRITE_POINTER;
-	if (sa != ZO_RESET_WRITE_POINTER) {
+	if (!(sa == ZO_CLOSE_ZONE ||
+	      sa == ZO_FINISH_ZONE ||
+	      sa == ZO_OPEN_ZONE ||
+	      sa == ZO_RESET_WRITE_POINTER)) {
 		fp = 1;
 		goto invalid_fld;
 	}