libata-scsi: Fix ZBC management out command translation
authorDamien Le Moal <damien.lemoal@hgst.com>
Thu, 14 Jul 2016 00:05:50 +0000 (09:05 +0900)
committerTejun Heo <tj@kernel.org>
Fri, 15 Jul 2016 12:08:14 +0000 (08:08 -0400)
commitee194b75318df718827677d150ebdc31086b121b
tree22b7e3434f8ed91b447b83630312d9e3a4aa6944
parent3f17422b425afd91f4fb45b8f47ffd61b02c0bb8
libata-scsi: Fix ZBC management out command translation

The subcommand for NCQ NON-DATA must be specified in the feature
(low byte), not the high-order count byte.  Also make sure to properly
cast the all bit to a u16 before shiting it by 8 to avoid undefined
behavior.

Signed-off-by: Damien Le Moal <damien.lemoal@hgst.com>
[hch: split the original patch into two, updated changelog]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-scsi.c