diff mbox

[01/22] qla2xxx: Fix wrong IOCB type assumption.

Message ID 1481056251-2310-2-git-send-email-himanshu.madhani@cavium.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Madhani, Himanshu Dec. 6, 2016, 8:30 p.m. UTC
From: Quinn Tran <quinn.tran@cavium.com>

qlt_reset is call with Immedidate Notification IOCB only.
Current code wrongly cast it as ATIO IOCB.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
---
 drivers/scsi/qla2xxx/qla_target.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Christoph Hellwig Dec. 14, 2016, 9:09 p.m. UTC | #1
On Tue, Dec 06, 2016 at 12:30:30PM -0800, Himanshu Madhani wrote:
> +	uint32_t unpacked_lun = 0;

Please remove the unpacked_lun variable as well, and just directly
pass 0 to qlt_issue_task_mgmt.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Madhani, Himanshu Dec. 15, 2016, 5:20 p.m. UTC | #2
On 12/14/16, 1:09 PM, "Christoph Hellwig" <hch@infradead.org> wrote:

>On Tue, Dec 06, 2016 at 12:30:30PM -0800, Himanshu Madhani wrote:

>> +	uint32_t unpacked_lun = 0;

>

>Please remove the unpacked_lun variable as well, and just directly

>pass 0 to qlt_issue_task_mgmt.


Ack, will update and resend this patch.

>
diff mbox

Patch

diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index bff9689..8a762a6 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -668,11 +668,10 @@  static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd)
 {
 	struct qla_hw_data *ha = vha->hw;
 	struct qla_tgt_sess *sess = NULL;
-	uint32_t unpacked_lun, lun = 0;
+	uint32_t unpacked_lun = 0;
 	uint16_t loop_id;
 	int res = 0;
 	struct imm_ntfy_from_isp *n = (struct imm_ntfy_from_isp *)iocb;
-	struct atio_from_isp *a = (struct atio_from_isp *)iocb;
 	unsigned long flags;
 
 	loop_id = le16_to_cpu(n->u.isp24.nport_handle);
@@ -725,9 +724,6 @@  static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd)
 	    "loop_id %d)\n", vha->host_no, sess, sess->port_name,
 	    mcmd, loop_id);
 
-	lun = a->u.isp24.fcp_cmnd.lun;
-	unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun);
-
 	return qlt_issue_task_mgmt(sess, unpacked_lun, mcmd,
 	    iocb, QLA24XX_MGMT_SEND_NACK);
 }