aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
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
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')
-rw-r--r--drivers/scsi/lpfc/lpfc_crtn.h2
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c32
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_hw.h6
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c7
-rw-r--r--drivers/scsi/lpfc/lpfc_nportdisc.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c13
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c27
8 files changed, 41 insertions, 50 deletions
diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h
index a6594857712e..73481c8fd98f 100644
--- a/drivers/scsi/lpfc/lpfc_crtn.h
+++ b/drivers/scsi/lpfc/lpfc_crtn.h
@@ -290,7 +290,7 @@ void lpfc_fabric_abort_nport(struct lpfc_nodelist *);
290void lpfc_fabric_abort_hba(struct lpfc_hba *); 290void lpfc_fabric_abort_hba(struct lpfc_hba *);
291void lpfc_fabric_block_timeout(unsigned long); 291void lpfc_fabric_block_timeout(unsigned long);
292void lpfc_unblock_fabric_iocbs(struct lpfc_hba *); 292void lpfc_unblock_fabric_iocbs(struct lpfc_hba *);
293void lpfc_adjust_queue_depth(struct lpfc_hba *); 293void lpfc_rampdown_queue_depth(struct lpfc_hba *);
294void lpfc_ramp_down_queue_handler(struct lpfc_hba *); 294void lpfc_ramp_down_queue_handler(struct lpfc_hba *);
295void lpfc_ramp_up_queue_handler(struct lpfc_hba *); 295void lpfc_ramp_up_queue_handler(struct lpfc_hba *);
296void lpfc_scsi_dev_block(struct lpfc_hba *); 296void lpfc_scsi_dev_block(struct lpfc_hba *);
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
277els_iocb_free_pbuf_exit: 277els_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
281els_iocb_free_prsp_exit: 282els_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
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index ba120530cf80..8c64494444bf 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -350,7 +350,7 @@ lpfc_send_fastpath_evt(struct lpfc_hba *phba,
350 evt_data_size = sizeof(fast_evt_data->un. 350 evt_data_size = sizeof(fast_evt_data->un.
351 read_check_error); 351 read_check_error);
352 } else if ((evt_sub_category == LPFC_EVENT_FABRIC_BUSY) || 352 } else if ((evt_sub_category == LPFC_EVENT_FABRIC_BUSY) ||
353 (evt_sub_category == IOSTAT_NPORT_BSY)) { 353 (evt_sub_category == LPFC_EVENT_PORT_BUSY)) {
354 evt_data = (char *) &fast_evt_data->un.fabric_evt; 354 evt_data = (char *) &fast_evt_data->un.fabric_evt;
355 evt_data_size = sizeof(fast_evt_data->un.fabric_evt); 355 evt_data_size = sizeof(fast_evt_data->un.fabric_evt);
356 } else { 356 } else {
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 4b5c12440b83..74a4b306d021 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -869,6 +869,12 @@ typedef struct _D_ID { /* Structure is in Big Endian format */
869 } un; 869 } un;
870} D_ID; 870} D_ID;
871 871
872#define RSCN_ADDRESS_FORMAT_PORT 0x0
873#define RSCN_ADDRESS_FORMAT_AREA 0x1
874#define RSCN_ADDRESS_FORMAT_DOMAIN 0x2
875#define RSCN_ADDRESS_FORMAT_FABRIC 0x3
876#define RSCN_ADDRESS_FORMAT_MASK 0x3
877
872/* 878/*
873 * Structure to define all ELS Payload types 879 * Structure to define all ELS Payload types
874 */ 880 */
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 64e3d344f4dd..4516d627deb9 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -742,11 +742,6 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba)
742 return; 742 return;
743 743
744 spin_lock_irq(&phba->pport->work_port_lock); 744 spin_lock_irq(&phba->pport->work_port_lock);
745 /* If the timer is already canceled do nothing */
746 if (!(phba->pport->work_port_events & WORKER_HB_TMO)) {
747 spin_unlock_irq(&phba->pport->work_port_lock);
748 return;
749 }
750 745
751 if (time_after(phba->last_completion_time + LPFC_HB_MBOX_INTERVAL * HZ, 746 if (time_after(phba->last_completion_time + LPFC_HB_MBOX_INTERVAL * HZ,
752 jiffies)) { 747 jiffies)) {
@@ -2702,8 +2697,6 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
2702 (char *) &adapter_event, 2697 (char *) &adapter_event,
2703 LPFC_NL_VENDOR_ID); 2698 LPFC_NL_VENDOR_ID);
2704 2699
2705 scsi_scan_host(shost);
2706
2707 return 0; 2700 return 0;
2708 2701
2709out_remove_device: 2702out_remove_device:
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 0c25d97acb42..8f548adae9cc 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -1929,10 +1929,10 @@ lpfc_device_recov_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
1929 if (vport->fc_flag & FC_RSCN_DEFERRED) 1929 if (vport->fc_flag & FC_RSCN_DEFERRED)
1930 return ndlp->nlp_state; 1930 return ndlp->nlp_state;
1931 1931
1932 lpfc_cancel_retry_delay_tmo(vport, ndlp);
1932 spin_lock_irq(shost->host_lock); 1933 spin_lock_irq(shost->host_lock);
1933 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); 1934 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC);
1934 spin_unlock_irq(shost->host_lock); 1935 spin_unlock_irq(shost->host_lock);
1935 lpfc_cancel_retry_delay_tmo(vport, ndlp);
1936 return ndlp->nlp_state; 1936 return ndlp->nlp_state;
1937} 1937}
1938 1938
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index cf6b2d40a923..51e6a6394951 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -148,7 +148,7 @@ lpfc_send_sdev_queuedepth_change_event(struct lpfc_hba *phba,
148} 148}
149 149
150/** 150/**
151 * lpfc_adjust_queue_depth: Post RAMP_DOWN_QUEUE event for worker thread. 151 * lpfc_rampdown_queue_depth: Post RAMP_DOWN_QUEUE event to worker thread.
152 * @phba: The Hba for which this call is being executed. 152 * @phba: The Hba for which this call is being executed.
153 * 153 *
154 * This routine is called when there is resource error in driver or firmware. 154 * This routine is called when there is resource error in driver or firmware.
@@ -159,7 +159,7 @@ lpfc_send_sdev_queuedepth_change_event(struct lpfc_hba *phba,
159 * This routine should be called with no lock held. 159 * This routine should be called with no lock held.
160 **/ 160 **/
161void 161void
162lpfc_adjust_queue_depth(struct lpfc_hba *phba) 162lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
163{ 163{
164 unsigned long flags; 164 unsigned long flags;
165 uint32_t evt_posted; 165 uint32_t evt_posted;
@@ -1551,7 +1551,7 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
1551 1551
1552 lpfc_cmd = lpfc_get_scsi_buf(phba); 1552 lpfc_cmd = lpfc_get_scsi_buf(phba);
1553 if (lpfc_cmd == NULL) { 1553 if (lpfc_cmd == NULL) {
1554 lpfc_adjust_queue_depth(phba); 1554 lpfc_rampdown_queue_depth(phba);
1555 1555
1556 lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, 1556 lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP,
1557 "0707 driver's buffer pool is empty, " 1557 "0707 driver's buffer pool is empty, "
@@ -1559,7 +1559,6 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
1559 goto out_host_busy; 1559 goto out_host_busy;
1560 } 1560 }
1561 1561
1562 lpfc_cmd->start_time = jiffies;
1563 /* 1562 /*
1564 * Store the midlayer's command structure for the completion phase 1563 * Store the midlayer's command structure for the completion phase
1565 * and complete the command initialization. 1564 * and complete the command initialization.
@@ -1580,9 +1579,10 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
1580 atomic_inc(&ndlp->cmd_pending); 1579 atomic_inc(&ndlp->cmd_pending);
1581 err = lpfc_sli_issue_iocb(phba, &phba->sli.ring[psli->fcp_ring], 1580 err = lpfc_sli_issue_iocb(phba, &phba->sli.ring[psli->fcp_ring],
1582 &lpfc_cmd->cur_iocbq, SLI_IOCB_RET_IOCB); 1581 &lpfc_cmd->cur_iocbq, SLI_IOCB_RET_IOCB);
1583 if (err) 1582 if (err) {
1583 atomic_dec(&ndlp->cmd_pending);
1584 goto out_host_busy_free_buf; 1584 goto out_host_busy_free_buf;
1585 1585 }
1586 if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { 1586 if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
1587 lpfc_sli_poll_fcp_ring(phba); 1587 lpfc_sli_poll_fcp_ring(phba);
1588 if (phba->cfg_poll & DISABLE_FCP_RING_INT) 1588 if (phba->cfg_poll & DISABLE_FCP_RING_INT)
@@ -1592,7 +1592,6 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
1592 return 0; 1592 return 0;
1593 1593
1594 out_host_busy_free_buf: 1594 out_host_busy_free_buf:
1595 atomic_dec(&ndlp->cmd_pending);
1596 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); 1595 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd);
1597 lpfc_release_scsi_buf(phba, lpfc_cmd); 1596 lpfc_release_scsi_buf(phba, lpfc_cmd);
1598 out_host_busy: 1597 out_host_busy:
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 */