qla2xxx bug fixes
Subsystems (2)
Nilesh Javali
maintainercover qla2xxx bug fixes
Martin,
Please apply the qla2xxx bug fixes to the scsi tree at your earliest convenience.
Thanks,
Nilesh
Arun Easi (5):
qla2xxx: Fix compilation issue in PPC systems
qla2xxx: Fix crash during driver load on big endian machines
qla2xxx: Fix FW initialization error on big endian machines
qla2xxx: Fix flash update in 28XX adapters on big endian machines
qla2xxx: Fix device loss on 4G and older HBAs.
Daniel Wagner (1):
scsi: qla2xxx: Return EBUSY on fcport deletion
Nilesh Javali (1):
qla2xxx: Update version to 10.02.00.104-k
Quinn Tran (3):
qla2xxx: limit interrupt vectors to number of cpu
qla2xxx: tear down session if FW say its down
qla2xxx: fix N2N and NVME connect retry failure
Saurav Kashyap (5):
qla2xxx: Change post del message from debug level to log level
qla2xxx: Don't check for fw_started while posting nvme command
qla2xxx: Handle aborts correctly for port undergoing deletion
qla2xxx: Fix the call trace for flush workqueue
qla2xxx: If fcport is undergoing deletion return IO with retry
drivers/scsi/qla2xxx/qla_gs.c | 8 ++-- drivers/scsi/qla2xxx/qla_init.c | 74 ++++++++++++++++++++++-------- drivers/scsi/qla2xxx/qla_isr.c | 34 ++++++++++++-- drivers/scsi/qla2xxx/qla_mbx.c | 9 ++-- drivers/scsi/qla2xxx/qla_nvme.c | 14 +++--- drivers/scsi/qla2xxx/qla_nx.c | 2 +- drivers/scsi/qla2xxx/qla_nx2.c | 4 +- drivers/scsi/qla2xxx/qla_os.c | 10 ++-- drivers/scsi/qla2xxx/qla_sup.c | 10 ++-- drivers/scsi/qla2xxx/qla_tmpl.c | 9 ++-- drivers/scsi/qla2xxx/qla_tmpl.h | 2 +- drivers/scsi/qla2xxx/qla_version.h | 4 +- 12 files changed, 120 insertions(+), 60 deletions(-)
base-commit: cf4d4d8ebdb838ee996e09e3ee18deb9a7737dea
Signature · 1 line
2.19.0.rc0
Nilesh Javali
maintainerPATCH 1/15 scsi: qla2xxx: Return EBUSY on fcport deletion
From: Daniel Wagner <[email protected]>
When the fcport is about to be deleted we should return EBUSY instead of ENODEV. Only for EBUSY will the request be requeued in a multipath setup.
Also return EBUSY when the firmware has not yet started to avoid dropping the request.
--- drivers/scsi/qla2xxx/qla_nvme.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_nvme.c +4 -2
@@ -554,10 +554,12 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, fcport = qla_rport->fcport; -if (!qpair || !fcport || (qpair && !qpair->fw_started) || - (fcport && fcport->deleted)) +if (!qpair || !fcport)return -ENODEV ; +if (!qpair->fw_started || fcport->deleted) +return -EBUSY ; + vha = fcport->vha;if (!(fcport->nvme_flag &NVME_FLAG_REGISTERED ))
Signature · 1 line
2.19.0.rc0
Re: [PATCH 01/15] scsi: qla2xxx: Return EBUSY on fcport deletion
Quoted 42 lines · Nilesh Javali
From: Daniel Wagner <[email protected]>
When the fcport is about to be deleted we should return EBUSY instead of ENODEV. Only for EBUSY will the request be requeued in a multipath setup.
Also return EBUSY when the firmware has not yet started to avoid dropping the request.
Reviewed-by Arun Easi <[email protected]>Signed-off-by Daniel Wagner <[email protected]>Signed-off-by Martin K. Petersen <[email protected]>---
drivers/scsi/qla2xxx/qla_nvme.c| 6 ++++--1 file changed, 4 insertions(+), 2 deletions(-)drivers/scsi/qla2xxx/qla_nvme.c +4
-2@@ -554,10 +554,12 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, fcport = qla_rport->fcport; -if (!qpair || !fcport || (qpair && !qpair->fw_started) || - (fcport && fcport->deleted)) +if (!qpair || !fcport)return -ENODEV ; +if (!qpair->fw_started || fcport->deleted) +return -EBUSY ; + vha = fcport->vha;if (!(fcport->nvme_flag &NVME_FLAG_REGISTERED ))Signature · 1 line
2.19.0.rc0
Looks Good.
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 2/15 qla2xxx: Change post del message from debug level to log level
In reply to Nilesh JavaliFrom: Saurav Kashyap <[email protected]>
Change the message debug level.
--- drivers/scsi/qla2xxx/qla_gs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_gs.c +4 -4
@@ -3558,10 +3558,10 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)if (fcport->flags &FCF_FCP2_DEVICE ) fcport->logout_on_delete =0 ; -ql_dbg (ql_dbg_disc, vha,0x20f0 , -"%s %d %8phC post del sess\n" , - __func__, __LINE__, - fcport->port_name); +ql_log (ql_log_warn, vha,0x20f0 , +"%s %d %8phC post del sess\n" , + __func__, __LINE__, + fcport->port_name);qlt_schedule_sess_for_deletion (fcport);continue ;
Signature · 1 line
2.19.0.rc0
Re: [PATCH 02/15] qla2xxx: Change post del message from debug level to log level
Quoted 36 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
Change the message debug level.
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_gs.c| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)drivers/scsi/qla2xxx/qla_gs.c +4
-4@@ -3558,10 +3558,10 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)if (fcport->flags &FCF_FCP2_DEVICE ) fcport->logout_on_delete =0 ; -ql_dbg (ql_dbg_disc, vha,0x20f0 , -"%s %d %8phC post del sess\n" , - __func__, __LINE__, - fcport->port_name); +ql_log (ql_log_warn, vha,0x20f0 , +"%s %d %8phC post del sess\n" , + __func__, __LINE__, + fcport->port_name);qlt_schedule_sess_for_deletion (fcport);continue ;Signature · 1 line
2.19.0.rc0
I am okay with the change just curious, Would it not flood message file for large number of sessions?
--
Himanshu Madhani Oracle Linux Engineering
RE: [PATCH 02/15] qla2xxx: Change post del message from debug level to log level
Hi Himasnhu,
Comments inline
Quoted 44 lines
-----Original Message-----
From: Himanshu Madhani <[email protected]>
Sent: Tuesday, December 1, 2020 9:15 PM
To: Nilesh Javali <[email protected]>
Cc: Martin K . Petersen <[email protected]>; linux- [email protected]; GR-QLogic-Storage-Upstream <GR-QLogic-Storage- [email protected]>
Subject: Re: [PATCH 02/15] qla2xxx: Change post del message from debug level to log leveldrivers/scsi/qla2xxx/qla_gs.c void qla24xx_async_gnnft_done(scsi_qla_host_t
Quoted 17 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
Change the message debug level.
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_gs.c| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)drivers/scsi/qla2xxx/qla_gs.c +0
-0@@ -3558,10 +3558,10 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t*vha,
srb_t*sp)drivers/scsi/qla2xxx/qla_gs.c void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
Quoted 13 lines
drivers/scsi/qla2xxx/qla_gs.c +4
-4if (fcport->flags &FCF_FCP2_DEVICE ) fcport->logout_on_delete =0 ; -ql_dbg (ql_dbg_disc, vha,0x20f0 , -"%s %d %8phC post del sess\n" , - __func__, __LINE__, - fcport->port_name); +ql_log (ql_log_warn, vha,0x20f0 , +"%s %d %8phC post del sess\n" , + __func__, __LINE__, + fcport->port_name);qlt_schedule_sess_for_deletion(fcport);
Quoted 7 lines
Quoted 4 lines
drivers/scsi/qla2xxx/qla_gs.c +0
-1continue ; --2.19.0.rc0
I am okay with the change just curious, Would it not flood message file for large number of sessions?
This was added mainly for help in debugging, if debug is not enabled. Sometimes we get logs where it's hard to tell what happened to particular session. Moreover session deletion is not very common scenario.
Thanks,
~Saurav
Quoted 3 lines
--
Himanshu Madhani Oracle Linux Engineering
Re: [PATCH 02/15] qla2xxx: Change post del message from debug level to log level
Quoted 56 lines · Saurav Kashyap
Hi Himasnhu,
Comments inlineQuoted 49 lines
-----Original Message-----
From: Himanshu Madhani <[email protected]>
Sent: Tuesday, December 1, 2020 9:15 PM
To: Nilesh Javali <[email protected]>
Cc: Martin K . Petersen <[email protected]>; linux- [email protected]; GR-QLogic-Storage-Upstream <GR-QLogic-Storage- [email protected]>
Subject: Re: [PATCH 02/15] qla2xxx: Change post del message from debug level to log leveldrivers/scsi/qla2xxx/qla_gs.c void qla24xx_async_gnnft_done(scsi_qla_host_t
Quoted 17 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
Change the message debug level.
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_gs.c| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)drivers/scsi/qla2xxx/qla_gs.c +0
-0@@ -3558,10 +3558,10 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t*vha,
srb_t*sp)drivers/scsi/qla2xxx/qla_gs.c void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
Quoted 13 lines
drivers/scsi/qla2xxx/qla_gs.c +4
-4if (fcport->flags &FCF_FCP2_DEVICE ) fcport->logout_on_delete =0 ; -ql_dbg (ql_dbg_disc, vha,0x20f0 , -"%s %d %8phC post del sess\n" , - __func__, __LINE__, - fcport->port_name); +ql_log (ql_log_warn, vha,0x20f0 , +"%s %d %8phC post del sess\n" , + __func__, __LINE__, + fcport->port_name);qlt_schedule_sess_for_deletion(fcport);Quoted 4 lines
drivers/scsi/qla2xxx/qla_gs.c +0
-1continue ; --2.19.0.rc0
Quoted 7 lines
Quoted 2 lines
I am okay with the change just curious, Would it not flood message file for large number of sessions?
This was added mainly for help in debugging, if debug is not enabled. Sometimes we get logs where it's hard to tell what happened to particular session. Moreover session deletion is not very common scenario.
In that case, I would also prefer to see message coming out from qlt_schedule_sess_for_deletion(), because that’s where you can track that session is scheduled for deletion.
I would prefer this message also changed to ql_log_warn.
ql_dbg(ql_dbg_disc, sess->vha, 0xe001,
"Scheduling sess %p for deletion %8phC\n",
sess, sess->port_name);Quoted 6 lines
Thanks,
~SauravQuoted 3 lines
--
Himanshu Madhani Oracle Linux Engineering
--
Himanshu Madhani Oracle Linux Engineering
RE: [EXT] Re: [PATCH 02/15] qla2xxx: Change post del message from debug level to log level
Hi Himanshu,
Quoted 86 lines
-----Original Message-----
From: Himanshu Madhani <[email protected]>
Sent: Tuesday, December 1, 2020 9:46 PM
To: Saurav Kashyap <[email protected]>
Cc: Nilesh Javali <[email protected]>; Martin K . Petersen <[email protected]>; [email protected]; GR-QLogic- Storage-Upstream <[email protected]>
Subject: [EXT] Re: [PATCH 02/15] qla2xxx: Change post del message from debug level to log levelExternal Email
----------------------------------------------------------------------
Quoted 1 line
On Dec 1, 2020, at 10:05 AM, Saurav Kashyap <[email protected]>
Quoted 12 lines · wrote:
Hi Himasnhu,
Comments inlineQuoted 8 lines
-----Original Message-----
From: Himanshu Madhani <[email protected]>
Sent: Tuesday, December 1, 2020 9:15 PM
To: Nilesh Javali <[email protected]>
Cc: Martin K . Petersen <[email protected]>; linux- [email protected]; GR-QLogic-Storage-Upstream <GR-QLogic-Storage- [email protected]>
Subject: Re: [PATCH 02/15] qla2xxx: Change post del message from debuglevel
Quoted 16 lines
Quoted 16 lines
to log level
Quoted 12 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
Change the message debug level.
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_gs.c| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)Quoted 5 lines
Quoted 5 lines
drivers/scsi/qla2xxx/qla_gs.c void
Quoted 5 lines
drivers/scsi/qla2xxx/qla_gs.c +0
-0@@ -3558,10 +3558,10 @@ voidqla24xx_async_gnnft_done(scsi_qla_host_t
Quoted 20 lines
Quoted 20 lines
*vha,
srb_t*sp)drivers/scsi/qla2xxx/qla_gs.c void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
Quoted 13 lines
drivers/scsi/qla2xxx/qla_gs.c +4
-4if (fcport->flags &FCF_FCP2_DEVICE ) fcport->logout_on_delete =0 ; -ql_dbg (ql_dbg_disc, vha,0x20f0 , -"%s %d %8phC post del sess\n" , - __func__, __LINE__, - fcport->port_name); +ql_log (ql_log_warn, vha,0x20f0 , +"%s %d %8phC post del sess\n" , + __func__, __LINE__, + fcport->port_name);qlt_schedule_sess_for_deletion(fcport);Quoted 4 lines
drivers/scsi/qla2xxx/qla_gs.c +0
-1continue ; --2.19.0.rc0
Quoted 4 lines
Quoted 2 lines
I am okay with the change just curious, Would it not flood message file for large number of sessions?
This was added mainly for help in debugging, if debug is not enabled.
Sometimes we get logs
Quoted 1 line
where it's hard to tell what happened to particular session. Moreover session
deletion is not
Quoted 2 lines
very common scenario.
In that case, I would also prefer to see message coming out from
qlt_schedule_sess_for_deletion(), because that’s where you can track that session is scheduled for deletion.
Quoted 5 lines
I would prefer this message also changed to
ql_log_warn.ql_dbg(ql_dbg_disc, sess->vha, 0xe001, "Scheduling sess %p for deletion %8phC\n", sess, sess->port_name);
Make sense, will update it in next version.
Thanks,
~Saurav
Quoted 10 lines
Quoted 7 lines
Thanks,
~SauravQuoted 3 lines
--
Himanshu Madhani Oracle Linux Engineering--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 3/15 qla2xxx: limit interrupt vectors to number of cpu
In reply to Nilesh JavaliFrom: Quinn Tran <[email protected]>
Driver created too many QPairs(126) with 28xx adapter. Limit the number of CPUs to lower wasted resources.
--- drivers/scsi/qla2xxx/qla_isr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_isr.c +4 -2
@@ -3952,10 +3952,12 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)if (USER_CTRL_IRQ (ha) || !ha->mqiobase) {/* user wants to control IRQ setting for target mode */ ret =pci_alloc_irq_vectors (ha->pdev, min_vecs, - ha->msix_count,PCI_IRQ_MSIX ); +min ((u16 )ha->msix_count, (u16 )num_online_cpus ()), +PCI_IRQ_MSIX ); }else ret =pci_alloc_irq_vectors_affinity (ha->pdev, min_vecs, - ha->msix_count,PCI_IRQ_MSIX |PCI_IRQ_AFFINITY , +min ((u16 )ha->msix_count, (u16 )num_online_cpus ()), +PCI_IRQ_MSIX |PCI_IRQ_AFFINITY , &desc);if (ret <0 ) {
Signature · 1 line
2.19.0.rc0
Re: [PATCH 03/15] qla2xxx: limit interrupt vectors to number of cpu
Quoted 37 lines · Nilesh Javali
From: Quinn Tran <[email protected]>
Driver created too many QPairs(126) with 28xx adapter. Limit the number of CPUs to lower wasted resources.
Signed-off-by Quinn Tran <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_isr.c| 6 ++++--1 file changed, 4 insertions(+), 2 deletions(-)drivers/scsi/qla2xxx/qla_isr.c +4
-2@@ -3952,10 +3952,12 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)if (USER_CTRL_IRQ (ha) || !ha->mqiobase) {/* user wants to control IRQ setting for target mode */ ret =pci_alloc_irq_vectors (ha->pdev, min_vecs, - ha->msix_count,PCI_IRQ_MSIX ); +min ((u16 )ha->msix_count, (u16 )num_online_cpus ()), +PCI_IRQ_MSIX ); }else ret =pci_alloc_irq_vectors_affinity (ha->pdev, min_vecs, - ha->msix_count,PCI_IRQ_MSIX |PCI_IRQ_AFFINITY , +min ((u16 )ha->msix_count, (u16 )num_online_cpus ()), +PCI_IRQ_MSIX |PCI_IRQ_AFFINITY , &desc);if (ret <0 ) {Signature · 1 line
2.19.0.rc0
Looks good.
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 4/15 qla2xxx: tear down session if FW say its down
In reply to Nilesh JavaliFrom: Quinn Tran <[email protected]>
The completion status 0x28 (ppc = be = 0x2800) below indicate session is not there, trigger session deletion.
qla2xxx [000b:04:00.1]-8009:8: DEVICE RESET ISSUED nexus=8:1:51 cmd=c000001432d0f600. qla2xxx [000b:04:00.1]-5039:8: Async-tmf error - hdl=67b completion status(2800).
qla2xxx [000b:04:00.1]-8030:8: TM IOCB failed (102).
qla2xxx [000b:04:00.1]-800c:8: do_reset failed for cmd=c000001432d0f600.
qla2xxx [000b:04:00.1]-800f:8: DEVICE RESET FAILED: Task management failed nexus=8:1:51 cmd=c000001432d0f600. qla2xxx [000b:04:00.1]-8009:8: DEVICE RESET ISSUED nexus=8:1:52 cmd=c000001432d0c200. qla2xxx [000b:04:00.1]-5039:8: Async-tmf error - hdl=67c completion status(2800).
qla2xxx [000b:04:00.1]-8030:8: TM IOCB failed (102).
--- drivers/scsi/qla2xxx/qla_isr.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_isr.c +27 -1
@@ -2226,11 +2226,13 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk)srb_t *sp;struct srb_iocb *iocb;struct sts_entry_24xx *sts = (struct sts_entry_24xx *)tsk; +u16 comp_status; sp =qla2x00_get_sp_from_handle (vha, func, req, tsk);if (!sp)return ; + comp_status =le16_to_cpu (sts->comp_status); iocb = &sp->u.iocb_cmd; type = sp->name; fcport = sp->fcport;
@@ -2244,7 +2246,7 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) }else if (sts->comp_status !=cpu_to_le16 (CS_COMPLETE )) {ql_log (ql_log_warn, fcport->vha,0x5039 ,"Async-%s error - hdl=%x completion status(%x).\n" , - type, sp->handle, sts->comp_status); + type, sp->handle, comp_status); iocb->u.tmf.data =QLA_FUNCTION_FAILED ; }else if ((le16_to_cpu (sts->scsi_status) &SS_RESPONSE_INFO_LEN_VALID )) {
@@ -2260,6 +2262,30 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) } } +switch (comp_status) { +case CS_PORT_LOGGED_OUT : +case CS_PORT_CONFIG_CHG : +case CS_PORT_BUSY : +case CS_INCOMPLETE : +case CS_PORT_UNAVAILABLE : +case CS_TIMEOUT : +case CS_RESET : +if (atomic_read (&fcport->state) ==FCS_ONLINE ) { +ql_dbg (ql_dbg_disc, fcport->vha,0x3021 , +"-Port to be marked lost on fcport=%02x%02x%02x, current port state= %s comp_status %x.\n" , + fcport->d_id.b.domain, fcport->d_id.b.area, + fcport->d_id.b.al_pa, + port_state_str[FCS_ONLINE ], + comp_status); + +qlt_schedule_sess_for_deletion (fcport); + } +break ; + +default : +break ; + } +if (iocb->u.tmf.data !=QLA_SUCCESS )ql_dump_buffer (ql_dbg_async + ql_dbg_buffer, sp->vha,0x5055 , sts,sizeof (*sts));
Signature · 1 line
2.19.0.rc0
Re: [PATCH 04/15] qla2xxx: tear down session if FW say its down
Quoted 85 lines · Nilesh Javali
From: Quinn Tran <[email protected]>
The completion status
0x28(ppc = be =0x2800) below indicate session is not there, trigger session deletion.qla2xxx [000b:04:00.1]-8009:8: DEVICE RESET ISSUED nexus=8:1:51 cmd=c000001432d0f600. qla2xxx [000b:04:00.1]-5039:8: Async-tmf error - hdl=67b completion status(2800).
qla2xxx [000b:04:00.1]-8030:8: TM IOCB failed (102).
qla2xxx [000b:04:00.1]-800c:8:do_resetfailed for cmd=c000001432d0f600.
qla2xxx [000b:04:00.1]-800f:8: DEVICE RESET FAILED: Task management failed nexus=8:1:51 cmd=c000001432d0f600. qla2xxx [000b:04:00.1]-8009:8: DEVICE RESET ISSUED nexus=8:1:52 cmd=c000001432d0c200. qla2xxx [000b:04:00.1]-5039:8: Async-tmf error - hdl=67c completion status(2800).
qla2xxx [000b:04:00.1]-8030:8: TM IOCB failed (102).Signed-off-by Quinn Tran <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_isr.c| 28 +++++++++++++++++++++++++++-1 file changed, 27 insertions(+), 1 deletion(-)drivers/scsi/qla2xxx/qla_isr.c +27
-1@@ -2226,11 +2226,13 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk)srb_t *sp;struct srb_iocb *iocb;struct sts_entry_24xx *sts = (struct sts_entry_24xx *)tsk; +u16 comp_status; sp =qla2x00_get_sp_from_handle (vha, func, req, tsk);if (!sp)return ; + comp_status =le16_to_cpu (sts->comp_status); iocb = &sp->u.iocb_cmd; type = sp->name; fcport = sp->fcport;@@ -2244,7 +2246,7 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) }else if (sts->comp_status !=cpu_to_le16 (CS_COMPLETE )) {ql_log (ql_log_warn, fcport->vha,0x5039 ,"Async-%s error - hdl=%x completion status(%x).\n" , - type, sp->handle, sts->comp_status); + type, sp->handle, comp_status); iocb->u.tmf.data =QLA_FUNCTION_FAILED ; }else if ((le16_to_cpu (sts->scsi_status) &SS_RESPONSE_INFO_LEN_VALID )) {@@ -2260,6 +2262,30 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) } } +switch (comp_status) { +case CS_PORT_LOGGED_OUT : +case CS_PORT_CONFIG_CHG : +case CS_PORT_BUSY : +case CS_INCOMPLETE : +case CS_PORT_UNAVAILABLE : +case CS_TIMEOUT : +case CS_RESET : +if (atomic_read (&fcport->state) ==FCS_ONLINE ) { +ql_dbg (ql_dbg_disc, fcport->vha,0x3021 , +"-Port to be marked lost on fcport=%02x%02x%02x, current port state= %s comp_status %x.\n" , + fcport->d_id.b.domain, fcport->d_id.b.area, + fcport->d_id.b.al_pa, + port_state_str[FCS_ONLINE ], + comp_status); + +qlt_schedule_sess_for_deletion (fcport); + } +break ; + +default : +break ; + } +if (iocb->u.tmf.data !=QLA_SUCCESS )ql_dump_buffer (ql_dbg_async + ql_dbg_buffer, sp->vha,0x5055 , sts,sizeof (*sts));Signature · 1 line
2.19.0.rc0
Looks Good.
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 5/15 qla2xxx: Don't check for fw_started while posting nvme command
In reply to Nilesh JavaliFrom: Saurav Kashyap <[email protected]>
NVMe commands can come only after successful addition of rport and nvme connect, and rport is only registered after FW started bit is set. Remove the redundant check.
--- drivers/scsi/qla2xxx/qla_nvme.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/scsi/qla2xxx/qla_nvme.c +4 -8
@@ -554,19 +554,15 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, fcport = qla_rport->fcport; -if (!qpair || !fcport) -return -ENODEV ; - -if (!qpair->fw_started || fcport->deleted) +if (unlikely (!qpair || !fcport || fcport->deleted))return -EBUSY ; - vha = fcport->vha; -if (!(fcport->nvme_flag &NVME_FLAG_REGISTERED ))return -ENODEV ; -if (test_bit (ABORT_ISP_ACTIVE , &vha->dpc_flags) || - (qpair && !qpair->fw_started) || fcport->deleted) + vha = fcport->vha; + +if (test_bit (ABORT_ISP_ACTIVE , &vha->dpc_flags))return -EBUSY ;/*
Signature · 1 line
2.19.0.rc0
Re: [PATCH 05/15] qla2xxx: Don't check for fw_started while posting nvme command
Quoted 17 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
NVMe commands can come only after successful addition of rport and nvme connect, and rport is only registered after FW started bit is set. Remove the redundant check.
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>--- drivers/scsi/qla2xxx/qla_nvme.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)drivers/scsi/qla2xxx/qla_nvme.c +0
-0
drivers/scsi/qla2xxx/qla_nvme.c static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, · line 558
Quoted 9 lines
drivers/scsi/qla2xxx/qla_nvme.c +1
-4@@ -554,19 +554,15 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, fcport = qla_rport->fcport; -if (!qpair || !fcport) -return -ENODEV ; - -if (!qpair->fw_started || fcport->deleted) +if (unlikely (!qpair || !fcport || fcport->deleted))return -EBUSY ;
This reverts the fix from patch #1 in this series. What's the reasoning that needs to return EBUSY when !qpair || !fcport is true?
RE: [PATCH 05/15] qla2xxx: Don't check for fw_started while posting nvme command
Hi Daniel,
Comments inline..
Quoted 32 lines
-----Original Message-----
From: Daniel Wagner <[email protected]>
Sent: Tuesday, December 1, 2020 2:32 PM
To: Nilesh Javali <[email protected]>
Cc: [email protected]; [email protected]; GR-QLogic- Storage-Upstream <[email protected]>
Subject: Re: [PATCH 05/15] qla2xxx: Don't check forfw_startedwhile posting nvme commandQuoted 6 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
NVMe commands can come only after successful addition of rport and nvme connect, and rport is only registered after FW started bit is set. Remove the redundant check.
Review
Quoted 7 lines
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>--- drivers/scsi/qla2xxx/qla_nvme.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)(quoted diff) +0
-0
b/drivers/scsi/qla2xxx/qla_nvme.cdrivers/scsi/qla2xxx/qla_nvme.c static int qla_nvme_post_cmd(struct
Quoted 4 lines
index
b7a1dc24db38..d4159d5a4ffd100644drivers/scsi/qla2xxx/qla_nvme.c +0
-0@@ -554,19 +554,15 @@ static int qla_nvme_post_cmd(struct
nvme_fc_local_port*lport,Quoted 3 lines
drivers/scsi/qla2xxx/qla_nvme.c +0
-0fcport = qla_rport->fcport;
Quoted 9 lines
drivers/scsi/qla2xxx/qla_nvme.c static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, · line 558
Quoted 6 lines
drivers/scsi/qla2xxx/qla_nvme.c +1
-4-if (!qpair || !fcport) -return -ENODEV ; - -if (!qpair->fw_started || fcport->deleted) +if (unlikely (!qpair || !fcport || fcport->deleted))return -EBUSY ;This reverts the fix from patch #1 in this series. What's the reasoning that needs to return EBUSY when !qpair || !fcport is true?
<SK> Ideally driver should not hit (!qpair || !fcport) case. The patch was to remove fw_started flag and consolidate other checks. We want IO to retry until remote port is deleted and below condition is hit.
----------<condition>--------
if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED))
return rval;----------<condition>---------
Thanks,
~Saurav
Re: [PATCH 05/15] qla2xxx: Don't check for fw_started while posting nvme command
Hi Saurav
Quoted 17 lines · Saurav Kashyap
Quoted 7 lines
drivers/scsi/qla2xxx/qla_nvme.c static int qla_nvme_post_cmd(struct
Quoted 3 lines
drivers/scsi/qla2xxx/qla_nvme.c +0
-0@@ -554,19 +554,15 @@ static int qla_nvme_post_cmd(struct
nvme_fc_local_port*lport,Quoted 3 lines
drivers/scsi/qla2xxx/qla_nvme.c +0
-0fcport = qla_rport->fcport;Quoted 9 lines
drivers/scsi/qla2xxx/qla_nvme.c static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, · line 558
Quoted 6 lines
drivers/scsi/qla2xxx/qla_nvme.c +1
-4-if (!qpair || !fcport) -return -ENODEV ; - -if (!qpair->fw_started || fcport->deleted) +if (unlikely (!qpair || !fcport || fcport->deleted))return -EBUSY ;This reverts the fix from patch #1 in this series. What's the reasoning that needs to return EBUSY when !qpair || !fcport is true?
Quoted 2 lines
Ideally driver should not hit (!qpair || !fcport) case. The patch was to remove
fw_startedflag and consolidate other checks.
Looking again on the patch I think I got confused.
Quoted 1 line
We want IO to retry until remote port is deleted and below condition is hit.
The result of this patch is that in EBUSY will be returned in all the cases, not just for the case of fcport->deleted. So all is good from my point of view. Thanks for explaining.
Sorry for the noise.
Thanks,
Daniel
RE: [EXT] Re: [PATCH 05/15] qla2xxx: Don't check for fw_started while posting nvme command
Hi Daniel,
Quoted 38 lines
-----Original Message-----
From: Daniel Wagner <[email protected]>
Sent: Tuesday, December 1, 2020 3:24 PM
To: Saurav Kashyap <[email protected]>
Cc: Nilesh Javali <[email protected]>; [email protected]; linux- [email protected]; GR-QLogic-Storage-Upstream <GR-QLogic-Storage- [email protected]>
Subject: [EXT] Re: [PATCH 05/15] qla2xxx: Don't check forfw_startedwhile posting nvme commandExternal Email
----------------------------------------------------------------------
Hi SauravQuoted 17 lines · Saurav Kashyap
Quoted 7 lines
drivers/scsi/qla2xxx/qla_nvme.c static int qla_nvme_post_cmd(struct
Quoted 3 lines
drivers/scsi/qla2xxx/qla_nvme.c +0
-0@@ -554,19 +554,15 @@ static int qla_nvme_post_cmd(struct
nvme_fc_local_port*lport,Quoted 3 lines
drivers/scsi/qla2xxx/qla_nvme.c +0
-0fcport = qla_rport->fcport;Quoted 9 lines
drivers/scsi/qla2xxx/qla_nvme.c static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, · line 558
Quoted 6 lines
drivers/scsi/qla2xxx/qla_nvme.c +1
-4-if (!qpair || !fcport) -return -ENODEV ; - -if (!qpair->fw_started || fcport->deleted) +if (unlikely (!qpair || !fcport || fcport->deleted))return -EBUSY ;This reverts the fix from patch #1 in this series. What's the reasoning that needs to return EBUSY when !qpair || !fcport is true?
Quoted 2 lines
Ideally driver should not hit (!qpair || !fcport) case. The patch was to remove
fw_startedflag and consolidate other checks.Looking again on the patch I think I got confused.
Quoted 7 lines
Quoted 1 line
We want IO to retry until remote port is deleted and below condition is hit.
The result of this patch is that in EBUSY will be returned in all the cases, not just for the case of
fcport->deleted. So all is good from my point of view. Thanks for explaining.Sorry for the noise.
No problem, most welcome.
Thanks,
~Saurav
Quoted 3 lines
Thanks,
Daniel
Re: [PATCH 05/15] qla2xxx: Don't check for fw_started while posting nvme command
In reply to Nilesh JavaliQuoted 47 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
NVMe commands can come only after successful addition of rport and nvme connect, and rport is only registered after FW started bit is set. Remove the redundant check.
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_nvme.c| 12 ++++--------1 file changed, 4 insertions(+), 8 deletions(-)drivers/scsi/qla2xxx/qla_nvme.c +4
-8@@ -554,19 +554,15 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, fcport = qla_rport->fcport; -if (!qpair || !fcport) -return -ENODEV ; - -if (!qpair->fw_started || fcport->deleted) +if (unlikely (!qpair || !fcport || fcport->deleted))return -EBUSY ; - vha = fcport->vha; -if (!(fcport->nvme_flag &NVME_FLAG_REGISTERED ))return -ENODEV ; -if (test_bit (ABORT_ISP_ACTIVE , &vha->dpc_flags) || - (qpair && !qpair->fw_started) || fcport->deleted) + vha = fcport->vha; + +if (test_bit (ABORT_ISP_ACTIVE , &vha->dpc_flags))return -EBUSY ;/* Signature · 1 line
2.19.0.rc0
Looks Good
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 6/15 qla2xxx: Fix compilation issue in PPC systems
In reply to Nilesh JavaliFrom: Arun Easi <[email protected]>
Fix compile time errors reported on PPC systems.
--- drivers/scsi/qla2xxx/qla_nx.c | 2 +- drivers/scsi/qla2xxx/qla_nx2.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/qla2xxx/qla_nx.c +1 -1
@@ -965,7 +965,7 @@ qla82xx_read_status_reg(struct qla_hw_data *ha, uint32_t *val)static int qla82xx_flash_wait_write_finish (struct qla_hw_data *ha) { -uint32_t val; +uint32_t val =0 ;int i, ret;scsi_qla_host_t *vha =pci_get_drvdata (ha->pdev);
drivers/scsi/qla2xxx/qla_nx2.c +2 -2
@@ -139,7 +139,7 @@ qla8044_poll_wait_for_ready(struct scsi_qla_host *vha, uint32_t addr1, uint32_t mask) {unsigned long timeout; -uint32_t temp; +uint32_t temp =0 ;/* jiffies after 100ms */ timeout = jiffies +msecs_to_jiffies (TIMEOUT_100_MS );
@@ -2594,7 +2594,7 @@ qla8044_minidump_process_rdmux(struct scsi_qla_host *vha,struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr) { - uint32_t r_addr, s_stride, s_addr, s_value, loop_cnt, i, r_value; + uint32_t r_addr, s_stride, s_addr, s_value, loop_cnt, i, r_value = 0;struct qla8044_minidump_entry_mux *mux_hdr;uint32_t *data_ptr = *d_ptr;
Signature · 1 line
2.19.0.rc0
Re: [PATCH 06/15] qla2xxx: Fix compilation issue in PPC systems
Quoted 8 lines · Nilesh Javali
From: Arun Easi <[email protected]>
Fix compile time errors reported on PPC systems.
What is the error? Can you please add details in commit message for reference
Quoted 45 lines
Signed-off-by Arun Easi <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_nx.c| 2 +-drivers/scsi/qla2xxx/qla_nx2.c| 4 ++--2 files changed, 3 insertions(+), 3 deletions(-)drivers/scsi/qla2xxx/qla_nx.c +0
-0@@ -965,7 +965,7 @@ qla82xx_read_status_reg(struct qla_hw_data *ha, uint32_t *val)static int
qla82xx_flash_wait_write_finish(struct qla_hw_data *ha){drivers/scsi/qla2xxx/qla_nx.c +1
-1-uint32_t val; +uint32_t val =0 ;int i, ret; scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);drivers/scsi/qla2xxx/qla_nx2.c +2
-2@@ -139,7 +139,7 @@ qla8044_poll_wait_for_ready(struct scsi_qla_host *vha, uint32_t addr1, uint32_t mask) {unsigned long timeout; -uint32_t temp; +uint32_t temp =0 ;/* jiffies after 100ms */ timeout = jiffies +msecs_to_jiffies (TIMEOUT_100_MS );@@ -2594,7 +2594,7 @@ qla8044_minidump_process_rdmux(struct scsi_qla_host *vha,struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr) { - uint32_t r_addr, s_stride, s_addr, s_value, loop_cnt, i, r_value; + uint32_t r_addr, s_stride, s_addr, s_value, loop_cnt, i, r_value = 0;struct qla8044_minidump_entry_mux *mux_hdr;uint32_t *data_ptr = *d_ptr;Signature · 1 line
2.19.0.rc0
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 7/15 qla2xxx: Fix crash during driver load on big endian machines
In reply to Nilesh JavaliFrom: Arun Easi <[email protected]>
Crash stack:
[576544.715489] Unable to handle kernel paging request for data at address 0xd00000000f970000 [576544.715497] Faulting instruction address: 0xd00000000f880f64 [576544.715503] Oops: Kernel access of bad area, sig: 11 [#1] [576544.715506] SMP NR_CPUS=2048 NUMA pSeries : [576544.715703] NIP [d00000000f880f64] .qla27xx_fwdt_template_valid+0x94/0x100 [qla2xxx] [576544.715722] LR [d00000000f7952dc] .qla24xx_load_risc_flash+0x2fc/0x590 [qla2xxx] [576544.715726] Call Trace: [576544.715731] [c0000004d0ffb000] [c0000006fe02c350] 0xc0000006fe02c350 (unreliable) [576544.715750] [c0000004d0ffb080] [d00000000f7952dc] .qla24xx_load_risc_flash+0x2fc/0x590 [qla2xxx] [576544.715770] [c0000004d0ffb170] [d00000000f7aa034] .qla81xx_load_risc+0x84/0x1a0 [qla2xxx] [576544.715789] [c0000004d0ffb210] [d00000000f79f7c8] .qla2x00_setup_chip+0xc8/0x910 [qla2xxx] [576544.715808] [c0000004d0ffb300] [d00000000f7a631c] .qla2x00_initialize_adapter+0x4dc/0xb00 [qla2xxx] [576544.715826] [c0000004d0ffb3e0] [d00000000f78ce28] .qla2x00_probe_one+0xf08/0x2200 [qla2xxx]
--- drivers/scsi/qla2xxx/qla_tmpl.c | 9 +++++---- drivers/scsi/qla2xxx/qla_tmpl.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/scsi/qla2xxx/qla_tmpl.c +5 -4
@@ -928,7 +928,8 @@ qla27xx_template_checksum(void *p, ulong size)static inline int qla27xx_verify_template_checksum (struct qla27xx_fwdt_template *tmp) { -return qla27xx_template_checksum (tmp, tmp->template_size) ==0 ; +return qla27xx_template_checksum (tmp, +le32_to_cpu (tmp->template_size)) ==0 ; } static inline int
@@ -944,7 +945,7 @@ qla27xx_execute_fwdt_template(struct scsi_qla_host *vha,ulong len =0 ;if (qla27xx_fwdt_template_valid (tmp)) { - len = tmp->template_size; + len =le32_to_cpu (tmp->template_size); tmp =memcpy (buf, tmp, len);ql27xx_edit_template (vha, tmp);qla27xx_walk_template (vha, tmp, buf, &len);
@@ -960,7 +961,7 @@ qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *vha, void *p)ulong len =0 ;if (qla27xx_fwdt_template_valid (tmp)) { - len = tmp->template_size; + len =le32_to_cpu (tmp->template_size);qla27xx_walk_template (vha, tmp,NULL , &len); }
@@ -972,7 +973,7 @@ qla27xx_fwdt_template_size(void *p) {struct qla27xx_fwdt_template *tmp = p; -return tmp->template_size; +return le32_to_cpu (tmp->template_size); }int
drivers/scsi/qla2xxx/qla_tmpl.h +1 -1
@@ -12,7 +12,7 @@struct __packed qla27xx_fwdt_template {__le32 template_type;__le32 entry_offset; -uint32_t template_size; +__le32 template_size;uint32_t count;/* borrow field for running/residual count */ __le32 entry_count;
Signature · 1 line
2.19.0.rc0
Re: [PATCH 07/15] qla2xxx: Fix crash during driver load on big endian machines
Quoted 22 lines · Nilesh Javali
From: Arun Easi <[email protected]>
Crash stack:
[576544.715489] Unable to handle kernel paging request for data at address 0xd00000000f970000 [576544.715497] Faulting instruction address: 0xd00000000f880f64 [576544.715503] Oops: Kernel access of bad area, sig: 11 [#1] [576544.715506] SMP NR_CPUS=2048 NUMA pSeries : [576544.715703] NIP [d00000000f880f64] .qla27xx_fwdt_template_valid+0x94/0x100 [qla2xxx] [576544.715722] LR [d00000000f7952dc] .qla24xx_load_risc_flash+0x2fc/0x590 [qla2xxx] [576544.715726] Call Trace: [576544.715731] [c0000004d0ffb000] [c0000006fe02c350] 0xc0000006fe02c350 (unreliable) [576544.715750] [c0000004d0ffb080] [d00000000f7952dc] .qla24xx_load_risc_flash+0x2fc/0x590 [qla2xxx] [576544.715770] [c0000004d0ffb170] [d00000000f7aa034] .qla81xx_load_risc+0x84/0x1a0 [qla2xxx] [576544.715789] [c0000004d0ffb210] [d00000000f79f7c8] .qla2x00_setup_chip+0xc8/0x910 [qla2xxx] [576544.715808] [c0000004d0ffb300] [d00000000f7a631c] .qla2x00_initialize_adapter+0x4dc/0xb00 [qla2xxx] [576544.715826] [c0000004d0ffb3e0] [d00000000f78ce28] .qla2x00_probe_one+0xf08/0x2200 [qla2xxx]
Quoted 3 lines
Fixes f73cb695d3ec ("[SCSI] qla2xxx: Add support for ISP2071.")Signed-off-by Arun Easi <[email protected]>Signed-off-by Nilesh Javali <[email protected]>
I think this needs stable tag as well.
Quoted 62 lines
---
drivers/scsi/qla2xxx/qla_tmpl.c| 9 +++++----drivers/scsi/qla2xxx/qla_tmpl.h| 2 +-2 files changed, 6 insertions(+), 5 deletions(-)drivers/scsi/qla2xxx/qla_tmpl.c +0
-0@@ -928,7 +928,8 @@ qla27xx_template_checksum(void *p, ulong size)static inline int
qla27xx_verify_template_checksum(struct qla27xx_fwdt_template *tmp){drivers/scsi/qla2xxx/qla_tmpl.c +2
-1-return qla27xx_template_checksum (tmp, tmp->template_size) ==0 ; +return qla27xx_template_checksum (tmp, +le32_to_cpu (tmp->template_size)) ==0 ;}
static inline int
drivers/scsi/qla2xxx/qla_tmpl.c +3
-3@@ -944,7 +945,7 @@ qla27xx_execute_fwdt_template(struct scsi_qla_host *vha,ulong len =0 ;if (qla27xx_fwdt_template_valid (tmp)) { - len = tmp->template_size; + len =le32_to_cpu (tmp->template_size); tmp =memcpy (buf, tmp, len);ql27xx_edit_template (vha, tmp);qla27xx_walk_template (vha, tmp, buf, &len);@@ -960,7 +961,7 @@ qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *vha, void *p)ulong len =0 ;if (qla27xx_fwdt_template_valid (tmp)) { - len = tmp->template_size; + len =le32_to_cpu (tmp->template_size);qla27xx_walk_template (vha, tmp,NULL , &len); }@@ -972,7 +973,7 @@ qla27xx_fwdt_template_size(void *p) {struct qla27xx_fwdt_template *tmp = p; -return tmp->template_size; +return le32_to_cpu (tmp->template_size); }int
drivers/scsi/qla2xxx/qla_tmpl.h +1
-1@@ -12,7 +12,7 @@struct __packed qla27xx_fwdt_template {__le32 template_type;__le32 entry_offset; -uint32_t template_size; +__le32 template_size;uint32_t count;/* borrow field for running/residual count */ __le32 entry_count;Signature · 1 line
2.19.0.rc0
Otherwise.. Looks good
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 8/15 qla2xxx: Fix FW initialization error on big endian machines
In reply to Nilesh JavaliFrom: Arun Easi <[email protected]>
Some fields are not correctly byte swapped causing failure during initialization. As probe() returns failure, HBAs will not be claimed when this happens.
--- drivers/scsi/qla2xxx/qla_mbx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/qla2xxx/qla_mbx.c +3 -3
@@ -1129,7 +1129,7 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha)if (ha->flags.scm_supported_a && (ha->fw_attributes_ext[0 ] &FW_ATTR_EXT0_SCM_SUPPORTED )) { ha->flags.scm_supported_f =1 ; - ha->sf_init_cb->flags |=BIT_13 ; + ha->sf_init_cb->flags |=cpu_to_le16 (BIT_13 ); } ql_log(ql_log_info, vha, 0x11a3, "SCM in FW: %s\n", (ha->flags.scm_supported_f) ? "Supported" :
@@ -1137,9 +1137,9 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha)if (vha->flags.nvme2_enabled) {/* set BIT_15 of special feature control block for SLER */ - ha->sf_init_cb->flags |=BIT_15 ; + ha->sf_init_cb->flags |=cpu_to_le16 (BIT_15 );/* set BIT_14 of special feature control block for PI CTRL*/ - ha->sf_init_cb->flags |=BIT_14 ; + ha->sf_init_cb->flags |=cpu_to_le16 (BIT_14 ); } }
Signature · 1 line
2.19.0.rc0
Re: [PATCH 08/15] qla2xxx: Fix FW initialization error on big endian machines
Quoted 12 lines · Nilesh Javali
From: Arun Easi <[email protected]>
Some fields are not correctly byte swapped causing failure during initialization. As
probe()returns failure, HBAs will not be claimed when this happens.Signed-off-by Arun Easi <[email protected]>Signed-off-by Nilesh Javali <[email protected]>
I think this patch needs following fixes tag
Quoted 32 lines
---
drivers/scsi/qla2xxx/qla_mbx.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/scsi/qla2xxx/qla_mbx.c +3
-3@@ -1129,7 +1129,7 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha)if (ha->flags.scm_supported_a && (ha->fw_attributes_ext[0 ] &FW_ATTR_EXT0_SCM_SUPPORTED )) { ha->flags.scm_supported_f =1 ; - ha->sf_init_cb->flags |=BIT_13 ; + ha->sf_init_cb->flags |=cpu_to_le16 (BIT_13 ); } ql_log(ql_log_info, vha, 0x11a3, "SCM in FW: %s\n", (ha->flags.scm_supported_f) ? "Supported" :@@ -1137,9 +1137,9 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha)if (vha->flags.nvme2_enabled) {/* set BIT_15 of special feature control block for SLER */ - ha->sf_init_cb->flags |=BIT_15 ; + ha->sf_init_cb->flags |=cpu_to_le16 (BIT_15 );/* set BIT_14 of special feature control block for PI CTRL*/ - ha->sf_init_cb->flags |=BIT_14 ; + ha->sf_init_cb->flags |=cpu_to_le16 (BIT_14 ); } }Signature · 1 line
2.19.0.rc0
Otherwise, Looks good.
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 9/15 qla2xxx: fix N2N and NVME connect retry failure
In reply to Nilesh JavaliFrom: Quinn Tran <[email protected]>
FC-NVMe target discovery failed when initiator wwpn < target wwpn in an N2N (Direct Attach) config, where the driver was stuck on FCP PRLI mode and failed to retry with NVME PRLI.
--- drivers/scsi/qla2xxx/qla_init.c | 71 ++++++++++++++++++++++++--------- drivers/scsi/qla2xxx/qla_mbx.c | 3 -- 2 files changed, 52 insertions(+), 22 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +52 -19
@@ -1268,9 +1268,10 @@ qla24xx_async_prli(struct scsi_qla_host *vha, fc_port_t *fcport) lio->u.logio.flags |=SRB_LOGIN_NVME_PRLI ;ql_dbg (ql_dbg_disc, vha,0x211b , -"Async-prli - %8phC hdl=%x, loopid=%x portid=%06x retries=%d %s.\n" , +"Async-prli - %8phC hdl=%x, loopid=%x portid=%06x retries=%d fc4type %x priority %x %s.\n" , fcport->port_name, sp->handle, fcport->loop_id, fcport->d_id.b24, - fcport->login_retry,NVME_TARGET (vha->hw, fcport) ?"nvme" :"fc" ); + fcport->login_retry, fcport->fc4_type, vha->hw->fc4_type_priority, +NVME_TARGET (vha->hw, fcport) ?"nvme" :"fcp" ); rval =qla2x00_start_sp (sp);if (rval !=QLA_SUCCESS ) {
@@ -1932,26 +1933,58 @@ qla24xx_handle_prli_done_event(struct scsi_qla_host *vha, struct event_arg *ea)break ; } -/* -* Retry PRLI with other FC-4 type if failure occurred on dual -* FCP/NVMe port -*/ -if (NVME_FCP_TARGET (ea->fcport)) { -ql_dbg (ql_dbg_disc, vha,0x2118 , -"%s %d %8phC post %s prli\n" , - __func__, __LINE__, ea->fcport->port_name, - (ea->fcport->fc4_type &FS_FC4TYPE_NVME ) ? -"NVMe" :"FCP" ); -if (vha->hw->fc4_type_priority ==FC4_PRIORITY_NVME ) +ql_dbg (ql_dbg_disc, vha,0x2118 , +"%s %d %8phC priority %s, fc4type %x\n" , + __func__, __LINE__, ea->fcport->port_name, + vha->hw->fc4_type_priority ==FC4_PRIORITY_FCP ? +"FCP" :"NVMe" , ea->fcport->fc4_type); + +if (N2N_TOPO (vha->hw)) { +if (vha->hw->fc4_type_priority ==FC4_PRIORITY_NVME ) { ea->fcport->fc4_type &= ~FS_FC4TYPE_NVME ; -else + ea->fcport->fc4_type |=FS_FC4TYPE_FCP ; + }else { ea->fcport->fc4_type &= ~FS_FC4TYPE_FCP ; - } + ea->fcport->fc4_type |=FS_FC4TYPE_NVME ; + } - ea->fcport->flags &= ~FCF_ASYNC_SENT ; - ea->fcport->keep_nport_handle =0 ; - ea->fcport->logout_on_delete =1 ; -qlt_schedule_sess_for_deletion (ea->fcport); +if (ea->fcport->n2n_link_reset_cnt <3 ) { + ea->fcport->n2n_link_reset_cnt++; + vha->relogin_jif = jiffies +2 *HZ ; +/* +* PRLI failed. Reset link to kick start +* state machine +*/ +set_bit (N2N_LINK_RESET , &vha->dpc_flags); + }else { +ql_log (ql_log_warn, vha,0x2119 , +"%s %d %8phC Unable to reconnect\n" , + __func__, __LINE__, + ea->fcport->port_name); + } + }else { +/* +* switch connect. login failed. Take connection down +* and allow relogin to retrigger +*/ +if (NVME_FCP_TARGET (ea->fcport)) { +ql_dbg (ql_dbg_disc, vha,0x2118 , +"%s %d %8phC post %s prli\n" , + __func__, __LINE__, + ea->fcport->port_name, + (ea->fcport->fc4_type &FS_FC4TYPE_NVME ) + ?"NVMe" :"FCP" ); +if (vha->hw->fc4_type_priority ==FC4_PRIORITY_NVME ) + ea->fcport->fc4_type &= ~FS_FC4TYPE_NVME ; +else + ea->fcport->fc4_type &= ~FS_FC4TYPE_FCP ; + } + + ea->fcport->flags &= ~FCF_ASYNC_SENT ; + ea->fcport->keep_nport_handle =0 ; + ea->fcport->logout_on_delete =1 ; +qlt_schedule_sess_for_deletion (ea->fcport); + }break ; } }
drivers/scsi/qla2xxx/qla_mbx.c +0 -3
@@ -3998,9 +3998,6 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, fcport->scan_state =QLA_FCPORT_FOUND ; fcport->n2n_flag =1 ; fcport->keep_nport_handle =1 ; - fcport->fc4_type =FS_FC4TYPE_FCP ; -if (vha->flags.nvme_enabled) - fcport->fc4_type |=FS_FC4TYPE_NVME ;if (wwn_to_u64 (vha->port_name) >wwn_to_u64 (fcport->port_name)) {
Signature · 1 line
2.19.0.rc0
Re: [PATCH 09/15] qla2xxx: fix N2N and NVME connect retry failure
Quoted 12 lines · Nilesh Javali
From: Quinn Tran <[email protected]>
FC-NVMe target discovery failed when initiator wwpn < target wwpn in an N2N (Direct Attach) config, where the driver was stuck on FCP PRLI mode and failed to retry with NVME PRLI.
Signed-off-by Quinn Tran <[email protected]>Signed-off-by Nilesh Javali <[email protected]>
Missing Fixes tag
Quoted 115 lines
---
drivers/scsi/qla2xxx/qla_init.c| 71 ++++++++++++++++++++++++---------drivers/scsi/qla2xxx/qla_mbx.c| 3 --2 files changed, 52 insertions(+), 22 deletions(-)drivers/scsi/qla2xxx/qla_init.c +52
-19@@ -1268,9 +1268,10 @@ qla24xx_async_prli(struct scsi_qla_host *vha, fc_port_t *fcport) lio->u.logio.flags |=SRB_LOGIN_NVME_PRLI ;ql_dbg (ql_dbg_disc, vha,0x211b , -"Async-prli - %8phC hdl=%x, loopid=%x portid=%06x retries=%d %s.\n" , +"Async-prli - %8phC hdl=%x, loopid=%x portid=%06x retries=%d fc4type %x priority %x %s.\n" , fcport->port_name, sp->handle, fcport->loop_id, fcport->d_id.b24, - fcport->login_retry,NVME_TARGET (vha->hw, fcport) ?"nvme" :"fc" ); + fcport->login_retry, fcport->fc4_type, vha->hw->fc4_type_priority, +NVME_TARGET (vha->hw, fcport) ?"nvme" :"fcp" ); rval =qla2x00_start_sp (sp);if (rval !=QLA_SUCCESS ) {@@ -1932,26 +1933,58 @@ qla24xx_handle_prli_done_event(struct scsi_qla_host *vha, struct event_arg *ea)break ; } -/* -* Retry PRLI with other FC-4 type if failure occurred on dual -* FCP/NVMe port -*/ -if (NVME_FCP_TARGET (ea->fcport)) { -ql_dbg (ql_dbg_disc, vha,0x2118 , -"%s %d %8phC post %s prli\n" , - __func__, __LINE__, ea->fcport->port_name, - (ea->fcport->fc4_type &FS_FC4TYPE_NVME ) ? -"NVMe" :"FCP" ); -if (vha->hw->fc4_type_priority ==FC4_PRIORITY_NVME ) +ql_dbg (ql_dbg_disc, vha,0x2118 , +"%s %d %8phC priority %s, fc4type %x\n" , + __func__, __LINE__, ea->fcport->port_name, + vha->hw->fc4_type_priority ==FC4_PRIORITY_FCP ? +"FCP" :"NVMe" , ea->fcport->fc4_type); + +if (N2N_TOPO (vha->hw)) { +if (vha->hw->fc4_type_priority ==FC4_PRIORITY_NVME ) { ea->fcport->fc4_type &= ~FS_FC4TYPE_NVME ; -else + ea->fcport->fc4_type |=FS_FC4TYPE_FCP ; + }else { ea->fcport->fc4_type &= ~FS_FC4TYPE_FCP ; - } + ea->fcport->fc4_type |=FS_FC4TYPE_NVME ; + } - ea->fcport->flags &= ~FCF_ASYNC_SENT ; - ea->fcport->keep_nport_handle =0 ; - ea->fcport->logout_on_delete =1 ; -qlt_schedule_sess_for_deletion (ea->fcport); +if (ea->fcport->n2n_link_reset_cnt <3 ) { + ea->fcport->n2n_link_reset_cnt++; + vha->relogin_jif = jiffies +2 *HZ ; +/* +* PRLI failed. Reset link to kick start +* state machine +*/ +set_bit (N2N_LINK_RESET , &vha->dpc_flags); + }else { +ql_log (ql_log_warn, vha,0x2119 , +"%s %d %8phC Unable to reconnect\n" , + __func__, __LINE__, + ea->fcport->port_name); + } + }else { +/* +* switch connect. login failed. Take connection down +* and allow relogin to retrigger +*/ +if (NVME_FCP_TARGET (ea->fcport)) { +ql_dbg (ql_dbg_disc, vha,0x2118 , +"%s %d %8phC post %s prli\n" , + __func__, __LINE__, + ea->fcport->port_name, + (ea->fcport->fc4_type &FS_FC4TYPE_NVME ) + ?"NVMe" :"FCP" ); +if (vha->hw->fc4_type_priority ==FC4_PRIORITY_NVME ) + ea->fcport->fc4_type &= ~FS_FC4TYPE_NVME ; +else + ea->fcport->fc4_type &= ~FS_FC4TYPE_FCP ; + } + + ea->fcport->flags &= ~FCF_ASYNC_SENT ; + ea->fcport->keep_nport_handle =0 ; + ea->fcport->logout_on_delete =1 ; +qlt_schedule_sess_for_deletion (ea->fcport); + }break ; } }drivers/scsi/qla2xxx/qla_mbx.c +0
-3@@ -3998,9 +3998,6 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, fcport->scan_state =QLA_FCPORT_FOUND ; fcport->n2n_flag =1 ; fcport->keep_nport_handle =1 ; - fcport->fc4_type =FS_FC4TYPE_FCP ; -if (vha->flags.nvme_enabled) - fcport->fc4_type |=FS_FC4TYPE_NVME ;if (wwn_to_u64 (vha->port_name) >wwn_to_u64 (fcport->port_name)) {Signature · 1 line
2.19.0.rc0
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 10/15 qla2xxx: Handle aborts correctly for port undergoing deletion
In reply to Nilesh JavaliFrom: Saurav Kashyap <[email protected]>
Call trace observed while shutting down the adapter ports (LINK DOWN). Handle aborts correctly.
--- drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_nvme.c +1 -1
@@ -227,7 +227,7 @@ static void qla_nvme_abort_work(struct work_struct *work)"%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n" , __func__, sp, sp->handle, fcport, fcport->deleted); -if (!ha->flags.fw_started && fcport->deleted) +if (!ha->flags.fw_started || fcport->deleted) goto out;if (ha->flags.host_shutting_down) {
Signature · 1 line
2.19.0.rc0
Re: [PATCH 10/15] qla2xxx: Handle aborts correctly for port undergoing deletion
Quoted 9 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
Call trace observed while shutting down the adapter ports (LINK DOWN). Handle aborts correctly.
Could you post call trace in commit message.
Quoted 22 lines
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_nvme.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qla2xxx/qla_nvme.c +1
-1@@ -227,7 +227,7 @@ static void qla_nvme_abort_work(struct work_struct *work)"%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n" , __func__, sp, sp->handle, fcport, fcport->deleted); -if (!ha->flags.fw_started && fcport->deleted) +if (!ha->flags.fw_started || fcport->deleted) goto out;if (ha->flags.host_shutting_down) {Signature · 1 line
2.19.0.rc0
Change itself is fine.
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 11/15 qla2xxx: Fix flash update in 28XX adapters on big endian machines
In reply to Nilesh JavaliFrom: Arun Easi <[email protected]>
Flash update failed due to missing endian conversion in FLT region access as well as in checksum computation.
--- drivers/scsi/qla2xxx/qla_sup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/scsi/qla2xxx/qla_sup.c +5 -5
@@ -2634,14 +2634,14 @@ qla28xx_extract_sfub_and_verify(struct scsi_qla_host *vha, uint32_t *buf, sizeof(struct secure_flash_update_block));for (i =0 ; i < (sizeof (struct secure_flash_update_block ) >>2 ); i++) - check_sum += p[i]; + check_sum +=le32_to_cpu (p[i]); check_sum = (~check_sum) +1 ; -if (check_sum != p[i]) { +if (check_sum !=le32_to_cpu (p[i])) {ql_log (ql_log_warn, vha,0x7097 ,"SFUB checksum failed, 0x%x, 0x%x\n" , - check_sum, p[i]); + check_sum,le32_to_cpu (p[i]));return QLA_COMMAND_ERROR ; }
@@ -2721,7 +2721,7 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,if (ha->flags.secure_adapter && region.attribute) {ql_log (ql_log_warn + ql_dbg_verbose, vha,0xffff , -"Region %x is secure\n" , region.code); +"Region %x is secure\n" ,le16_to_cpu (region.code));switch (le16_to_cpu (region.code)) {case FLT_REG_FW :
@@ -2775,7 +2775,7 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,default :ql_log (ql_log_warn + ql_dbg_verbose, vha,0xffff ,"Secure region %x not supported\n" , - region.code); +le16_to_cpu (region.code)); rval =QLA_COMMAND_ERROR ; goto done; }
Signature · 1 line
2.19.0.rc0
Re: [PATCH 11/15] qla2xxx: Fix flash update in 28XX adapters on big endian machines
Quoted 58 lines · Nilesh Javali
From: Arun Easi <[email protected]>
Flash update failed due to missing endian conversion in FLT region access as well as in checksum computation.
Signed-off-by Arun Easi <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_sup.c| 10 +++++-----1 file changed, 5 insertions(+), 5 deletions(-)drivers/scsi/qla2xxx/qla_sup.c +5
-5@@ -2634,14 +2634,14 @@ qla28xx_extract_sfub_and_verify(struct scsi_qla_host *vha, uint32_t *buf, sizeof(struct secure_flash_update_block));for (i =0 ; i < (sizeof (struct secure_flash_update_block ) >>2 ); i++) - check_sum += p[i]; + check_sum +=le32_to_cpu (p[i]); check_sum = (~check_sum) +1 ; -if (check_sum != p[i]) { +if (check_sum !=le32_to_cpu (p[i])) {ql_log (ql_log_warn, vha,0x7097 ,"SFUB checksum failed, 0x%x, 0x%x\n" , - check_sum, p[i]); + check_sum,le32_to_cpu (p[i]));return QLA_COMMAND_ERROR ; }@@ -2721,7 +2721,7 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,if (ha->flags.secure_adapter && region.attribute) {ql_log (ql_log_warn + ql_dbg_verbose, vha,0xffff , -"Region %x is secure\n" , region.code); +"Region %x is secure\n" ,le16_to_cpu (region.code));switch (le16_to_cpu (region.code)) {case FLT_REG_FW :@@ -2775,7 +2775,7 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,default :ql_log (ql_log_warn + ql_dbg_verbose, vha,0xffff ,"Secure region %x not supported\n" , - region.code); +le16_to_cpu (region.code)); rval =QLA_COMMAND_ERROR ; goto done; }Signature · 1 line
2.19.0.rc0
Looks Good.
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 12/15 qla2xxx: Fix the call trace for flush workqueue
In reply to Nilesh JavaliFrom: Saurav Kashyap <[email protected]>
The call trace was because workqueue was allocated without any flags, added WQ_MEM_RECLAIM as flag while allocation.
kernel: workqueue: WQ_MEM_RECLAIM
kblockd:blk_mq_run_work_fn is flushing !WQ_MEM_RECLAIM qla2xxx_wq:0x0
kernel: WARNING: CPU: 0 PID: 2475 atkernel/workqueue.c:2593 check_flush_dependency+0x110/0x130
kernel: CPU: 0 PID: 2475 Comm: kworker/0:1H Kdump:
loaded Tainted: G OE --------- - - 4.18.0-193.el8.x86_64 #1
kernel: Hardware name: HPE ProLiant XL170r Gen10/ProLiant XL170r Gen10, BIOS U38 05/21/2019
kernel: Workqueue: kblockd blk_mq_run_work_fn
kernel: RIP: 0010:check_flush_dependency+0x110/0x130
kernel: Code: ff ff 48 8b 50 18 48 8d 8b b0 00 00 00 49 89 e8 48 81 c6 b0 00 00 00 48 c7 c7 00 1e e9
95 c6 05 dc 9a 2f 01 01 e8 1a 42 fe ff <0f> 0b e9 0a ff ff ff 80 3d ca 9a 2f 01 0 0 75 95 e9 41 ff ff ff 90
kernel: RSP: 0018:ffffa40f48b2baf8 EFLAGS: 00010282
kernel: RAX: 0000000000000000 RBX: ffff946795282600 RCX: 0000000000000000
kernel: RDX: 000000000000005f RSI: ffffffff96a1af7f RDI: 0000000000000246
kernel: RBP: 0000000000000000 R08: ffffffff96a1af20 R09: 0000000000029480
kernel: R10: 00080c89bb3e7462 R11: 00000000000009ab R12: ffff946773628000
kernel: R13: 0000000000000282 R14: 0000000000000246 R15: ffffa40f48b2bb40
kernel: FS: 0000000000000000(0000) GS:ffff94679fa00000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 00005570c4b60110 CR3: 000000029140a005 CR4: 00000000007606f0
kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
kernel: PKRU: 55555554
kernel: Call Trace:
kernel: flush_workqueue+0x13a/0x440
kernel: qla2x00_wait_for_sess_deletion+0x1d6/0x200 [qla2xxx]
kernel: ? finish_wait+0x80/0x80
kernel: qla2xxx_disable_port+0x2b/0x30 [qla2xxx]
kernel: qla2x00_process_vendor_specific+0x1dc9/0x2d20 [qla2xxx]
kernel: ? blk_rq_map_sg+0x195/0x570
kernel: qla24xx_bsg_request+0x1a3/0xf90 [qla2xxx]
--- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -3265,7 +3265,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)"req->req_q_in=%p req->req_q_out=%p rsp->rsp_q_in=%p rsp->rsp_q_out=%p.\n" , req->req_q_in, req->req_q_out, rsp->rsp_q_in, rsp->rsp_q_out); - ha->wq =alloc_workqueue ("qla2xxx_wq" ,0 ,0 ); + ha->wq =alloc_workqueue ("qla2xxx_wq" ,WQ_MEM_RECLAIM ,0 );if (unlikely (!ha->wq)) { ret = -ENOMEM ; goto probe_failed;
Signature · 1 line
2.19.0.rc0
Re: [PATCH 12/15] qla2xxx: Fix the call trace for flush workqueue
Quoted 63 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
The call trace was because workqueue was allocated without any flags, added
WQ_MEM_RECLAIMas flag while allocation.kernel: workqueue:
WQ_MEM_RECLAIM
kblockd:blk_mq_run_work_fn is flushing !WQ_MEM_RECLAIM qla2xxx_wq:0x0
kernel: WARNING: CPU: 0 PID: 2475 atkernel/workqueue.c:2593check_flush_dependency+0x110/0x130
kernel: CPU: 0 PID: 2475 Comm: kworker/0:1H Kdump:
loaded Tainted: G OE --------- - - 4.18.0-193.el8.x86_64 #1
kernel: Hardware name: HPE ProLiant XL170r Gen10/ProLiant XL170r Gen10, BIOS U38 05/21/2019
kernel: Workqueue: kblockdblk_mq_run_work_fn
kernel: RIP: 0010:check_flush_dependency+0x110/0x130
kernel: Code: ff ff 48 8b 50 18 48 8d 8b b0 00 00 00 49 89 e8 48 81 c6 b0 00 00 00 48 c7 c7 00 1e e995 c6 05 dc 9a 2f 01 01 e8 1a 42 fe ff <0f> 0b e9 0a ff ff ff 80 3d ca 9a 2f 01 0 0 75 95 e9 41 ff ff ff 90kernel: RSP: 0018:ffffa40f48b2baf8 EFLAGS: 00010282
kernel: RAX: 0000000000000000 RBX:ffff946795282600RCX: 0000000000000000
kernel: RDX:000000000000005fRSI:ffffffff96a1af7fRDI: 0000000000000246
kernel: RBP: 0000000000000000 R08:ffffffff96a1af20R09: 0000000000029480
kernel: R10:00080c89bb3e7462R11:00000000000009abR12:ffff946773628000
kernel: R13: 0000000000000282 R14: 0000000000000246 R15:ffffa40f48b2bb40
kernel: FS: 0000000000000000(0000) GS:ffff94679fa00000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2:00005570c4b60110CR3:000000029140a005CR4:00000000007606f0
kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kernel: DR3: 0000000000000000 DR6:00000000fffe0ff0DR7: 0000000000000400
kernel: PKRU: 55555554
kernel: Call Trace:
kernel:flush_workqueue+0x13a/0x440
kernel:qla2x00_wait_for_sess_deletion+0x1d6/0x200[qla2xxx]
kernel: ?finish_wait+0x80/0x80
kernel:qla2xxx_disable_port+0x2b/0x30[qla2xxx]
kernel:qla2x00_process_vendor_specific+0x1dc9/0x2d20[qla2xxx]
kernel: ?blk_rq_map_sg+0x195/0x570
kernel:qla24xx_bsg_request+0x1a3/0xf90[qla2xxx]Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_os.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qla2xxx/qla_os.c +1
-1@@ -3265,7 +3265,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)"req->req_q_in=%p req->req_q_out=%p rsp->rsp_q_in=%p rsp->rsp_q_out=%p.\n" , req->req_q_in, req->req_q_out, rsp->rsp_q_in, rsp->rsp_q_out); - ha->wq =alloc_workqueue ("qla2xxx_wq" ,0 ,0 ); + ha->wq =alloc_workqueue ("qla2xxx_wq" ,WQ_MEM_RECLAIM ,0 );if (unlikely (!ha->wq)) { ret = -ENOMEM ; goto probe_failed;Signature · 1 line
2.19.0.rc0
Looks Good.
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 13/15 qla2xxx: If fcport is undergoing deletion return IO with retry
In reply to Nilesh JavaliFrom: Saurav Kashyap <[email protected]>
Driver unload with IOs causes server to crash. Return IO with retry if fcport undergoing deletion.
--- drivers/scsi/qla2xxx/qla_os.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +4 -4
@@ -884,8 +884,8 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) goto qc24_fail_command; } -if (!fcport) { - cmd->result =DID_NO_CONNECT <<16 ; +if (!fcport || fcport->deleted) { + cmd->result =DID_IMM_RETRY <<16 ; goto qc24_fail_command; }
@@ -966,8 +966,8 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, goto qc24_fail_command; } -if (!fcport) { - cmd->result =DID_NO_CONNECT <<16 ; +if (!fcport || fcport->deleted) { + cmd->result =DID_IMM_RETRY <<16 ; goto qc24_fail_command; }
Signature · 1 line
2.19.0.rc0
Re: [PATCH 13/15] qla2xxx: If fcport is undergoing deletion return IO with retry
Quoted 9 lines · Nilesh Javali
From: Saurav Kashyap <[email protected]>
Driver unload with IOs causes server to crash. Return IO with retry if fcport undergoing deletion.
Any call stack or panic signature to share in commit message?
Quoted 35 lines
Signed-off-by Saurav Kashyap <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_os.c| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)drivers/scsi/qla2xxx/qla_os.c +4
-4@@ -884,8 +884,8 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) goto qc24_fail_command; } -if (!fcport) { - cmd->result =DID_NO_CONNECT <<16 ; +if (!fcport || fcport->deleted) { + cmd->result =DID_IMM_RETRY <<16 ; goto qc24_fail_command; }@@ -966,8 +966,8 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, goto qc24_fail_command; } -if (!fcport) { - cmd->result =DID_NO_CONNECT <<16 ; +if (!fcport || fcport->deleted) { + cmd->result =DID_IMM_RETRY <<16 ; goto qc24_fail_command; }Signature · 1 line
2.19.0.rc0
Patch itself looks good.
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 14/15 qla2xxx: Fix device loss on 4G and older HBAs.
In reply to Nilesh JavaliFrom: Arun Easi <[email protected]>
Due to a bug in the older scan logic, when a once lost device re-appeared, it was not discovered. Fix this by resetting login_retry counter upon device discovery.
This is applicable only for 4G and older HBAs.
--- drivers/scsi/qla2xxx/qla_init.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/scsi/qla2xxx/qla_init.c +3 -0
@@ -5982,6 +5982,9 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)break ; } +if (fcport->login_retry ==0 ) + fcport->login_retry = + vha->hw->login_retry_count;/* * If device was not a fabric device before. */
Signature · 1 line
2.19.0.rc0
Re: [PATCH 14/15] qla2xxx: Fix device loss on 4G and older HBAs.
Quoted 35 lines · Nilesh Javali
From: Arun Easi <[email protected]>
Due to a bug in the older scan logic, when a once lost device re-appeared, it was not discovered. Fix this by resetting
login_retrycounter upon device discovery.This is applicable only for 4G and older HBAs.
Signed-off-by Arun Easi <[email protected]>Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_init.c| 3 +++1 file changed, 3 insertions(+)drivers/scsi/qla2xxx/qla_init.c +3
-0@@ -5982,6 +5982,9 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)break ; } +if (fcport->login_retry ==0 ) + fcport->login_retry = + vha->hw->login_retry_count;/* * If device was not a fabric device before. */ Signature · 1 line
2.19.0.rc0
--
Himanshu Madhani Oracle Linux Engineering
Nilesh Javali
maintainerPATCH 15/15 qla2xxx: Update version to 10.02.00.104-k
In reply to Nilesh Javali--- drivers/scsi/qla2xxx/qla_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_version.h +2 -2
@@ -6,9 +6,9 @@/* * Driver version */ -#define QLA2XXX_VERSION "10.02.00.103-k" +#define QLA2XXX_VERSION "10.02.00.104-k"#define QLA_DRIVER_MAJOR_VER 10#define QLA_DRIVER_MINOR_VER 2#define QLA_DRIVER_PATCH_VER 0 -#define QLA_DRIVER_BETA_VER 103 +#define QLA_DRIVER_BETA_VER 104
Signature · 1 line
2.19.0.rc0
Re: [PATCH 15/15] qla2xxx: Update version to 10.02.00.104-k
Quoted 28 lines · Nilesh Javali
Signed-off-by Nilesh Javali <[email protected]>---
drivers/scsi/qla2xxx/qla_version.h| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/qla2xxx/qla_version.h +2
-2@@ -6,9 +6,9 @@/* * Driver version */ -#define QLA2XXX_VERSION "10.02.00.103-k" +#define QLA2XXX_VERSION "10.02.00.104-k"#define QLA_DRIVER_MAJOR_VER 10#define QLA_DRIVER_MINOR_VER 2#define QLA_DRIVER_PATCH_VER 0 -#define QLA_DRIVER_BETA_VER 103 +#define QLA_DRIVER_BETA_VER 104Signature · 1 line
2.19.0.rc0
--
Himanshu Madhani Oracle Linux Engineering