|
@@ -1365,6 +1365,13 @@ int target_submit_cmd_map_sgls(struct se_cmd *se_cmd, struct se_session *se_sess
|
|
|
target_put_sess_cmd(se_sess, se_cmd);
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
+ rc = target_setup_cmd_from_cdb(se_cmd, cdb);
|
|
|
+ if (rc != 0) {
|
|
|
+ transport_generic_request_failure(se_cmd, rc);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* Save pointers for SGLs containing protection information,
|
|
|
* if present.
|
|
@@ -1374,11 +1381,6 @@ int target_submit_cmd_map_sgls(struct se_cmd *se_cmd, struct se_session *se_sess
|
|
|
se_cmd->t_prot_nents = sgl_prot_count;
|
|
|
}
|
|
|
|
|
|
- rc = target_setup_cmd_from_cdb(se_cmd, cdb);
|
|
|
- if (rc != 0) {
|
|
|
- transport_generic_request_failure(se_cmd, rc);
|
|
|
- return 0;
|
|
|
- }
|
|
|
/*
|
|
|
* When a non zero sgl_count has been passed perform SGL passthrough
|
|
|
* mapping for pre-allocated fabric memory instead of having target
|