diff options
author | Andy Lutomirski <luto@kernel.org> | 2016-12-06 21:14:35 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2016-12-21 13:33:24 +0300 |
commit | 2c473a9d02fbe881506d5d43bc7edb776f2f46f5 (patch) | |
tree | 340bd8dc150ecc56d21d1034273a5b3f63df534e /drivers/nvme | |
parent | ff13b39ecf726715a96fcd3c23e50eb792ef6516 (diff) | |
download | linux-2c473a9d02fbe881506d5d43bc7edb776f2f46f5.tar.xz |
nvme/scsi: Remove START STOP emulation
Now that the broken power state control is gone, it appears to serve
no purpose. Just delete it. NVME devices don't have a concept of
started vs stopped anyway.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/scsi.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/nvme/host/scsi.c b/drivers/nvme/host/scsi.c index b71e95044b43..a5c09e703bd8 100644 --- a/drivers/nvme/host/scsi.c +++ b/drivers/nvme/host/scsi.c @@ -2160,30 +2160,6 @@ static int nvme_trans_synchronize_cache(struct nvme_ns *ns, return nvme_trans_status_code(hdr, nvme_sc); } -static int nvme_trans_start_stop(struct nvme_ns *ns, struct sg_io_hdr *hdr, - u8 *cmd) -{ - u8 immed, no_flush; - - immed = cmd[1] & 0x01; - no_flush = cmd[4] & 0x04; - - if (immed != 0) { - return nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, - ILLEGAL_REQUEST, SCSI_ASC_INVALID_CDB, - SCSI_ASCQ_CAUSE_NOT_REPORTABLE); - } else { - if (no_flush == 0) { - /* Issue NVME FLUSH command prior to START STOP UNIT */ - int res = nvme_trans_synchronize_cache(ns, hdr); - if (res) - return res; - } - - return 0; - } -} - static int nvme_trans_format_unit(struct nvme_ns *ns, struct sg_io_hdr *hdr, u8 *cmd) { @@ -2439,9 +2415,6 @@ static int nvme_scsi_translate(struct nvme_ns *ns, struct sg_io_hdr *hdr) case SECURITY_PROTOCOL_OUT: retcode = nvme_trans_security_protocol(ns, hdr, cmd); break; - case START_STOP: - retcode = nvme_trans_start_stop(ns, hdr, cmd); - break; case SYNCHRONIZE_CACHE: retcode = nvme_trans_synchronize_cache(ns, hdr); break; |