lpfc 8.3.8: BugFixes: SLI relates changes
Subsystems (2)
PATCH 1/8 lpfc 8.3.8: BugFixes: SLI relates changes
Fix hardware/SLI relates issues:
- Handle XB bit so that ELS XRIs are not prematurely released.
- Handle XB bit so that FCP XRIs are not prematurely released.
- Define new security SLI Commands.
- Remove unused security SLI commands
- Skip receive data size parameter check on received FLOGI.
- Added LPFC_USE_FCPWQIDX flag to iocb to force SLI layer to submit abort WQE on same WQ as the command WQE.
Signed-off-by James Smart <[email protected]>
---
lpfc_crtn.h | 2 lpfc_els.c | 2 lpfc_hw.h | 16 ++----- lpfc_nportdisc.c | 83 ++++++++++++++++++++++------------------ lpfc_scsi.c | 29 ++++++++------ lpfc_scsi.h | 1 lpfc_sli.c | 112 ++++++++++++++++++++++++++++++++++++++++++++----------- lpfc_sli.h | 10 ++-- 8 files changed, 169 insertions(+), 86 deletions(-)
drivers/scsi/lpfc/lpfc_crtn.h +1 -1
@@ -99,7 +99,7 @@ int lpfc_disc_state_machine(struct lpfc_void lpfc_do_scr_ns_plogi (struct lpfc_hba *,struct lpfc_vport *);int lpfc_check_sparm (struct lpfc_vport *,struct lpfc_nodelist *, -struct serv_parm *,uint32_t ); +struct serv_parm *,uint32_t ,int );int lpfc_els_abort (struct lpfc_hba *,struct lpfc_nodelist *);void lpfc_more_plogi (struct lpfc_vport *);void lpfc_more_adisc (struct lpfc_vport *);
drivers/scsi/lpfc/lpfc_els.c +1 -1
@@ -4385,7 +4385,7 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vp did = Fabric_DID; -if ((lpfc_check_sparm (vport, ndlp, sp,CLASS3 ))) { +if ((lpfc_check_sparm (vport, ndlp, sp,CLASS3 ,1 ))) {/* For a FLOGI we accept, then if our portname is greater * then the remote portname we initiate Nport login. */
drivers/scsi/lpfc/lpfc_hw.h +6 -10
@@ -1465,17 +1465,13 @@ typedef struct { /* FireFly BIU registe#define CMD_IOCB_LOGENTRY_CN 0x94#define CMD_IOCB_LOGENTRY_ASYNC_CN 0x96 -/* Unhandled Data Security SLI Commands */ -#define DSSCMD_IWRITE64_CR 0xD8 -#define DSSCMD_IWRITE64_CX 0xD9 -#define DSSCMD_IREAD64_CR 0xDA -#define DSSCMD_IREAD64_CX 0xDB -#define DSSCMD_INVALIDATE_DEK 0xDC -#define DSSCMD_SET_KEK 0xDD -#define DSSCMD_GET_KEK_ID 0xDE -#define DSSCMD_GEN_XFER 0xDF +/* Data Security SLI Commands */ +#define DSSCMD_IWRITE64_CR 0xF8 +#define DSSCMD_IWRITE64_CX 0xF9 +#define DSSCMD_IREAD64_CR 0xFA +#define DSSCMD_IREAD64_CX 0xFB -#define CMD_MAX_IOCB_CMD 0xE6 +#define CMD_MAX_IOCB_CMD 0xFB#define CMD_IOCB_MASK 0xff#define MAX_MSG_DATA 28/* max msg data in CMD_ADAPTER_MSG
drivers/scsi/lpfc/lpfc_nportdisc.c +45 -38
115 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_scsi.c +18 -11
@@ -626,6 +626,7 @@ lpfc_sli4_fcp_xri_aborted(struct lpfc_hb &phba->sli4_hba.lpfc_abts_scsi_buf_list, list) {if (psb->cur_iocbq.sli4_xritag == xri) {list_del (&psb->list); + psb->exch_busy =0 ; psb->status =IOSTAT_SUCCESS ; spin_unlock_irqrestore( &phba->sli4_hba.abts_scsi_buf_list_lock,
@@ -688,11 +689,12 @@ lpfc_sli4_repost_scsi_sgl_list(struct lp list);if (status) {/* Put this back on the abort scsi list */ - psb->status =IOSTAT_LOCAL_REJECT ; - psb->result =IOERR_ABORT_REQUESTED ; + psb->exch_busy =1 ; rc++; - }else + }else { + psb->exch_busy =0 ; psb->status =IOSTAT_SUCCESS ; + }/* Put it back into the SCSI buffer list */ lpfc_release_scsi_buf_s4 (phba, psb); }
@@ -839,11 +841,12 @@ lpfc_new_scsi_buf_s4(struct lpfc_vport * psb->cur_iocbq.sli4_xritag);if (status) {/* Put this back on the abort scsi list */ - psb->status =IOSTAT_LOCAL_REJECT ; - psb->result =IOERR_ABORT_REQUESTED ; + psb->exch_busy =1 ; rc++; - }else + }else { + psb->exch_busy =0 ; psb->status =IOSTAT_SUCCESS ; + }/* Put it back into the SCSI buffer list */ lpfc_release_scsi_buf_s4 (phba, psb);break ;
@@ -857,11 +860,12 @@ lpfc_new_scsi_buf_s4(struct lpfc_vport * list);if (status) {/* Put this back on the abort scsi list */ - psb->status =IOSTAT_LOCAL_REJECT ; - psb->result =IOERR_ABORT_REQUESTED ; + psb->exch_busy =1 ; rc++; - }else + }else { + psb->exch_busy =0 ; psb->status =IOSTAT_SUCCESS ; + }/* Put it back into the SCSI buffer list */ lpfc_release_scsi_buf_s4 (phba, psb); }
@@ -951,8 +955,7 @@ lpfc_release_scsi_buf_s4(struct lpfc_hba {unsigned long iflag =0 ; -if (psb->status ==IOSTAT_LOCAL_REJECT - && psb->result ==IOERR_ABORT_REQUESTED ) { +if (psb->exch_busy) {spin_lock_irqsave (&phba->sli4_hba.abts_scsi_buf_list_lock, iflag); psb->pCmd =NULL ;
@@ -2221,6 +2224,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba lpfc_cmd->result = pIocbOut->iocb.un.ulpWord[4 ]; lpfc_cmd->status = pIocbOut->iocb.ulpStatus; +/* pick up SLI4 exhange busy status from HBA */ + lpfc_cmd->exch_busy = pIocbOut->iocb_flag &LPFC_EXCHANGE_BUSY ; +if (pnode &&NLP_CHK_NODE_ACT (pnode))atomic_dec (&pnode->cmd_pending);
@@ -2990,6 +2996,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmn/* ABTS WQE must go to the same WQ as the WQE to be aborted */ abtsiocb->fcp_wqidx = iocb->fcp_wqidx; + abtsiocb->iocb_flag |=LPFC_USE_FCPWQIDX ;if (lpfc_is_link_up (phba)) icmd->ulpCommand =CMD_ABORT_XRI_CN ;
drivers/scsi/lpfc/lpfc_scsi.h +1 -0
@@ -118,6 +118,7 @@ struct lpfc_scsi_buf {uint32_t timeout; +uint16_t exch_busy;/* SLI4 hba reported XB on complete WCQE */ uint16_t status;/* From IOCB Word 7- ulpStatus */ uint32_t result;/* From IOCB Word 4. */
drivers/scsi/lpfc/lpfc_sli.c +91 -21
222 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_sli.h +6 -4
@@ -53,17 +53,19 @@ struct lpfc_iocbq {IOCB_t iocb;/* IOCB cmd */ uint8_t retry;/* retry counter for IOCB cmd - if needed */ -uint8_t iocb_flag; +uint16_t iocb_flag;#define LPFC_IO_LIBDFC 1/* libdfc iocb */ #define LPFC_IO_WAKE 2/* High Priority Queue signal flag */ #define LPFC_IO_FCP 4/* FCP command -- iocbq in scsi_buf */ #define LPFC_DRIVER_ABORTED 8/* driver aborted this request */ #define LPFC_IO_FABRIC 0x10/* Iocb send using fabric scheduler */ #define LPFC_DELAY_MEM_FREE 0x20/* Defer free'ing of FC data */ -#define LPFC_FIP_ELS_ID_MASK 0xc0/* ELS_ID range 0-3 */ -#define LPFC_FIP_ELS_ID_SHIFT 6 +#define LPFC_EXCHANGE_BUSY 0x40/* SLI4 hba reported XB in response */ +#define LPFC_USE_FCPWQIDX 0x80/* Submit to specified FCPWQ index */ + +#define LPFC_FIP_ELS_ID_MASK 0xc000/* ELS_ID range 0-3, non-shifted mask */ +#define LPFC_FIP_ELS_ID_SHIFT 14 -uint8_t abort_count;uint8_t rsvd2;uint32_t drvrTimeout;/* driver timeout in seconds */ uint32_t fcp_wqidx;/* index to FCP work queue */