qla2xxx: Fixes for FC-NVMe
Subsystems (3)
v2 cover qla2xxx: Fixes for FC-NVMe
Hi Martin,
This patch series addresses issue with FC-NVMe abort handling in the driver. Code has been cleaned up and devloss timeout support has been added in qla2xxx.
Please apply this series to 4.17/scsi-queue at your earliest convenience.
Hi Christoph, Sagi, Johannes, James,
Please review this series. I would however like this to be merged via Martin's SCSI tree.
Changes from v1-> v2
- Added reviewed-by tags for Hannes.
- Fixes build warning reported by kbuild robot
Thanks,
Himanshu
Darren Trapp (10):
qla2xxx: Set IIDMA and fcport state before qla_nvme_register_remote()
qla2xxx: Add changes for devloss timeout in driver
qla2xxx: Restore ZIO threshold setting
qla2xxx: Add FC-NVMe abort processing
qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change
qla2xxx: Return busy if rport going away
qla2xxx: Remove nvme_done_list
qla2xxx: Fix retry for PRLI RJT with reason of BUSY
qla2xxx: Fix FC-NVMe IO abort during driver reset
qla2xxx: Cleanup code to improve FC-NVMe error handling
Himanshu Madhani (2):
qla2xxx: Remove unneeded message and minor cleanup for FC-NVMe
qla2xxx: Update driver version to 10.00.00.06-k
Quinn Tran (1):
qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan
drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_def.h | 12 +- drivers/scsi/qla2xxx/qla_gbl.h | 4 +- drivers/scsi/qla2xxx/qla_gs.c | 274 ++++++++++++++++++++++++++++--------- drivers/scsi/qla2xxx/qla_init.c | 35 +++-- drivers/scsi/qla2xxx/qla_isr.c | 78 ++++------- drivers/scsi/qla2xxx/qla_mbx.c | 10 +- drivers/scsi/qla2xxx/qla_mid.c | 6 - drivers/scsi/qla2xxx/qla_nvme.c | 245 +++++++++++++++------------------ drivers/scsi/qla2xxx/qla_nvme.h | 9 +- drivers/scsi/qla2xxx/qla_os.c | 11 +- drivers/scsi/qla2xxx/qla_target.c | 13 +- drivers/scsi/qla2xxx/qla_target.h | 2 +- drivers/scsi/qla2xxx/qla_version.h | 2 +- 14 files changed, 416 insertions(+), 287 deletions(-)
Signature · 1 line
2.12.0
PATCH v2 1/13 qla2xxx: Remove unneeded message and minor cleanup for FC-NVMe
--- drivers/scsi/qla2xxx/qla_nvme.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/scsi/qla2xxx/qla_nvme.c +3 -8
@@ -113,8 +113,6 @@ static int qla_nvme_alloc_queue(struct nvme_fc_local_port *lport,return 0 ; } -ql_log (ql_log_warn, vha,0xffff , -"allocating q for idx=%x w/o cpu mask\n" , qidx); qpair =qla2xxx_create_qpair (vha,5 , vha->vp_idx, true);if (qpair ==NULL ) { ql_log(ql_log_warn, vha, 0x2122,
@@ -313,7 +311,6 @@ static int qla2x00_start_nvme_mq(srb_t *sp)uint16_t avail_dsds;uint32_t *cur_dsd;struct req_que *req =NULL ; -struct rsp_que *rsp =NULL ;struct scsi_qla_host *vha = sp->fcport->vha;struct qla_hw_data *ha = vha->hw;struct qla_qpair *qpair = sp->qpair;
@@ -322,15 +319,13 @@ static int qla2x00_start_nvme_mq(srb_t *sp)struct nvmefc_fcp_req *fd = nvme->u.nvme.desc;uint32_t rval =QLA_SUCCESS ; +/* Setup qpair pointers */ + req = qpair->req; tot_dsds = fd->sg_cnt;/* Acquire qpair specific lock */ spin_lock_irqsave (&qpair->qp_lock, flags); -/* Setup qpair pointers */ - req = qpair->req; - rsp = qpair->rsp; -/* Check for room in outstanding command list. */ handle = req->current_outstanding_cmd;for (index =1 ; index < req->num_outstanding_cmds; index++) {
@@ -365,7 +360,7 @@ static int qla2x00_start_nvme_mq(srb_t *sp)struct nvme_fc_cmd_iu *cmd = fd->cmdaddr;if (cmd->sqe.common.opcode == nvme_admin_async_event) { nvme->u.nvme.aen_op =1 ; -atomic_inc (&vha->hw->nvme_active_aen_cnt); +atomic_inc (&ha->nvme_active_aen_cnt); } }
Signature · 1 line
2.12.0
PATCH v2 1/13 qla2xxx: Remove unneeded message and minor cleanup for FC-NVMe
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 2/13 qla2xxx: Set IIDMA and fcport state before qla_nvme_register_remote()
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
--- drivers/scsi/qla2xxx/qla_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +3 -2
@@ -5110,13 +5110,14 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) fcport->deleted =0 ; fcport->logout_on_delete =1 ; +qla2x00_set_fcport_state (fcport,FCS_ONLINE ); +qla2x00_iidma_fcport (vha, fcport); +if (fcport->fc4f_nvme) {qla_nvme_register_remote (vha, fcport);return ; } -qla2x00_set_fcport_state (fcport,FCS_ONLINE ); -qla2x00_iidma_fcport (vha, fcport);qla24xx_update_fcport_fcp_prio (vha, fcport); reg_port:
Signature · 1 line
2.12.0
PATCH v2 2/13 qla2xxx: Set IIDMA and fcport state before qla_nvme_register_remote()
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 3/13 qla2xxx: Add changes for devloss timeout in driver
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
Add support for error recovery within devloss timeout, now that FC-NVMe transport support devloss timeout.
--- drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 8 +++ drivers/scsi/qla2xxx/qla_isr.c | 5 +- drivers/scsi/qla2xxx/qla_nvme.c | 142 +++++++++++++++++--------------------- drivers/scsi/qla2xxx/qla_nvme.h | 6 +- drivers/scsi/qla2xxx/qla_target.c | 13 ++-- drivers/scsi/qla2xxx/qla_target.h | 2 +- 7 files changed, 87 insertions(+), 90 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +1 -0
@@ -2356,6 +2356,7 @@ typedef struct fc_port {#define NVME_PRLI_SP_DISCOVERY BIT_3uint8_t nvme_flag;#define NVME_FLAG_REGISTERED 4 +#define NVME_FLAG_DELETING 2struct fc_port *conflict;unsigned char logout_completed;
drivers/scsi/qla2xxx/qla_init.c +8 -0
@@ -5520,6 +5520,14 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)break ; } +if (fcport->fc4f_nvme) { +if (fcport->disc_state ==DSC_DELETE_PEND ) { + fcport->disc_state =DSC_GNL ; + vha->fcport_count--; + fcport->login_succ =0 ; + } + } +if (found) {spin_unlock_irqrestore (&vha->hw->tgt.sess_lock, flags);continue ;
drivers/scsi/qla2xxx/qla_isr.c +3 -2
@@ -1911,7 +1911,7 @@ qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) }else {switch (le16_to_cpu (sts->comp_status)) {case CS_COMPLETE : - ret =0 ; + ret =QLA_SUCCESS ;break ;case CS_ABORTED :
@@ -1923,7 +1923,8 @@ qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk)"NVME-%s ERR Handling - hdl=%x completion status(%x) resid=%x ox_id=%x\n" , sp->name, sp->handle, sts->comp_status, le32_to_cpu(sts->residual_len), sts->ox_id); - fd->transferred_length = fd->payload_length; + fd->transferred_length =0 ; + iocb->u.nvme.rsp_pyld_len =0 ; ret =QLA_ABORTED ;break ;
drivers/scsi/qla2xxx/qla_nvme.c +62 -80
314 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_nvme.h +4 -2
@@ -14,6 +14,9 @@#include "qla_def.h" +/* default dev loss time (seconds) before transport tears down ctrl */ +#define NVME_FC_DEV_LOSS_TMO 30 +#define NVME_ATIO_CMD_OFF 32#define NVME_FIRST_PACKET_CMDLEN (64 - NVME_ATIO_CMD_OFF)#define Q2T_NVME_NUM_TAGS 2048
@@ -31,8 +34,7 @@ struct nvme_private {int comp_status; }; -struct nvme_rport { -struct nvme_fc_port_info req; +struct qla_nvme_rport {struct list_head list;struct fc_port *fcport; };
drivers/scsi/qla2xxx/qla_target.c +8 -5
@@ -961,7 +961,7 @@ qlt_send_first_logo(struct scsi_qla_host *vha, qlt_port_logo_t *logo) logo->cmd_count, res); } -static void qlt_free_session_done (struct work_struct *work) +void qlt_free_session_done (struct work_struct *work) { struct fc_port *sess = container_of(work, struct fc_port, free_work);
@@ -1169,11 +1169,14 @@ void qlt_unreg_sess(struct fc_port *sess) sess->last_rscn_gen = sess->rscn_gen; sess->last_login_gen = sess->login_gen; -if (sess->nvme_flag &NVME_FLAG_REGISTERED ) +if (sess->nvme_flag &NVME_FLAG_REGISTERED && + !(sess->nvme_flag &NVME_FLAG_DELETING )) { + sess->nvme_flag |=NVME_FLAG_DELETING ;schedule_work (&sess->nvme_del_work); - -INIT_WORK (&sess->free_work, qlt_free_session_done); -schedule_work (&sess->free_work); + }else { +INIT_WORK (&sess->free_work, qlt_free_session_done); +schedule_work (&sess->free_work); + } }EXPORT_SYMBOL (qlt_unreg_sess);
drivers/scsi/qla2xxx/qla_target.h +1 -1
@@ -1016,7 +1016,7 @@ extern void qlt_fc_port_deleted(struct scsi_qla_host *, fc_port_t *, int);extern int __init qlt_init (void );extern void qlt_exit (void );extern void qlt_update_vp_map (struct scsi_qla_host *,int ); - +extern void qlt_free_session_done (struct work_struct *);/* * This macro is used during early initializations when host->active_mode * is not set. Right now, ha value is ignored.
Signature · 1 line
2.12.0
PATCH v2 3/13 qla2xxx: Add changes for devloss timeout in driver
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 4/13 qla2xxx: Restore ZIO threshold setting
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
--- drivers/scsi/qla2xxx/qla_nvme.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/scsi/qla2xxx/qla_nvme.c +0 -5
@@ -464,11 +464,6 @@ static int qla2x00_start_nvme_mq(srb_t *sp)/* Set chip new ring index. */ WRT_REG_DWORD (req->req_q_in, req->ring_index); -/* Manage unprocessed RIO/ZIO commands in response queue. */ -if (vha->flags.process_response_queue && - rsp->ring_ptr->signature !=RESPONSE_PROCESSED ) -qla24xx_process_response_queue (vha, rsp); - queuing_error:spin_unlock_irqrestore (&qpair->qp_lock, flags);return rval;
Signature · 1 line
2.12.0
PATCH v2 4/13 qla2xxx: Restore ZIO threshold setting
I'd really appreciate a more verbose changelog. No only on this patch, but in general.
Anyways,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 5/13 qla2xxx: Add FC-NVMe abort processing
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
--- drivers/scsi/qla2xxx/qla_nvme.c | 36 ++++++++++++++++++------------------ drivers/scsi/qla2xxx/qla_nvme.h | 1 + 2 files changed, 19 insertions(+), 18 deletions(-)
drivers/scsi/qla2xxx/qla_nvme.c +18 -18
@@ -181,24 +181,32 @@ static void qla_nvme_sp_done(void *ptr, int res)return ; } -static void qla_nvme_ls_abort (struct nvme_fc_local_port *lport, -struct nvme_fc_remote_port *rport,struct nvmefc_ls_req *fd) +static void qla_nvme_abort_work (struct work_struct *work) { -struct nvme_private *priv = fd->private; -struct qla_nvme_rport *qla_rport = rport->private; -fc_port_t *fcport = qla_rport->fcport; +struct nvme_private *priv = + container_of(work, struct nvme_private, abort_work);srb_t *sp = priv->sp; -int rval; +fc_port_t *fcport = sp->fcport;struct qla_hw_data *ha = fcport->vha->hw; +int rval; rval = ha->isp_ops->abort_command (sp);ql_dbg (ql_dbg_io, fcport->vha,0x212b , -"%s: %s LS command for sp=%p on fcport=%p rval=%x\n" , __func__, +"%s: %s command for sp=%p on fcport=%p rval=%x\n" , __func__, (rval !=QLA_SUCCESS ) ?"Failed to abort" :"Aborted" , sp, fcport, rval); } +static void qla_nvme_ls_abort (struct nvme_fc_local_port *lport, +struct nvme_fc_remote_port *rport,struct nvmefc_ls_req *fd) +{ +struct nvme_private *priv = fd->private; + +INIT_WORK (&priv->abort_work, qla_nvme_abort_work); +schedule_work (&priv->abort_work); +} +static void qla_nvme_ls_complete (struct work_struct *work) { struct nvme_private *priv =
@@ -264,18 +272,9 @@ static void qla_nvme_fcp_abort(struct nvme_fc_local_port *lport, struct nvmefc_fcp_req *fd) {struct nvme_private *priv = fd->private; -srb_t *sp = priv->sp; -int rval; -struct qla_nvme_rport *qla_rport = rport->private; -fc_port_t *fcport = qla_rport->fcport; -struct qla_hw_data *ha = fcport->vha->hw; - - rval = ha->isp_ops->abort_command (sp); -ql_dbg (ql_dbg_io, fcport->vha,0x2127 , -"%s: %s command for sp=%p on fcport=%p rval=%x\n" , __func__, - (rval !=QLA_SUCCESS ) ?"Failed to abort" :"Aborted" , - sp, fcport, rval); +INIT_WORK (&priv->abort_work, qla_nvme_abort_work); +schedule_work (&priv->abort_work); }static void qla_nvme_poll (struct nvme_fc_local_port *lport,void *hw_queue_handle)
@@ -650,6 +649,7 @@ void qla_nvme_delete(struct scsi_qla_host *vha)ql_log (ql_log_info, fcport->vha,0x2114 ,"%s: fcport=%p\n" , __func__, fcport); +nvme_fc_set_remoteport_devloss (fcport->nvme_remote_port,0 );init_completion (&fcport->nvme_del_done);nvme_fc_unregister_remoteport (fcport->nvme_remote_port);wait_for_completion (&fcport->nvme_del_done);
drivers/scsi/qla2xxx/qla_nvme.h +1 -0
@@ -31,6 +31,7 @@ struct nvme_private {struct srb *sp;struct nvmefc_ls_req *fd;struct work_struct ls_work; +struct work_struct abort_work;int comp_status; };
Signature · 1 line
2.12.0
PATCH v2 5/13 qla2xxx: Add FC-NVMe abort processing
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 6/13 qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
On a port db changes, this patch will set n2n_ae flag for N2N connection when requesting for Report ID Acquition MBX, instead of Loop Initialization or point to point asynchronous events.
--- drivers/scsi/qla2xxx/qla_def.h | 2 -- drivers/scsi/qla2xxx/qla_isr.c | 3 --- drivers/scsi/qla2xxx/qla_mbx.c | 3 +++ 3 files changed, 3 insertions(+), 5 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +0 -2
@@ -4282,8 +4282,6 @@ typedef struct scsi_qla_host {struct nvme_fc_local_port *nvme_local_port;struct completion nvme_del_done;struct list_head nvme_rport_list; -atomic_t nvme_active_aen_cnt; -uint16_t nvme_last_rptd_aen;uint16_t fcoe_vlan_id;uint16_t fcoe_fcf_idx;
drivers/scsi/qla2xxx/qla_isr.c +0 -3
@@ -768,7 +768,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)case MBA_LIP_OCCURRED :/* Loop Initialization Procedure */ ha->flags.lip_ae =1 ; - ha->flags.n2n_ae =0 ;ql_dbg (ql_dbg_async, vha,0x5009 ,"LIP occurred (%x).\n" , mb[1 ]);
@@ -812,7 +811,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)case MBA_LOOP_DOWN :/* Loop Down Event */ SAVE_TOPO (ha); - ha->flags.n2n_ae =0 ; ha->flags.lip_ae =0 ; ha->current_topology =0 ;
@@ -886,7 +884,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)/* case MBA_DCBX_COMPLETE: */ case MBA_POINT_TO_POINT :/* Point-to-Point */ ha->flags.lip_ae =0 ; - ha->flags.n2n_ae =1 ;if (IS_QLA2100 (ha))break ;
drivers/scsi/qla2xxx/qla_mbx.c +3 -0
@@ -3747,6 +3747,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, id.b.area = rptid_entry->port_id[1 ]; id.b.al_pa = rptid_entry->port_id[0 ]; id.b.rsvd_1 =0 ; + ha->flags.n2n_ae =0 ;if (rptid_entry->format ==0 ) {/* loop */
@@ -3799,6 +3800,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,set_bit (N2N_LOGIN_NEEDED , &vha->dpc_flags);set_bit (REGISTER_FC4_NEEDED , &vha->dpc_flags);set_bit (REGISTER_FDMI_NEEDED , &vha->dpc_flags); + ha->flags.n2n_ae =1 ;return ; }
@@ -3875,6 +3877,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, vha->d_id.b.area = rptid_entry->port_id[1 ]; vha->d_id.b.al_pa = rptid_entry->port_id[0 ]; + ha->flags.n2n_ae =1 ;spin_lock_irqsave (&ha->vport_slock, flags);qlt_update_vp_map (vha,SET_AL_PA );spin_unlock_irqrestore (&ha->vport_slock, flags);
Signature · 1 line
2.12.0
PATCH v2 6/13 qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 7/13 qla2xxx: Return busy if rport going away
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
This patch adds mechanism to return EBUSY if rport is going away to prevent exhausting FC-NVMe layer's retry counter.
--- drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_isr.c | 4 +++- drivers/scsi/qla2xxx/qla_nvme.c | 31 ++++++++++++++++++++----------- 3 files changed, 24 insertions(+), 12 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +1 -0
@@ -2357,6 +2357,7 @@ typedef struct fc_port {uint8_t nvme_flag;#define NVME_FLAG_REGISTERED 4#define NVME_FLAG_DELETING 2 +#define NVME_FLAG_RESETTING 1struct fc_port *conflict;unsigned char logout_completed;
drivers/scsi/qla2xxx/qla_isr.c +3 -1
@@ -1911,9 +1911,11 @@ qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) ret =QLA_SUCCESS ;break ; -case CS_ABORTED :case CS_RESET :case CS_PORT_UNAVAILABLE : + fcport->nvme_flag |=NVME_FLAG_RESETTING ; +/* fall through */ +case CS_ABORTED :case CS_PORT_LOGGED_OUT :case CS_PORT_BUSY : ql_log(ql_log_warn, fcport->vha, 0x5060,
drivers/scsi/qla2xxx/qla_nvme.c +20 -11
@@ -36,6 +36,7 @@ int qla_nvme_register_remote(struct scsi_qla_host *vha, struct fc_port *fcport)return 0 ;INIT_WORK (&fcport->nvme_del_work, qla_nvme_unregister_remote_port); + fcport->nvme_flag &= ~NVME_FLAG_RESETTING ;memset (&req,0 ,sizeof (struct nvme_fc_port_info )); req.port_name =wwn_to_u64 (fcport->port_name);
@@ -193,9 +194,9 @@ static void qla_nvme_abort_work(struct work_struct *work) rval = ha->isp_ops->abort_command (sp);ql_dbg (ql_dbg_io, fcport->vha,0x212b , -"%s: %s command for sp=%p on fcport=%p rval=%x\n" , __func__, - (rval !=QLA_SUCCESS ) ?"Failed to abort" :"Aborted" , - sp, fcport, rval); +"%s: %s command for sp=%p, handle=%x on fcport=%p rval=%x\n" , + __func__, (rval !=QLA_SUCCESS ) ?"Failed to abort" :"Aborted" , + sp, sp->handle, fcport, rval); } static void qla_nvme_ls_abort(struct nvme_fc_local_port *lport,
@@ -327,7 +328,7 @@ static int qla2x00_start_nvme_mq(srb_t *sp) }if (index == req->num_outstanding_cmds) { - rval =-1 ; + rval = -EBUSY ; goto queuing_error; } req_cnt =qla24xx_calc_iocbs (vha, tot_dsds);
@@ -341,7 +342,7 @@ static int qla2x00_start_nvme_mq(srb_t *sp) req->cnt = req->length - (req->ring_index - cnt);if (req->cnt < (req_cnt +2 )){ - rval =-1 ; + rval = -EBUSY ; goto queuing_error; } }
@@ -476,14 +477,15 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,fc_port_t *fcport;struct srb_iocb *nvme;struct scsi_qla_host *vha; -int rval =QLA_FUNCTION_FAILED ; +int rval = -ENODEV ;srb_t *sp;struct qla_qpair *qpair = hw_queue_handle;struct nvme_private *priv;struct qla_nvme_rport *qla_rport = rport->private; -if (!fd) { -ql_log (ql_log_warn,NULL ,0x2134 ,"NO NVMe FCP request\n" ); +if (!fd || !qpair) { +ql_log (ql_log_warn,NULL ,0x2134 , +"NO NVMe request or Queue Handle\n" );return rval; }
@@ -495,13 +497,21 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, } vha = fcport->vha; -if (!qpair) + +/* +* If we know the dev is going away while the transport is still sending +* IO's return busy back to stall the IO Q. This happens when the +* link goes away and fw hasn't notified us yet, but IO's are being +* returned. If the dev comes back quickly we won't exhaust the IO +* retry count at the core. +*/ +if (fcport->nvme_flag &NVME_FLAG_RESETTING )return -EBUSY ;/* Alloc SRB structure */ sp =qla2xxx_get_qpair_sp (qpair, fcport,GFP_ATOMIC );if (!sp) -return -EIO ; +return -EBUSY ;atomic_set (&sp->ref_count,1 );init_waitqueue_head (&sp->nvme_ls_waitq);
@@ -519,7 +529,6 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, "qla2x00_start_nvme_mq failed = %d\n", rval);atomic_dec (&sp->ref_count);wake_up (&sp->nvme_ls_waitq); -return -EIO ; }return rval;
Signature · 1 line
2.12.0
PATCH v2 7/13 qla2xxx: Return busy if rport going away
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 8/13 qla2xxx: Remove nvme_done_list
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
--- drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_gbl.h | 2 -- drivers/scsi/qla2xxx/qla_init.c | 1 - drivers/scsi/qla2xxx/qla_mid.c | 6 ------ drivers/scsi/qla2xxx/qla_nvme.c | 13 ++----------- drivers/scsi/qla2xxx/qla_os.c | 1 - 6 files changed, 2 insertions(+), 22 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +0 -1
@@ -3465,7 +3465,6 @@ struct qla_qpair {struct work_struct q_work;struct list_head qp_list_elem;/* vha->qp_list */ struct list_head hints_list; -struct list_head nvme_done_list;uint16_t cpuid;struct qla_tgt_counters tgt_counters; };
drivers/scsi/qla2xxx/qla_gbl.h +0 -2
@@ -896,6 +896,4 @@ void qlt_update_host_map(struct scsi_qla_host *, port_id_t);void qlt_remove_target_resources (struct qla_hw_data *);void qlt_clr_qp_table (struct scsi_qla_host *vha); -void qla_nvme_cmpl_io (struct srb_iocb *); -#endif /* _QLA_GBL_H */
drivers/scsi/qla2xxx/qla_init.c +0 -1
@@ -8408,7 +8408,6 @@ struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos, qpair->vp_idx = vp_idx; qpair->fw_started = ha->flags.fw_started;INIT_LIST_HEAD (&qpair->hints_list); -INIT_LIST_HEAD (&qpair->nvme_done_list); qpair->chip_reset = ha->base_qpair->chip_reset; qpair->enable_class_2 = ha->base_qpair->enable_class_2; qpair->enable_explicit_conf =
drivers/scsi/qla2xxx/qla_mid.c +0 -6
@@ -778,18 +778,12 @@ static void qla_do_work(struct work_struct *work) struct qla_qpair *qpair = container_of(work, struct qla_qpair, q_work);struct scsi_qla_host *vha;struct qla_hw_data *ha = qpair->hw; -struct srb_iocb *nvme, *nxt_nvme;spin_lock_irqsave (&qpair->qp_lock, flags); vha =pci_get_drvdata (ha->pdev);qla24xx_process_response_queue (vha, qpair->rsp);spin_unlock_irqrestore (&qpair->qp_lock, flags); -list_for_each_entry_safe (nvme, nxt_nvme, &qpair->nvme_done_list, - u.nvme.entry) { -list_del_init (&nvme->u.nvme.entry); -qla_nvme_cmpl_io (nvme); - } }/* create response queue */
drivers/scsi/qla2xxx/qla_nvme.c +2 -11
@@ -149,16 +149,6 @@ static void qla_nvme_sp_ls_done(void *ptr, int res)qla2x00_rel_sp (sp); } -void qla_nvme_cmpl_io (struct srb_iocb *nvme) -{ -srb_t *sp; -struct nvmefc_fcp_req *fd = nvme->u.nvme.desc; - - sp =container_of (nvme, srb_t, u.iocb_cmd); - fd->done (fd); -qla2xxx_rel_qpair_sp (sp->qpair, sp); -} -static void qla_nvme_sp_done (void *ptr,int res) {srb_t *sp = ptr;
@@ -177,7 +167,8 @@ static void qla_nvme_sp_done(void *ptr, int res) fd->status =NVME_SC_INTERNAL ; fd->rcv_rsplen = nvme->u.nvme.rsp_pyld_len; -list_add_tail (&nvme->u.nvme.entry, &sp->qpair->nvme_done_list); + fd->done (fd); +qla2xxx_rel_qpair_sp (sp->qpair, sp);return ; }
drivers/scsi/qla2xxx/qla_os.c +0 -1
@@ -397,7 +397,6 @@ static void qla_init_base_qpair(struct scsi_qla_host *vha, struct req_que *req, ha->base_qpair->use_shadow_reg =IS_SHADOW_REG_CAPABLE (ha) ?1 :0 ; ha->base_qpair->msix = &ha->msix_entries[QLA_MSIX_RSP_Q ];INIT_LIST_HEAD (&ha->base_qpair->hints_list); -INIT_LIST_HEAD (&ha->base_qpair->nvme_done_list); ha->base_qpair->enable_class_2 = ql2xenableclass2;/* init qpair to this cpu. Will adjust at run time. */ qla_cpu_update (rsp->qpair,raw_smp_processor_id ());
Signature · 1 line
2.12.0
PATCH v2 8/13 qla2xxx: Remove nvme_done_list
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 9/13 qla2xxx: Fix retry for PRLI RJT with reason of BUSY
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
--- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 13 ++++++++++++- drivers/scsi/qla2xxx/qla_mbx.c | 7 +++++-- 3 files changed, 18 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_dbg.c +1 -1
@@ -60,7 +60,7 @@* | | | 0xb13c-0xb140 | * | | | 0xb149 | * | MultiQ | 0xc010 | | -* | Misc | 0xd302 | 0xd031-0xd0ff | +* | Misc | 0xd303 | 0xd031-0xd0ff | * | | | 0xd101-0xd1fe | * | | | 0xd214-0xd2fe | * | Target Mode | 0xe081 | |
drivers/scsi/qla2xxx/qla_init.c +12 -1
@@ -875,7 +875,6 @@ qla24xx_async_prli(struct scsi_qla_host *vha, fc_port_t *fcport)return rval;if (fcport->fw_login_state ==DSC_LS_PLOGI_PEND || - fcport->fw_login_state ==DSC_LS_PLOGI_COMP || fcport->fw_login_state ==DSC_LS_PRLI_PEND )return rval;
@@ -1240,6 +1239,11 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)qla2x00_post_async_adisc_work (vha, fcport, data);break ; +case DSC_LOGIN_PEND : +if (fcport->fw_login_state ==DSC_LS_PLOGI_COMP ) +qla24xx_post_prli_work (vha, fcport); +break ; +default :break ; }
@@ -1643,6 +1647,13 @@ qla24xx_handle_prli_done_event(struct scsi_qla_host *vha, struct event_arg *ea)qla24xx_post_gpdb_work (vha, ea->fcport,0 );break ;default : +if ((ea->iop[0 ] ==LSC_SCODE_ELS_REJECT ) && + (ea->iop[1 ] ==0x50000 )) {/* reson 5=busy expl:0x0 */ +set_bit (RELOGIN_NEEDED , &vha->dpc_flags); + ea->fcport->fw_login_state =DSC_LS_PLOGI_COMP ; +break ; + } +if (ea->fcport->n2n_flag) { ql_dbg(ql_dbg_disc, vha, 0x2118, "%s %d %8phC post fc4 prli\n",
drivers/scsi/qla2xxx/qla_mbx.c +5 -2
@@ -1025,9 +1025,12 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha)* FW supports nvme and driver load parameter requested nvme. * BIT 26 of fw_attributes indicates NVMe support. */ -if ((ha->fw_attributes_h &0x400 ) && ql2xnvmeenable) +if ((ha->fw_attributes_h &0x400 ) && ql2xnvmeenable) { vha->flags.nvme_enabled =1 ; - +ql_log (ql_log_info, vha,0xd302 , +"%s: FC-NVMe is Enabled (0x%x)\n" , + __func__, ha->fw_attributes_h); + } }if (IS_QLA27XX (ha)) {
Signature · 1 line
2.12.0
PATCH v2 9/13 qla2xxx: Fix retry for PRLI RJT with reason of BUSY
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 10/13 qla2xxx: Fix FC-NVMe IO abort during driver reset
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
--- drivers/scsi/qla2xxx/qla_nvme.c | 17 ++++++++++++----- drivers/scsi/qla2xxx/qla_nvme.h | 2 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-)
drivers/scsi/qla2xxx/qla_nvme.c +12 -5
@@ -489,6 +489,9 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, vha = fcport->vha; +if (test_bit (ABORT_ISP_ACTIVE , &vha->dpc_flags)) +return rval; +/* * If we know the dev is going away while the transport is still sending * IO's return busy back to stall the IO Q. This happens when the
@@ -597,14 +600,18 @@ static int qla_nvme_wait_on_command(srb_t *sp)return ret; } -void qla_nvme_abort (struct qla_hw_data *ha,struct srb *sp) +void qla_nvme_abort (struct qla_hw_data *ha,struct srb *sp,int res) {int rval; - rval = ha->isp_ops->abort_command (sp); -if (!rval && !qla_nvme_wait_on_command (sp)) -ql_log (ql_log_warn,NULL ,0x2112 , -"nvme_wait_on_comand timed out waiting on sp=%p\n" , sp); +if (!test_bit (ABORT_ISP_ACTIVE , &sp->vha->dpc_flags)) { + rval = ha->isp_ops->abort_command (sp); +if (!rval && !qla_nvme_wait_on_command (sp)) +ql_log (ql_log_warn,NULL ,0x2112 , +"timed out waiting on sp=%p\n" , sp); + }else { + sp->done (sp, res); + } }static void qla_nvme_unregister_remote_port (struct work_struct *work)
drivers/scsi/qla2xxx/qla_nvme.h +1 -1
@@ -145,7 +145,7 @@ struct pt_ls4_rx_unsol {void qla_nvme_register_hba (struct scsi_qla_host *);int qla_nvme_register_remote (struct scsi_qla_host *,struct fc_port *);void qla_nvme_delete (struct scsi_qla_host *); -void qla_nvme_abort (struct qla_hw_data *,struct srb *sp); +void qla_nvme_abort (struct qla_hw_data *,struct srb *sp,int res);void qla24xx_nvme_ls4_iocb (struct scsi_qla_host *,struct pt_ls4_request *,struct req_que *);void qla24xx_async_gffid_sp_done (void *,int );
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -1743,7 +1743,7 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)sp_get (sp);spin_unlock_irqrestore (qp->qp_lock_ptr, flags); -qla_nvme_abort (ha, sp); +qla_nvme_abort (ha, sp, res);spin_lock_irqsave (qp->qp_lock_ptr, flags); } else if (GET_CMD_SP(sp) &&
Signature · 1 line
2.12.0
PATCH v2 10/13 qla2xxx: Fix FC-NVMe IO abort during driver reset
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 11/13 qla2xxx: Cleanup code to improve FC-NVMe error handling
In reply to Himanshu MadhaniFrom: Darren Trapp <[email protected]>
This patch cleans up ABTS handling for FC-NVMe by
- Removing allocation of sp, instead pass the sp pointer for abort IOCB
- Fix error handling from Transport failure
- set outstanding_cmds array to NULL for nvme completion
--- drivers/scsi/qla2xxx/qla_isr.c | 78 +++++++++++++++-------------------------- drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 2 files changed, 29 insertions(+), 51 deletions(-)
drivers/scsi/qla2xxx/qla_isr.c +28 -50
@@ -1838,31 +1838,23 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) sp->done (sp,0 ); } -static void -qla24xx_nvme_iocb_entry (scsi_qla_host_t *vha,struct req_que *req,void *tsk) +static void qla24xx_nvme_iocb_entry (scsi_qla_host_t *vha,struct req_que *req, +void *tsk,srb_t *sp) { -const char func[] ="NVME-IOCB" ;fc_port_t *fcport; -srb_t *sp;struct srb_iocb *iocb;struct sts_entry_24xx *sts = (struct sts_entry_24xx *)tsk;uint16_t state_flags;struct nvmefc_fcp_req *fd;uint16_t ret =0 ; -struct srb_iocb *nvme; - - sp =qla2x00_get_sp_from_handle (vha, func, req, tsk); -if (!sp) -return ; iocb = &sp->u.iocb_cmd; fcport = sp->fcport; iocb->u.nvme.comp_status =le16_to_cpu (sts->comp_status); state_flags =le16_to_cpu (sts->state_flags); fd = iocb->u.nvme.desc; - nvme = &sp->u.iocb_cmd; -if (unlikely (nvme->u.nvme.aen_op)) +if (unlikely (iocb->u.nvme.aen_op))atomic_dec (&sp->vha->hw->nvme_active_aen_cnt);/*
@@ -1896,45 +1888,30 @@ qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) fd->transferred_length = fd->payload_length -le32_to_cpu (sts->residual_len); -/* -* If transport error then Failure (HBA rejects request) -* otherwise transport will handle. -*/ -if (sts->entry_status) { -ql_log (ql_log_warn, fcport->vha,0x5038 , -"NVME-%s error - hdl=%x entry-status(%x).\n" , - sp->name, sp->handle, sts->entry_status); +switch (le16_to_cpu (sts->comp_status)) { +case CS_COMPLETE : + ret =QLA_SUCCESS ; +break ; +case CS_ABORTED : +case CS_RESET : +case CS_PORT_UNAVAILABLE : +case CS_PORT_LOGGED_OUT : +case CS_PORT_BUSY : +ql_log (ql_log_warn, fcport->vha,0x5060 , +"NVME-%s ERR Handling - hdl=%x completion status(%x) resid=%x ox_id=%x\n" , + sp->name, sp->handle, sts->comp_status, +le32_to_cpu (sts->residual_len), sts->ox_id); + fd->transferred_length =0 ; + iocb->u.nvme.rsp_pyld_len =0 ; + ret =QLA_ABORTED ; +break ; +default : +ql_log (ql_log_warn, fcport->vha,0x5060 , +"NVME-%s error - hdl=%x completion status(%x) resid=%x ox_id=%x\n" , + sp->name, sp->handle, sts->comp_status, +le32_to_cpu (sts->residual_len), sts->ox_id); ret =QLA_FUNCTION_FAILED ; - }else { -switch (le16_to_cpu (sts->comp_status)) { -case CS_COMPLETE : - ret =QLA_SUCCESS ; -break ; - -case CS_RESET : -case CS_PORT_UNAVAILABLE : - fcport->nvme_flag |=NVME_FLAG_RESETTING ; -/* fall through */ -case CS_ABORTED : -case CS_PORT_LOGGED_OUT : -case CS_PORT_BUSY : -ql_log (ql_log_warn, fcport->vha,0x5060 , -"NVME-%s ERR Handling - hdl=%x completion status(%x) resid=%x ox_id=%x\n" , - sp->name, sp->handle, sts->comp_status, -le32_to_cpu (sts->residual_len), sts->ox_id); - fd->transferred_length =0 ; - iocb->u.nvme.rsp_pyld_len =0 ; - ret =QLA_ABORTED ; -break ; - -default : -ql_log (ql_log_warn, fcport->vha,0x5060 , -"NVME-%s error - hdl=%x completion status(%x) resid=%x ox_id=%x\n" , - sp->name, sp->handle, sts->comp_status, -le32_to_cpu (sts->residual_len), sts->ox_id); - ret =QLA_FUNCTION_FAILED ; -break ; - } +break ; } sp->done (sp, ret); }
@@ -2462,7 +2439,8 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)/* NVME completion. */ if (sp->type ==SRB_NVME_CMD ) { -qla24xx_nvme_iocb_entry (vha, req, pkt); + req->outstanding_cmds[handle] =NULL ; +qla24xx_nvme_iocb_entry (vha, req, pkt, sp);return ; }
drivers/scsi/qla2xxx/qla_nvme.c +1 -1
@@ -280,7 +280,7 @@ static void qla_nvme_poll(struct nvme_fc_local_port *lport, void *hw_queue_handlspin_unlock_irqrestore (&qpair->qp_lock, flags); } -static int qla2x00_start_nvme_mq (srb_t *sp) +static inline int qla2x00_start_nvme_mq (srb_t *sp) {unsigned long flags;uint32_t *clr_ptr;
Signature · 1 line
2.12.0
PATCH v2 11/13 qla2xxx: Cleanup code to improve FC-NVMe error handling
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 12/13 qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan
In reply to Himanshu MadhaniFrom: Quinn Tran <[email protected]>
This patch combines FCP and FC-NVMe scan into single scan when driver detects FC-NVMe capability on same port.
--- drivers/scsi/qla2xxx/qla_def.h | 7 + drivers/scsi/qla2xxx/qla_gbl.h | 2 +- drivers/scsi/qla2xxx/qla_gs.c | 274 ++++++++++++++++++++++++++++++---------- drivers/scsi/qla2xxx/qla_init.c | 8 +- drivers/scsi/qla2xxx/qla_os.c | 8 +- 5 files changed, 225 insertions(+), 74 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +7 -0
@@ -2983,8 +2983,14 @@ enum scan_flags_t { SF_QUEUED = BIT_1, }; +enum fc4type_t { +FS_FC4TYPE_FCP =BIT_0 , +FS_FC4TYPE_NVME =BIT_1 , +}; +struct fab_scan_rp {port_id_t id; +enum fc4type_t fc4type;u8 port_name[8 ];u8 node_name[8 ]; };
@@ -3276,6 +3282,7 @@ struct qla_work_evt { } nack;struct {u8 fc4_type; +srb_t *sp; } gpnft; } u; };
drivers/scsi/qla2xxx/qla_gbl.h +1 -1
@@ -658,7 +658,7 @@ void qla24xx_handle_gpsc_event(scsi_qla_host_t *, struct event_arg *);int qla2x00_mgmt_svr_login (scsi_qla_host_t *);void qla24xx_handle_gffid_event (scsi_qla_host_t *vha,struct event_arg *ea);int qla24xx_async_gffid (scsi_qla_host_t *vha,fc_port_t *fcport); -int qla24xx_async_gpnft (scsi_qla_host_t *,u8 ); +int qla24xx_async_gpnft (scsi_qla_host_t *,u8 ,srb_t *);void qla24xx_async_gpnft_done (scsi_qla_host_t *,srb_t *);void qla24xx_async_gnnft_done (scsi_qla_host_t *,srb_t *);int qla24xx_async_gnnid (scsi_qla_host_t *,fc_port_t *);
drivers/scsi/qla2xxx/qla_gs.c +208 -66
374 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_init.c +4 -4
@@ -5039,9 +5039,9 @@ qla2x00_iidma_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) fcport->port_name, rval, fcport->fp_speed, mb[0], mb[1]); }else {ql_dbg (ql_dbg_disc, vha,0x2005 , -"iIDMA adjusted to %s GB/s on %8phN.\n" , +"iIDMA adjusted to %s GB/s (%X) on %8phN.\n" ,qla2x00_get_link_speed_str (ha, fcport->fp_speed), - fcport->port_name); + fcport->fp_speed, fcport->port_name); } }
@@ -5267,8 +5267,8 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha)qlt_do_generation_tick (vha, &discovery_gen);if (USE_ASYNC_SCAN (ha)) { - rval =QLA_SUCCESS ; - rval =qla24xx_async_gpnft (vha,FC4_TYPE_FCP_SCSI ); + rval =qla24xx_async_gpnft (vha,FC4_TYPE_FCP_SCSI , +NULL );if (rval)set_bit (LOOP_RESYNC_NEEDED , &vha->dpc_flags); }else {
drivers/scsi/qla2xxx/qla_os.c +5 -3
@@ -4821,9 +4821,10 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e) fcport->d_id = e->u.new_sess.id; fcport->flags |=FCF_FABRIC_DEVICE ; fcport->fw_login_state =DSC_LS_PLOGI_PEND ; -if (e->u.new_sess.fc4_type ==FC4_TYPE_FCP_SCSI ) { +if (e->u.new_sess.fc4_type &FS_FC4TYPE_FCP ) fcport->fc4_type =FC4_TYPE_FCP_SCSI ; - }else if (e->u.new_sess.fc4_type ==FC4_TYPE_NVME ) { + +if (e->u.new_sess.fc4_type &FS_FC4TYPE_NVME ) { fcport->fc4_type =FC4_TYPE_OTHER ; fcport->fc4f_nvme =FC4_TYPE_NVME ; }
@@ -5046,7 +5047,8 @@ qla2x00_do_work(struct scsi_qla_host *vha) e->u.logio.data);break ;case QLA_EVT_GPNFT : -qla24xx_async_gpnft (vha, e->u.gpnft.fc4_type); +qla24xx_async_gpnft (vha, e->u.gpnft.fc4_type, + e->u.gpnft.sp);break ;case QLA_EVT_GPNFT_DONE :qla24xx_async_gpnft_done (vha, e->u.iosb.sp);
Signature · 1 line
2.12.0
PATCH v2 13/13 qla2xxx: Update driver version to 10.00.00.06-k
In reply to Himanshu Madhani--- drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_version.h +1 -1
@@ -7,7 +7,7 @@/* * Driver version */ -#define QLA2XXX_VERSION "10.00.00.05-k" +#define QLA2XXX_VERSION "10.00.00.06-k"#define QLA_DRIVER_MAJOR_VER 10#define QLA_DRIVER_MINOR_VER 0
Signature · 1 line
2.12.0
PATCH v2 13/13 qla2xxx: Update driver version to 10.00.00.06-k
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
v2 cover qla2xxx: Fixes for FC-NVMe
In reply to Himanshu MadhaniHimanshu,
Quoted 2 lines
Please apply this series to 4.17/scsi-queue at your earliest convenience.
Patch 12 does not apply to 4.17/scsi-queue. Please fix and resubmit.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering