From: Nicholas Bellinger Date: Sun, 8 Feb 2015 12:02:08 +0000 (-0800) Subject: target: Add internal READ_INSERT support X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=72c0385014a140b6029c5c8bf88efb9ad166ae48;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 bfdd6237a3d1..b671ebbe1df6 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; }