Re: [PATCH] target_core_sbc: use noop for SYNCHRONIZE_CACHE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2013-03-04 at 14:08 +0100, Hannes Reinecke wrote:
> 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@xxxxxxx>
> 
> diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
> index a664c66..3268483 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
> --

Applied to queue, and will include in the next fixes update.

Thanks Hannes!

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux