diff options
author | James Smart <James.Smart@Emulex.Com> | 2008-06-14 22:52:59 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-12 09:22:28 -0400 |
commit | 495a714c50e2c6ca6357129812f983b3ac0a32f2 (patch) | |
tree | f4f7237ed2bcb5e35c9dacae60864d169303b6b4 /drivers/scsi/lpfc/lpfc_init.c | |
parent | 5e9d9b8276980fc5dfa88ce34f6ec88ce3026232 (diff) |
[SCSI] lpfc 8.2.7 : Miscellaneous Fixes
Miscellaneous Fixes:
- Fix bug in mbox sysfs interface that locked in EAGAIN if discovery stalled.
- Fix missing error message when npiv and loop are true when link up occurs.
- Fix panic in lpfc_scsi_cmd_iocb_cmpl: scsi_buf was NULL, but created
race conditions with other code paths.
- Fix error in sysfs mailbox structure that didn't rezero on next use.
- Add missing mempool_free() to attachment failure path
- Fix missing put of ndlp structure during driver unload.
- Fix applications unable to send mailbox commands during discovery.
- Remove unused argument (type) from function lpfc_post_buffer() API
- Fix vport name is not shown after hbacmd vportcreate.
- Remove repeated code statements.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 53cedbafffba..5b6e5395c8eb 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -145,8 +145,10 @@ lpfc_config_port_prep(struct lpfc_hba *phba) | |||
145 | return -ERESTART; | 145 | return -ERESTART; |
146 | } | 146 | } |
147 | 147 | ||
148 | if (phba->sli_rev == 3 && !mb->un.varRdRev.v3rsp) | 148 | if (phba->sli_rev == 3 && !mb->un.varRdRev.v3rsp) { |
149 | mempool_free(pmb, phba->mbox_mem_pool); | ||
149 | return -EINVAL; | 150 | return -EINVAL; |
151 | } | ||
150 | 152 | ||
151 | /* Save information as VPD data */ | 153 | /* Save information as VPD data */ |
152 | vp->rev.rBit = 1; | 154 | vp->rev.rBit = 1; |
@@ -1197,8 +1199,7 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) | |||
1197 | /* Returns the number of buffers NOT posted. */ | 1199 | /* Returns the number of buffers NOT posted. */ |
1198 | /**************************************************/ | 1200 | /**************************************************/ |
1199 | int | 1201 | int |
1200 | lpfc_post_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, int cnt, | 1202 | lpfc_post_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, int cnt) |
1201 | int type) | ||
1202 | { | 1203 | { |
1203 | IOCB_t *icmd; | 1204 | IOCB_t *icmd; |
1204 | struct lpfc_iocbq *iocb; | 1205 | struct lpfc_iocbq *iocb; |
@@ -1298,7 +1299,7 @@ lpfc_post_rcv_buf(struct lpfc_hba *phba) | |||
1298 | struct lpfc_sli *psli = &phba->sli; | 1299 | struct lpfc_sli *psli = &phba->sli; |
1299 | 1300 | ||
1300 | /* Ring 0, ELS / CT buffers */ | 1301 | /* Ring 0, ELS / CT buffers */ |
1301 | lpfc_post_buffer(phba, &psli->ring[LPFC_ELS_RING], LPFC_BUF_RING0, 1); | 1302 | lpfc_post_buffer(phba, &psli->ring[LPFC_ELS_RING], LPFC_BUF_RING0); |
1302 | /* Ring 2 - FCP no buffers needed */ | 1303 | /* Ring 2 - FCP no buffers needed */ |
1303 | 1304 | ||
1304 | return 0; | 1305 | return 0; |
@@ -1457,6 +1458,15 @@ lpfc_cleanup(struct lpfc_vport *vport) | |||
1457 | 1458 | ||
1458 | lpfc_disc_state_machine(vport, ndlp, NULL, | 1459 | lpfc_disc_state_machine(vport, ndlp, NULL, |
1459 | NLP_EVT_DEVICE_RM); | 1460 | NLP_EVT_DEVICE_RM); |
1461 | |||
1462 | /* nlp_type zero is not defined, nlp_flag zero also not defined, | ||
1463 | * nlp_state is unused, this happens when | ||
1464 | * an initiator has logged | ||
1465 | * into us so cleanup this ndlp. | ||
1466 | */ | ||
1467 | if ((ndlp->nlp_type == 0) && (ndlp->nlp_flag == 0) && | ||
1468 | (ndlp->nlp_state == 0)) | ||
1469 | lpfc_nlp_put(ndlp); | ||
1460 | } | 1470 | } |
1461 | 1471 | ||
1462 | /* At this point, ALL ndlp's should be gone | 1472 | /* At this point, ALL ndlp's should be gone |