diff options
author | James Smart <James.Smart@Emulex.Com> | 2008-12-04 22:39:29 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:26 -0500 |
commit | eaf15d5b5605e1a403f631489de30a49fd66905d (patch) | |
tree | 24d79af30d8d2053c8159cf0fa23ca37aaf1bd0e /drivers/scsi/lpfc/lpfc_els.c | |
parent | 8f34f4cea3234ae347c4b0ffa302ffb85f140838 (diff) |
[SCSI] lpfc 8.3.0 : Fix several minor issues
- Avoid polling HBA Error Attention when HBA's PCI channel is offline
due to PCI EEH
- Fix handling of RSCN with non-zero event qualifiers
- Remove unnecessary sleeps during HBA initialization which slow down
driver load
- Fix internal and external loopback on FCoE HBAs
- Fix incorrect decrement of cmd_pending count in lpfc_queuecomand
error path
- Fix reporting of port busy events to management application
- Rename lpfc_adjust_queue_depth() to lpfc_rampdown_queue_depth() for
consistency with its partner lpfc_rampup_queue_depth()
- Delete redundant lpfc_cmd->start_time = jiffies assignment in
lpfc_queuecommand()
- Fix handling for ELS, mailbox and heartbeat time outs in the worker
thread by removing unnecessary checking of the work_port_events
flags.
- Fix NULL pointer dereference in lpfc_prep_els_iocb
- In lpfc_device_recov_npr_node(), move clearing of NLP_NPR_2B_DISC
flag after call to lpfc_cancel_retry_delay_tmo() to keep
targets-in-discovery count correct
- Remove lpfc_probe_one()'s call to scsi_scan_host() which could cause
concurrent SCSI scans to step on each other
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_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 442cb882e6d3..a8f30bdaff69 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -275,7 +275,8 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, uint8_t expectRsp, | |||
275 | return elsiocb; | 275 | return elsiocb; |
276 | 276 | ||
277 | els_iocb_free_pbuf_exit: | 277 | els_iocb_free_pbuf_exit: |
278 | lpfc_mbuf_free(phba, prsp->virt, prsp->phys); | 278 | if (expectRsp) |
279 | lpfc_mbuf_free(phba, prsp->virt, prsp->phys); | ||
279 | kfree(pbuflist); | 280 | kfree(pbuflist); |
280 | 281 | ||
281 | els_iocb_free_prsp_exit: | 282 | els_iocb_free_prsp_exit: |
@@ -2472,6 +2473,15 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
2472 | case IOSTAT_LOCAL_REJECT: | 2473 | case IOSTAT_LOCAL_REJECT: |
2473 | switch ((irsp->un.ulpWord[4] & 0xff)) { | 2474 | switch ((irsp->un.ulpWord[4] & 0xff)) { |
2474 | case IOERR_LOOP_OPEN_FAILURE: | 2475 | case IOERR_LOOP_OPEN_FAILURE: |
2476 | if (cmd == ELS_CMD_FLOGI) { | ||
2477 | if (PCI_DEVICE_ID_HORNET == | ||
2478 | phba->pcidev->device) { | ||
2479 | phba->fc_topology = TOPOLOGY_LOOP; | ||
2480 | phba->pport->fc_myDID = 0; | ||
2481 | phba->alpa_map[0] = 0; | ||
2482 | phba->alpa_map[1] = 0; | ||
2483 | } | ||
2484 | } | ||
2475 | if (cmd == ELS_CMD_PLOGI && cmdiocb->retry == 0) | 2485 | if (cmd == ELS_CMD_PLOGI && cmdiocb->retry == 0) |
2476 | delay = 1000; | 2486 | delay = 1000; |
2477 | retry = 1; | 2487 | retry = 1; |
@@ -3827,27 +3837,21 @@ lpfc_rscn_payload_check(struct lpfc_vport *vport, uint32_t did) | |||
3827 | while (payload_len) { | 3837 | while (payload_len) { |
3828 | rscn_did.un.word = be32_to_cpu(*lp++); | 3838 | rscn_did.un.word = be32_to_cpu(*lp++); |
3829 | payload_len -= sizeof(uint32_t); | 3839 | payload_len -= sizeof(uint32_t); |
3830 | switch (rscn_did.un.b.resv) { | 3840 | switch (rscn_did.un.b.resv & RSCN_ADDRESS_FORMAT_MASK) { |
3831 | case 0: /* Single N_Port ID effected */ | 3841 | case RSCN_ADDRESS_FORMAT_PORT: |
3832 | if (ns_did.un.word == rscn_did.un.word) | 3842 | if (ns_did.un.word == rscn_did.un.word) |
3833 | goto return_did_out; | 3843 | goto return_did_out; |
3834 | break; | 3844 | break; |
3835 | case 1: /* Whole N_Port Area effected */ | 3845 | case RSCN_ADDRESS_FORMAT_AREA: |
3836 | if ((ns_did.un.b.domain == rscn_did.un.b.domain) | 3846 | if ((ns_did.un.b.domain == rscn_did.un.b.domain) |
3837 | && (ns_did.un.b.area == rscn_did.un.b.area)) | 3847 | && (ns_did.un.b.area == rscn_did.un.b.area)) |
3838 | goto return_did_out; | 3848 | goto return_did_out; |
3839 | break; | 3849 | break; |
3840 | case 2: /* Whole N_Port Domain effected */ | 3850 | case RSCN_ADDRESS_FORMAT_DOMAIN: |
3841 | if (ns_did.un.b.domain == rscn_did.un.b.domain) | 3851 | if (ns_did.un.b.domain == rscn_did.un.b.domain) |
3842 | goto return_did_out; | 3852 | goto return_did_out; |
3843 | break; | 3853 | break; |
3844 | default: | 3854 | case RSCN_ADDRESS_FORMAT_FABRIC: |
3845 | /* Unknown Identifier in RSCN node */ | ||
3846 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | ||
3847 | "0217 Unknown Identifier in " | ||
3848 | "RSCN payload Data: x%x\n", | ||
3849 | rscn_did.un.word); | ||
3850 | case 3: /* Whole Fabric effected */ | ||
3851 | goto return_did_out; | 3855 | goto return_did_out; |
3852 | } | 3856 | } |
3853 | } | 3857 | } |
@@ -4935,10 +4939,6 @@ lpfc_els_timeout_handler(struct lpfc_vport *vport) | |||
4935 | uint32_t timeout; | 4939 | uint32_t timeout; |
4936 | uint32_t remote_ID = 0xffffffff; | 4940 | uint32_t remote_ID = 0xffffffff; |
4937 | 4941 | ||
4938 | /* If the timer is already canceled do nothing */ | ||
4939 | if ((vport->work_port_events & WORKER_ELS_TMO) == 0) { | ||
4940 | return; | ||
4941 | } | ||
4942 | spin_lock_irq(&phba->hbalock); | 4942 | spin_lock_irq(&phba->hbalock); |
4943 | timeout = (uint32_t)(phba->fc_ratov << 1); | 4943 | timeout = (uint32_t)(phba->fc_ratov << 1); |
4944 | 4944 | ||