|
@@ -1767,6 +1767,15 @@ void target_execute_cmd(struct se_cmd *cmd)
|
|
|
cmd->t_state = TRANSPORT_PROCESSING;
|
|
|
cmd->transport_state |= CMD_T_ACTIVE|CMD_T_BUSY|CMD_T_SENT;
|
|
|
spin_unlock_irq(&cmd->t_state_lock);
|
|
|
+ /*
|
|
|
+ * Perform WRITE_INSERT of PI using software emulation when backend
|
|
|
+ * device has PI enabled, if the transport has not already generated
|
|
|
+ * PI using hardware WRITE_INSERT offload.
|
|
|
+ */
|
|
|
+ if (cmd->prot_op == TARGET_PROT_DOUT_INSERT) {
|
|
|
+ if (!(cmd->se_sess->sup_prot_ops & TARGET_PROT_DOUT_INSERT))
|
|
|
+ sbc_dif_generate(cmd);
|
|
|
+ }
|
|
|
|
|
|
if (target_handle_task_attr(cmd)) {
|
|
|
spin_lock_irq(&cmd->t_state_lock);
|