From: Nicholas Bellinger Date: Sun, 8 Feb 2015 12:02:08 +0000 (-0800) Subject: target: Add internal READ_INSERT support X-Git-Tag: v4.14-rc1~5481^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72c0385014a140b6029c5c8bf88efb9ad166ae48;p=platform%2Fkernel%2Flinux-rpi.git target: Add internal READ_INSERT support This patch adds READ_INSERT support in target_read_prot_action() that invokes sbc_dif_generate() when LIO is responsible for generating the outgoing T10-PI. Required for supporting fabrics that exchange protection information, and would like to function with un-protected devices. Reviewed-by: Martin Petersen Reviewed-by: Sagi Grimberg Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index bfdd623..b671ebb 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1994,6 +1994,12 @@ static bool target_read_prot_action(struct se_cmd *cmd) } } break; + case TARGET_PROT_DIN_INSERT: + if (cmd->se_sess->sup_prot_ops & TARGET_PROT_DIN_INSERT) + break; + + sbc_dif_generate(cmd); + break; default: break; }