aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 49577d5f130f..909be3301bba 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -36,6 +36,7 @@
36 36
37#include "lpfc_hw.h" 37#include "lpfc_hw.h"
38#include "lpfc_sli.h" 38#include "lpfc_sli.h"
39#include "lpfc_nl.h"
39#include "lpfc_disc.h" 40#include "lpfc_disc.h"
40#include "lpfc_scsi.h" 41#include "lpfc_scsi.h"
41#include "lpfc.h" 42#include "lpfc.h"
@@ -815,6 +816,7 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
815 unsigned long temperature; 816 unsigned long temperature;
816 struct temp_event temp_event_data; 817 struct temp_event temp_event_data;
817 struct Scsi_Host *shost; 818 struct Scsi_Host *shost;
819 struct lpfc_board_event_header board_event;
818 820
819 /* If the pci channel is offline, ignore possible errors, 821 /* If the pci channel is offline, ignore possible errors,
820 * since we cannot communicate with the pci card anyway. */ 822 * since we cannot communicate with the pci card anyway. */
@@ -824,6 +826,16 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
824 if (!phba->cfg_enable_hba_reset) 826 if (!phba->cfg_enable_hba_reset)
825 return; 827 return;
826 828
829 /* Send an internal error event to mgmt application */
830 board_event.event_type = FC_REG_BOARD_EVENT;
831 board_event.subcategory = LPFC_EVENT_PORTINTERR;
832 shost = lpfc_shost_from_vport(phba->pport);
833 fc_host_post_vendor_event(shost, fc_get_event_number(),
834 sizeof(board_event),
835 (char *) &board_event,
836 SCSI_NL_VID_TYPE_PCI
837 | PCI_VENDOR_ID_EMULEX);
838
827 if (phba->work_hs & HS_FFER6) { 839 if (phba->work_hs & HS_FFER6) {
828 /* Re-establishing Link */ 840 /* Re-establishing Link */
829 lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, 841 lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT,
@@ -2345,6 +2357,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
2345 int i, hbq_count; 2357 int i, hbq_count;
2346 uint16_t iotag; 2358 uint16_t iotag;
2347 int bars = pci_select_bars(pdev, IORESOURCE_MEM); 2359 int bars = pci_select_bars(pdev, IORESOURCE_MEM);
2360 struct lpfc_adapter_event_header adapter_event;
2348 2361
2349 if (pci_enable_device_mem(pdev)) 2362 if (pci_enable_device_mem(pdev))
2350 goto out; 2363 goto out;
@@ -2355,6 +2368,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
2355 if (!phba) 2368 if (!phba)
2356 goto out_release_regions; 2369 goto out_release_regions;
2357 2370
2371 atomic_set(&phba->fast_event_count, 0);
2358 spin_lock_init(&phba->hbalock); 2372 spin_lock_init(&phba->hbalock);
2359 2373
2360 /* Initialize ndlp management spinlock */ 2374 /* Initialize ndlp management spinlock */
@@ -2626,6 +2640,14 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
2626 2640
2627 lpfc_printf_log(phba, KERN_INFO, LOG_INIT, 2641 lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
2628 "0428 Perform SCSI scan\n"); 2642 "0428 Perform SCSI scan\n");
2643 /* Send board arrival event to upper layer */
2644 adapter_event.event_type = FC_REG_ADAPTER_EVENT;
2645 adapter_event.subcategory = LPFC_EVENT_ARRIVAL;
2646 fc_host_post_vendor_event(shost, fc_get_event_number(),
2647 sizeof(adapter_event),
2648 (char *) &adapter_event,
2649 SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_EMULEX);
2650
2629 scsi_scan_host(shost); 2651 scsi_scan_host(shost);
2630 2652
2631 return 0; 2653 return 0;