diff options
author | Hannes Reinecke <hare@suse.de> | 2013-03-04 17:08:06 +0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-03-18 23:31:16 +0400 |
commit | 882e3f8e6966109ad837cfe79e97cf3deb3ae19b (patch) | |
tree | 9444371cf1d794d85b7611fe90fe7c8e8d4974cf /drivers/target/target_core_sbc.c | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) | |
download | linux-882e3f8e6966109ad837cfe79e97cf3deb3ae19b.tar.xz |
target_core_sbc: use noop for SYNCHRONIZE_CACHE
Windows does not expect SYNCHRONIZE_CACHE to be not supported,
and will generate a BSOD upon shutdown when using rd_mcp backend.
So better use a noop here.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_sbc.c')
-rw-r--r-- | drivers/target/target_core_sbc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index 290230de2c53..60d4b5185f32 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -464,8 +464,11 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) break; case SYNCHRONIZE_CACHE: case SYNCHRONIZE_CACHE_16: - if (!ops->execute_sync_cache) - return TCM_UNSUPPORTED_SCSI_OPCODE; + if (!ops->execute_sync_cache) { + size = 0; + cmd->execute_cmd = sbc_emulate_noop; + break; + } /* * Extract LBA and range to be flushed for emulated SYNCHRONIZE_CACHE |