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_hbadisc.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_hbadisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index a5d1695dac3d..57ab799da2e2 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -4059,6 +4059,11 @@ lpfc_unreg_hba_rpis(struct lpfc_hba *phba) | |||
4059 | int i; | 4059 | int i; |
4060 | 4060 | ||
4061 | vports = lpfc_create_vport_work_array(phba); | 4061 | vports = lpfc_create_vport_work_array(phba); |
4062 | if (!vports) { | ||
4063 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | ||
4064 | "2884 Vport array allocation failed \n"); | ||
4065 | return; | ||
4066 | } | ||
4062 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { | 4067 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { |
4063 | shost = lpfc_shost_from_vport(vports[i]); | 4068 | shost = lpfc_shost_from_vport(vports[i]); |
4064 | spin_lock_irq(shost->host_lock); | 4069 | spin_lock_irq(shost->host_lock); |
@@ -5254,6 +5259,10 @@ lpfc_fcf_inuse(struct lpfc_hba *phba) | |||
5254 | 5259 | ||
5255 | vports = lpfc_create_vport_work_array(phba); | 5260 | vports = lpfc_create_vport_work_array(phba); |
5256 | 5261 | ||
5262 | /* If driver cannot allocate memory, indicate fcf is in use */ | ||
5263 | if (!vports) | ||
5264 | return 1; | ||
5265 | |||
5257 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { | 5266 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { |
5258 | shost = lpfc_shost_from_vport(vports[i]); | 5267 | shost = lpfc_shost_from_vport(vports[i]); |
5259 | spin_lock_irq(shost->host_lock); | 5268 | spin_lock_irq(shost->host_lock); |