On 2/9/22 13:24, Mike Christie wrote:
On 2/8/22 11:24 AM, Bart Van Assche wrote:
>> [ ... ]
qla4xxx doesn't use libiscsi for scsi_cmd based IO. It has it's own
queuecommand, completion path and error handlers, because it offloads
the entire scsi cmd operation.
It only uses libiscsi for iscsi passthrough IO which doesn't use the
scsi_cmnd.
static void qedi_conn_free_login_resources(struct qedi_ctx *qedi,
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 69a590546bf9..a122909169ee 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -216,11 +216,18 @@
#define IDC_COMP_TOV 5
#define LINK_UP_COMP_TOV 30
-#define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr)
+struct qla4xxx_cmd_priv {
+ struct iscsi_cmd iscsi_data; /* must be the first member */
+ struct srb *srb;
+};
So you don't need the iscsi_cmd above.
Thanks for the feedback Mike. However, leaving out struct iscsi_cmd from
the above data structure is something I'm nervous about because if there
would be any code in the qla4xxx driver that calls a libiscsi function
that writes into struct iscsi_cmd then that would trigger data corruption.
Bart.