diff options
author | James Smart <james.smart@emulex.com> | 2010-11-20 23:14:19 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:23:58 -0500 |
commit | 63e801ce685d151c5faca8f491adc2ad2e732259 (patch) | |
tree | 6cf3db58849160580e4a5c1ce32e4ee14ed6902d /drivers/scsi/lpfc/lpfc_els.c | |
parent | 98db519573e805f9f7e988fb5661da951fcb16b1 (diff) |
[SCSI] lpfc 8.3.19: Fix critical errors and crashes
Fix critical errors and crashes
- Replace LOF_SECURITY with LOG_SECURITY
- When calculating diag test memory size, use full size with header.
- Return LS_RJT with status=UNSUPPORTED on unrecognized ELS's
- Correct NULL pointer dereference when lpfc_create_vport_work_array()
returns NULL.
- Added code to handle CVL when port is in LPFC_VPORT_FAILED state.
- In lpfc_do_scr_ns_plogi, check the nodelist for FDMI_DID and reuse
the resource.
- Check for generic request 64 and calculate the sgl offset for the request
and reply sgls, also calculate the xmit length using only the request bde.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 884f4d321799..196a7bf905a1 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -6201,7 +6201,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
6201 | cmd, did, vport->port_state); | 6201 | cmd, did, vport->port_state); |
6202 | 6202 | ||
6203 | /* Unsupported ELS command, reject */ | 6203 | /* Unsupported ELS command, reject */ |
6204 | rjt_err = LSRJT_INVALID_CMD; | 6204 | rjt_err = LSRJT_CMD_UNSUPPORTED; |
6205 | 6205 | ||
6206 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ | 6206 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ |
6207 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 6207 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
@@ -6408,18 +6408,31 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) | |||
6408 | } | 6408 | } |
6409 | 6409 | ||
6410 | if (vport->cfg_fdmi_on) { | 6410 | if (vport->cfg_fdmi_on) { |
6411 | ndlp_fdmi = mempool_alloc(phba->nlp_mem_pool, | 6411 | /* If this is the first time, allocate an ndlp and initialize |
6412 | GFP_KERNEL); | 6412 | * it. Otherwise, make sure the node is enabled and then do the |
6413 | * login. | ||
6414 | */ | ||
6415 | ndlp_fdmi = lpfc_findnode_did(vport, FDMI_DID); | ||
6416 | if (!ndlp_fdmi) { | ||
6417 | ndlp_fdmi = mempool_alloc(phba->nlp_mem_pool, | ||
6418 | GFP_KERNEL); | ||
6419 | if (ndlp_fdmi) { | ||
6420 | lpfc_nlp_init(vport, ndlp_fdmi, FDMI_DID); | ||
6421 | ndlp_fdmi->nlp_type |= NLP_FABRIC; | ||
6422 | } else | ||
6423 | return; | ||
6424 | } | ||
6425 | if (!NLP_CHK_NODE_ACT(ndlp_fdmi)) | ||
6426 | ndlp_fdmi = lpfc_enable_node(vport, | ||
6427 | ndlp_fdmi, | ||
6428 | NLP_STE_NPR_NODE); | ||
6429 | |||
6413 | if (ndlp_fdmi) { | 6430 | if (ndlp_fdmi) { |
6414 | lpfc_nlp_init(vport, ndlp_fdmi, FDMI_DID); | ||
6415 | ndlp_fdmi->nlp_type |= NLP_FABRIC; | ||
6416 | lpfc_nlp_set_state(vport, ndlp_fdmi, | 6431 | lpfc_nlp_set_state(vport, ndlp_fdmi, |
6417 | NLP_STE_PLOGI_ISSUE); | 6432 | NLP_STE_PLOGI_ISSUE); |
6418 | lpfc_issue_els_plogi(vport, ndlp_fdmi->nlp_DID, | 6433 | lpfc_issue_els_plogi(vport, ndlp_fdmi->nlp_DID, 0); |
6419 | 0); | ||
6420 | } | 6434 | } |
6421 | } | 6435 | } |
6422 | return; | ||
6423 | } | 6436 | } |
6424 | 6437 | ||
6425 | /** | 6438 | /** |