diff options
author | James Smart <james.smart@emulex.com> | 2013-09-06 12:20:51 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-09-10 20:27:15 -0400 |
commit | 1b8d11ab82a23357276fbdb8b95a57a05a9a5e93 (patch) | |
tree | aa02415b3c43fda4322e4eb3062d1d4cfc858adb /drivers/scsi | |
parent | ec2087a725f42bfbe239120768933e881aab73cd (diff) |
[SCSI] lpfc 8.3.42: Fixed driver iocbq structure's iocb_flag field running out of space
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_bsg.c | 14 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.h | 5 |
2 files changed, 9 insertions, 10 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index aa2109765a86..a27156463cc6 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c | |||
@@ -319,7 +319,7 @@ lpfc_bsg_send_mgmt_cmd_cmp(struct lpfc_hba *phba, | |||
319 | 319 | ||
320 | /* Close the timeout handler abort window */ | 320 | /* Close the timeout handler abort window */ |
321 | spin_lock_irqsave(&phba->hbalock, flags); | 321 | spin_lock_irqsave(&phba->hbalock, flags); |
322 | cmdiocbq->iocb_aux_flag &= ~LPFC_IO_CMD_OUTSTANDING; | 322 | cmdiocbq->iocb_flag &= ~LPFC_IO_CMD_OUTSTANDING; |
323 | spin_unlock_irqrestore(&phba->hbalock, flags); | 323 | spin_unlock_irqrestore(&phba->hbalock, flags); |
324 | 324 | ||
325 | iocb = &dd_data->context_un.iocb; | 325 | iocb = &dd_data->context_un.iocb; |
@@ -513,7 +513,7 @@ lpfc_bsg_send_mgmt_cmd(struct fc_bsg_job *job) | |||
513 | /* make sure the I/O had not been completed yet */ | 513 | /* make sure the I/O had not been completed yet */ |
514 | if (cmdiocbq->iocb_flag & LPFC_IO_LIBDFC) { | 514 | if (cmdiocbq->iocb_flag & LPFC_IO_LIBDFC) { |
515 | /* open up abort window to timeout handler */ | 515 | /* open up abort window to timeout handler */ |
516 | cmdiocbq->iocb_aux_flag |= LPFC_IO_CMD_OUTSTANDING; | 516 | cmdiocbq->iocb_flag |= LPFC_IO_CMD_OUTSTANDING; |
517 | } | 517 | } |
518 | spin_unlock_irqrestore(&phba->hbalock, flags); | 518 | spin_unlock_irqrestore(&phba->hbalock, flags); |
519 | return 0; /* done for now */ | 519 | return 0; /* done for now */ |
@@ -595,7 +595,7 @@ lpfc_bsg_rport_els_cmp(struct lpfc_hba *phba, | |||
595 | 595 | ||
596 | /* Close the timeout handler abort window */ | 596 | /* Close the timeout handler abort window */ |
597 | spin_lock_irqsave(&phba->hbalock, flags); | 597 | spin_lock_irqsave(&phba->hbalock, flags); |
598 | cmdiocbq->iocb_aux_flag &= ~LPFC_IO_CMD_OUTSTANDING; | 598 | cmdiocbq->iocb_flag &= ~LPFC_IO_CMD_OUTSTANDING; |
599 | spin_unlock_irqrestore(&phba->hbalock, flags); | 599 | spin_unlock_irqrestore(&phba->hbalock, flags); |
600 | 600 | ||
601 | rsp = &rspiocbq->iocb; | 601 | rsp = &rspiocbq->iocb; |
@@ -748,7 +748,7 @@ lpfc_bsg_rport_els(struct fc_bsg_job *job) | |||
748 | /* make sure the I/O had not been completed/released */ | 748 | /* make sure the I/O had not been completed/released */ |
749 | if (cmdiocbq->iocb_flag & LPFC_IO_LIBDFC) { | 749 | if (cmdiocbq->iocb_flag & LPFC_IO_LIBDFC) { |
750 | /* open up abort window to timeout handler */ | 750 | /* open up abort window to timeout handler */ |
751 | cmdiocbq->iocb_aux_flag |= LPFC_IO_CMD_OUTSTANDING; | 751 | cmdiocbq->iocb_flag |= LPFC_IO_CMD_OUTSTANDING; |
752 | } | 752 | } |
753 | spin_unlock_irqrestore(&phba->hbalock, flags); | 753 | spin_unlock_irqrestore(&phba->hbalock, flags); |
754 | return 0; /* done for now */ | 754 | return 0; /* done for now */ |
@@ -1404,7 +1404,7 @@ lpfc_issue_ct_rsp_cmp(struct lpfc_hba *phba, | |||
1404 | 1404 | ||
1405 | /* Close the timeout handler abort window */ | 1405 | /* Close the timeout handler abort window */ |
1406 | spin_lock_irqsave(&phba->hbalock, flags); | 1406 | spin_lock_irqsave(&phba->hbalock, flags); |
1407 | cmdiocbq->iocb_aux_flag &= ~LPFC_IO_CMD_OUTSTANDING; | 1407 | cmdiocbq->iocb_flag &= ~LPFC_IO_CMD_OUTSTANDING; |
1408 | spin_unlock_irqrestore(&phba->hbalock, flags); | 1408 | spin_unlock_irqrestore(&phba->hbalock, flags); |
1409 | 1409 | ||
1410 | ndlp = dd_data->context_un.iocb.ndlp; | 1410 | 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 | /* make sure the I/O had not been completed/released */ | 1585 | /* make sure the I/O had not been completed/released */ |
1586 | if (ctiocb->iocb_flag & LPFC_IO_LIBDFC) { | 1586 | if (ctiocb->iocb_flag & LPFC_IO_LIBDFC) { |
1587 | /* open up abort window to timeout handler */ | 1587 | /* open up abort window to timeout handler */ |
1588 | ctiocb->iocb_aux_flag |= LPFC_IO_CMD_OUTSTANDING; | 1588 | ctiocb->iocb_flag |= LPFC_IO_CMD_OUTSTANDING; |
1589 | } | 1589 | } |
1590 | spin_unlock_irqrestore(&phba->hbalock, flags); | 1590 | spin_unlock_irqrestore(&phba->hbalock, flags); |
1591 | return 0; /* done for now */ | 1591 | return 0; /* done for now */ |
@@ -5338,7 +5338,7 @@ lpfc_bsg_timeout(struct fc_bsg_job *job) | |||
5338 | 5338 | ||
5339 | spin_lock_irqsave(&phba->hbalock, flags); | 5339 | spin_lock_irqsave(&phba->hbalock, flags); |
5340 | /* make sure the I/O abort window is still open */ | 5340 | /* make sure the I/O abort window is still open */ |
5341 | if (!(cmdiocb->iocb_aux_flag & LPFC_IO_CMD_OUTSTANDING)) { | 5341 | if (!(cmdiocb->iocb_flag & LPFC_IO_CMD_OUTSTANDING)) { |
5342 | spin_unlock_irqrestore(&phba->hbalock, flags); | 5342 | spin_unlock_irqrestore(&phba->hbalock, flags); |
5343 | return -EAGAIN; | 5343 | return -EAGAIN; |
5344 | } | 5344 | } |
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index 4b8216df2afd..6b0f2478706e 100644 --- a/drivers/scsi/lpfc/lpfc_sli.h +++ b/drivers/scsi/lpfc/lpfc_sli.h | |||
@@ -58,7 +58,7 @@ struct lpfc_iocbq { | |||
58 | 58 | ||
59 | IOCB_t iocb; /* IOCB cmd */ | 59 | IOCB_t iocb; /* IOCB cmd */ |
60 | uint8_t retry; /* retry counter for IOCB cmd - if needed */ | 60 | uint8_t retry; /* retry counter for IOCB cmd - if needed */ |
61 | uint16_t iocb_flag; | 61 | uint32_t iocb_flag; |
62 | #define LPFC_IO_LIBDFC 1 /* libdfc iocb */ | 62 | #define LPFC_IO_LIBDFC 1 /* libdfc iocb */ |
63 | #define LPFC_IO_WAKE 2 /* Synchronous I/O completed */ | 63 | #define LPFC_IO_WAKE 2 /* Synchronous I/O completed */ |
64 | #define LPFC_IO_WAKE_TMO LPFC_IO_WAKE /* Synchronous I/O timed out */ | 64 | #define LPFC_IO_WAKE_TMO LPFC_IO_WAKE /* Synchronous I/O timed out */ |
@@ -73,12 +73,11 @@ struct lpfc_iocbq { | |||
73 | #define LPFC_IO_DIF_PASS 0x400 /* T10 DIF IO pass-thru prot */ | 73 | #define LPFC_IO_DIF_PASS 0x400 /* T10 DIF IO pass-thru prot */ |
74 | #define LPFC_IO_DIF_STRIP 0x800 /* T10 DIF IO strip prot */ | 74 | #define LPFC_IO_DIF_STRIP 0x800 /* T10 DIF IO strip prot */ |
75 | #define LPFC_IO_DIF_INSERT 0x1000 /* T10 DIF IO insert prot */ | 75 | #define LPFC_IO_DIF_INSERT 0x1000 /* T10 DIF IO insert prot */ |
76 | #define LPFC_IO_CMD_OUTSTANDING 0x2000 /* timeout handler abort window */ | ||
76 | 77 | ||
77 | #define LPFC_FIP_ELS_ID_MASK 0xc000 /* ELS_ID range 0-3, non-shifted mask */ | 78 | #define LPFC_FIP_ELS_ID_MASK 0xc000 /* ELS_ID range 0-3, non-shifted mask */ |
78 | #define LPFC_FIP_ELS_ID_SHIFT 14 | 79 | #define LPFC_FIP_ELS_ID_SHIFT 14 |
79 | 80 | ||
80 | uint8_t iocb_aux_flag; | ||
81 | #define LPFC_IO_CMD_OUTSTANDING 0x01 /* timeout handler abort window */ | ||
82 | uint32_t drvrTimeout; /* driver timeout in seconds */ | 81 | uint32_t drvrTimeout; /* driver timeout in seconds */ |
83 | uint32_t fcp_wqidx; /* index to FCP work queue */ | 82 | uint32_t fcp_wqidx; /* index to FCP work queue */ |
84 | struct lpfc_vport *vport;/* virtual port pointer */ | 83 | struct lpfc_vport *vport;/* virtual port pointer */ |