aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-12-04 22:39:29 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:26 -0500
commiteaf15d5b5605e1a403f631489de30a49fd66905d (patch)
tree24d79af30d8d2053c8159cf0fa23ca37aaf1bd0e /drivers/scsi/lpfc/lpfc_sli.c
parent8f34f4cea3234ae347c4b0ffa302ffb85f140838 (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_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 14f933676ce5..eadc19346408 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -1982,7 +1982,7 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba *phba,
1982 if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) && 1982 if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
1983 (irsp->un.ulpWord[4] == IOERR_NO_RESOURCES)) { 1983 (irsp->un.ulpWord[4] == IOERR_NO_RESOURCES)) {
1984 spin_unlock_irqrestore(&phba->hbalock, iflag); 1984 spin_unlock_irqrestore(&phba->hbalock, iflag);
1985 lpfc_adjust_queue_depth(phba); 1985 lpfc_rampdown_queue_depth(phba);
1986 spin_lock_irqsave(&phba->hbalock, iflag); 1986 spin_lock_irqsave(&phba->hbalock, iflag);
1987 } 1987 }
1988 1988
@@ -2225,7 +2225,7 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba *phba,
2225 if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) && 2225 if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
2226 (irsp->un.ulpWord[4] == IOERR_NO_RESOURCES)) { 2226 (irsp->un.ulpWord[4] == IOERR_NO_RESOURCES)) {
2227 spin_unlock_irqrestore(&phba->hbalock, iflag); 2227 spin_unlock_irqrestore(&phba->hbalock, iflag);
2228 lpfc_adjust_queue_depth(phba); 2228 lpfc_rampdown_queue_depth(phba);
2229 spin_lock_irqsave(&phba->hbalock, iflag); 2229 spin_lock_irqsave(&phba->hbalock, iflag);
2230 } 2230 }
2231 2231
@@ -2790,7 +2790,6 @@ lpfc_sli_brdrestart(struct lpfc_hba *phba)
2790{ 2790{
2791 MAILBOX_t *mb; 2791 MAILBOX_t *mb;
2792 struct lpfc_sli *psli; 2792 struct lpfc_sli *psli;
2793 uint16_t skip_post;
2794 volatile uint32_t word0; 2793 volatile uint32_t word0;
2795 void __iomem *to_slim; 2794 void __iomem *to_slim;
2796 2795
@@ -2815,13 +2814,10 @@ lpfc_sli_brdrestart(struct lpfc_hba *phba)
2815 readl(to_slim); /* flush */ 2814 readl(to_slim); /* flush */
2816 2815
2817 /* Only skip post after fc_ffinit is completed */ 2816 /* Only skip post after fc_ffinit is completed */
2818 if (phba->pport->port_state) { 2817 if (phba->pport->port_state)
2819 skip_post = 1;
2820 word0 = 1; /* This is really setting up word1 */ 2818 word0 = 1; /* This is really setting up word1 */
2821 } else { 2819 else
2822 skip_post = 0;
2823 word0 = 0; /* This is really setting up word1 */ 2820 word0 = 0; /* This is really setting up word1 */
2824 }
2825 to_slim = phba->MBslimaddr + sizeof (uint32_t); 2821 to_slim = phba->MBslimaddr + sizeof (uint32_t);
2826 writel(*(uint32_t *) mb, to_slim); 2822 writel(*(uint32_t *) mb, to_slim);
2827 readl(to_slim); /* flush */ 2823 readl(to_slim); /* flush */
@@ -2835,10 +2831,8 @@ lpfc_sli_brdrestart(struct lpfc_hba *phba)
2835 memset(&psli->lnk_stat_offsets, 0, sizeof(psli->lnk_stat_offsets)); 2831 memset(&psli->lnk_stat_offsets, 0, sizeof(psli->lnk_stat_offsets));
2836 psli->stats_start = get_seconds(); 2832 psli->stats_start = get_seconds();
2837 2833
2838 if (skip_post) 2834 /* Give the INITFF and Post time to settle. */
2839 mdelay(100); 2835 mdelay(100);
2840 else
2841 mdelay(2000);
2842 2836
2843 lpfc_hba_down_post(phba); 2837 lpfc_hba_down_post(phba);
2844 2838
@@ -3084,7 +3078,6 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode)
3084 spin_unlock_irq(&phba->hbalock); 3078 spin_unlock_irq(&phba->hbalock);
3085 phba->pport->port_state = LPFC_VPORT_UNKNOWN; 3079 phba->pport->port_state = LPFC_VPORT_UNKNOWN;
3086 lpfc_sli_brdrestart(phba); 3080 lpfc_sli_brdrestart(phba);
3087 msleep(2500);
3088 rc = lpfc_sli_chipset_init(phba); 3081 rc = lpfc_sli_chipset_init(phba);
3089 if (rc) 3082 if (rc)
3090 break; 3083 break;
@@ -3308,10 +3301,6 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba)
3308 struct lpfc_sli *psli = &phba->sli; 3301 struct lpfc_sli *psli = &phba->sli;
3309 struct lpfc_sli_ring *pring; 3302 struct lpfc_sli_ring *pring;
3310 3303
3311 if (!(phba->pport->work_port_events & WORKER_MBOX_TMO)) {
3312 return;
3313 }
3314
3315 /* Mbox cmd <mbxCommand> timeout */ 3304 /* Mbox cmd <mbxCommand> timeout */
3316 lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, 3305 lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI,
3317 "0310 Mailbox command x%x timeout Data: x%x x%x x%p\n", 3306 "0310 Mailbox command x%x timeout Data: x%x x%x x%p\n",
@@ -5187,6 +5176,10 @@ lpfc_sli_check_eratt(struct lpfc_hba *phba)
5187{ 5176{
5188 uint32_t ha_copy; 5177 uint32_t ha_copy;
5189 5178
5179 /* If PCI channel is offline, don't process it */
5180 if (unlikely(pci_channel_offline(phba->pcidev)))
5181 return 0;
5182
5190 /* If somebody is waiting to handle an eratt, don't process it 5183 /* If somebody is waiting to handle an eratt, don't process it
5191 * here. The brdkill function will do this. 5184 * here. The brdkill function will do this.
5192 */ 5185 */