diff options
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 290230de2c5..60d4b5185f3 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 |