Commit 1b8d11ab authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.42: Fixed driver iocbq structure's iocb_flag field running out of space

Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent ec2087a7
...@@ -319,7 +319,7 @@ lpfc_bsg_send_mgmt_cmd_cmp(struct lpfc_hba *phba, ...@@ -319,7 +319,7 @@ lpfc_bsg_send_mgmt_cmd_cmp(struct lpfc_hba *phba,
/* Close the timeout handler abort window */ /* Close the timeout handler abort window */
spin_lock_irqsave(&phba->hbalock, flags); spin_lock_irqsave(&phba->hbalock, flags);
cmdiocbq->iocb_aux_flag &= ~LPFC_IO_CMD_OUTSTANDING; cmdiocbq->iocb_flag &= ~LPFC_IO_CMD_OUTSTANDING;
spin_unlock_irqrestore(&phba->hbalock, flags); spin_unlock_irqrestore(&phba->hbalock, flags);
iocb = &dd_data->context_un.iocb; iocb = &dd_data->context_un.iocb;
...@@ -513,7 +513,7 @@ lpfc_bsg_send_mgmt_cmd(struct fc_bsg_job *job) ...@@ -513,7 +513,7 @@ lpfc_bsg_send_mgmt_cmd(struct fc_bsg_job *job)
/* make sure the I/O had not been completed yet */ /* make sure the I/O had not been completed yet */
if (cmdiocbq->iocb_flag & LPFC_IO_LIBDFC) { if (cmdiocbq->iocb_flag & LPFC_IO_LIBDFC) {
/* open up abort window to timeout handler */ /* open up abort window to timeout handler */
cmdiocbq->iocb_aux_flag |= LPFC_IO_CMD_OUTSTANDING; cmdiocbq->iocb_flag |= LPFC_IO_CMD_OUTSTANDING;
} }
spin_unlock_irqrestore(&phba->hbalock, flags); spin_unlock_irqrestore(&phba->hbalock, flags);
return 0; /* done for now */ return 0; /* done for now */
...@@ -595,7 +595,7 @@ lpfc_bsg_rport_els_cmp(struct lpfc_hba *phba, ...@@ -595,7 +595,7 @@ lpfc_bsg_rport_els_cmp(struct lpfc_hba *phba,
/* Close the timeout handler abort window */ /* Close the timeout handler abort window */
spin_lock_irqsave(&phba->hbalock, flags); spin_lock_irqsave(&phba->hbalock, flags);
cmdiocbq->iocb_aux_flag &= ~LPFC_IO_CMD_OUTSTANDING; cmdiocbq->iocb_flag &= ~LPFC_IO_CMD_OUTSTANDING;
spin_unlock_irqrestore(&phba->hbalock, flags); spin_unlock_irqrestore(&phba->hbalock, flags);
rsp = &rspiocbq->iocb; rsp = &rspiocbq->iocb;
...@@ -748,7 +748,7 @@ lpfc_bsg_rport_els(struct fc_bsg_job *job) ...@@ -748,7 +748,7 @@ lpfc_bsg_rport_els(struct fc_bsg_job *job)
/* make sure the I/O had not been completed/released */ /* make sure the I/O had not been completed/released */
if (cmdiocbq->iocb_flag & LPFC_IO_LIBDFC) { if (cmdiocbq->iocb_flag & LPFC_IO_LIBDFC) {
/* open up abort window to timeout handler */ /* open up abort window to timeout handler */
cmdiocbq->iocb_aux_flag |= LPFC_IO_CMD_OUTSTANDING; cmdiocbq->iocb_flag |= LPFC_IO_CMD_OUTSTANDING;
} }
spin_unlock_irqrestore(&phba->hbalock, flags); spin_unlock_irqrestore(&phba->hbalock, flags);
return 0; /* done for now */ return 0; /* done for now */
...@@ -1404,7 +1404,7 @@ lpfc_issue_ct_rsp_cmp(struct lpfc_hba *phba, ...@@ -1404,7 +1404,7 @@ lpfc_issue_ct_rsp_cmp(struct lpfc_hba *phba,
/* Close the timeout handler abort window */ /* Close the timeout handler abort window */
spin_lock_irqsave(&phba->hbalock, flags); spin_lock_irqsave(&phba->hbalock, flags);
cmdiocbq->iocb_aux_flag &= ~LPFC_IO_CMD_OUTSTANDING; cmdiocbq->iocb_flag &= ~LPFC_IO_CMD_OUTSTANDING;
spin_unlock_irqrestore(&phba->hbalock, flags); spin_unlock_irqrestore(&phba->hbalock, flags);
ndlp = dd_data->context_un.iocb.ndlp; ndlp = dd_data->context_un.iocb.ndlp;
...@@ -1585,7 +1585,7 @@ lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct fc_bsg_job *job, uint32_t tag, ...@@ -1585,7 +1585,7 @@ lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct fc_bsg_job *job, uint32_t tag,
/* make sure the I/O had not been completed/released */ /* make sure the I/O had not been completed/released */
if (ctiocb->iocb_flag & LPFC_IO_LIBDFC) { if (ctiocb->iocb_flag & LPFC_IO_LIBDFC) {
/* open up abort window to timeout handler */ /* open up abort window to timeout handler */
ctiocb->iocb_aux_flag |= LPFC_IO_CMD_OUTSTANDING; ctiocb->iocb_flag |= LPFC_IO_CMD_OUTSTANDING;
} }
spin_unlock_irqrestore(&phba->hbalock, flags); spin_unlock_irqrestore(&phba->hbalock, flags);
return 0; /* done for now */ return 0; /* done for now */
...@@ -5338,7 +5338,7 @@ lpfc_bsg_timeout(struct fc_bsg_job *job) ...@@ -5338,7 +5338,7 @@ lpfc_bsg_timeout(struct fc_bsg_job *job)
spin_lock_irqsave(&phba->hbalock, flags); spin_lock_irqsave(&phba->hbalock, flags);
/* make sure the I/O abort window is still open */ /* make sure the I/O abort window is still open */
if (!(cmdiocb->iocb_aux_flag & LPFC_IO_CMD_OUTSTANDING)) { if (!(cmdiocb->iocb_flag & LPFC_IO_CMD_OUTSTANDING)) {
spin_unlock_irqrestore(&phba->hbalock, flags); spin_unlock_irqrestore(&phba->hbalock, flags);
return -EAGAIN; return -EAGAIN;
} }
......
...@@ -58,7 +58,7 @@ struct lpfc_iocbq { ...@@ -58,7 +58,7 @@ struct lpfc_iocbq {
IOCB_t iocb; /* IOCB cmd */ IOCB_t iocb; /* IOCB cmd */
uint8_t retry; /* retry counter for IOCB cmd - if needed */ uint8_t retry; /* retry counter for IOCB cmd - if needed */
uint16_t iocb_flag; uint32_t iocb_flag;
#define LPFC_IO_LIBDFC 1 /* libdfc iocb */ #define LPFC_IO_LIBDFC 1 /* libdfc iocb */
#define LPFC_IO_WAKE 2 /* Synchronous I/O completed */ #define LPFC_IO_WAKE 2 /* Synchronous I/O completed */
#define LPFC_IO_WAKE_TMO LPFC_IO_WAKE /* Synchronous I/O timed out */ #define LPFC_IO_WAKE_TMO LPFC_IO_WAKE /* Synchronous I/O timed out */
...@@ -73,12 +73,11 @@ struct lpfc_iocbq { ...@@ -73,12 +73,11 @@ struct lpfc_iocbq {
#define LPFC_IO_DIF_PASS 0x400 /* T10 DIF IO pass-thru prot */ #define LPFC_IO_DIF_PASS 0x400 /* T10 DIF IO pass-thru prot */
#define LPFC_IO_DIF_STRIP 0x800 /* T10 DIF IO strip prot */ #define LPFC_IO_DIF_STRIP 0x800 /* T10 DIF IO strip prot */
#define LPFC_IO_DIF_INSERT 0x1000 /* T10 DIF IO insert prot */ #define LPFC_IO_DIF_INSERT 0x1000 /* T10 DIF IO insert prot */
#define LPFC_IO_CMD_OUTSTANDING 0x2000 /* timeout handler abort window */
#define LPFC_FIP_ELS_ID_MASK 0xc000 /* ELS_ID range 0-3, non-shifted mask */ #define LPFC_FIP_ELS_ID_MASK 0xc000 /* ELS_ID range 0-3, non-shifted mask */
#define LPFC_FIP_ELS_ID_SHIFT 14 #define LPFC_FIP_ELS_ID_SHIFT 14
uint8_t iocb_aux_flag;
#define LPFC_IO_CMD_OUTSTANDING 0x01 /* timeout handler abort window */
uint32_t drvrTimeout; /* driver timeout in seconds */ uint32_t drvrTimeout; /* driver timeout in seconds */
uint32_t fcp_wqidx; /* index to FCP work queue */ uint32_t fcp_wqidx; /* index to FCP work queue */
struct lpfc_vport *vport;/* virtual port pointer */ struct lpfc_vport *vport;/* virtual port pointer */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment