diff options
author | James Smart <James.Smart@Emulex.Com> | 2006-08-18 17:46:43 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-09-02 16:35:48 -0400 |
commit | d2873e4c1ef293ee6d66456fb84448e258a487fa (patch) | |
tree | 60941dc2fdd12b50cc94956eacc430e86e6f1c74 /drivers/scsi | |
parent | f14e2e29cdd07f80de6dec168dc2bb39de37eec3 (diff) |
[SCSI] lpfc 8.1.10 : Add support to post events via new FC event interfaces
Add support to post events via new FC event interfaces
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 5 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 6 |
4 files changed, 19 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index d44f9aac6b8f..4a4048d7ba91 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -391,3 +391,5 @@ struct rnidrsp { | |||
391 | struct list_head list; | 391 | struct list_head list; |
392 | uint32_t data; | 392 | uint32_t data; |
393 | }; | 393 | }; |
394 | |||
395 | #define FC_REG_DUMP_EVENT 0x10 /* Register for Dump events */ | ||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 3567de613162..71864cdc6c71 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -2506,6 +2506,7 @@ lpfc_els_rcv_rscn(struct lpfc_hba * phba, | |||
2506 | uint32_t *lp; | 2506 | uint32_t *lp; |
2507 | IOCB_t *icmd; | 2507 | IOCB_t *icmd; |
2508 | uint32_t payload_len, cmd; | 2508 | uint32_t payload_len, cmd; |
2509 | int i; | ||
2509 | 2510 | ||
2510 | icmd = &cmdiocb->iocb; | 2511 | icmd = &cmdiocb->iocb; |
2511 | pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; | 2512 | pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; |
@@ -2524,6 +2525,10 @@ lpfc_els_rcv_rscn(struct lpfc_hba * phba, | |||
2524 | phba->brd_no, | 2525 | phba->brd_no, |
2525 | phba->fc_flag, payload_len, *lp, phba->fc_rscn_id_cnt); | 2526 | phba->fc_flag, payload_len, *lp, phba->fc_rscn_id_cnt); |
2526 | 2527 | ||
2528 | for (i = 0; i < payload_len/sizeof(uint32_t); i++) | ||
2529 | fc_host_post_event(phba->host, fc_get_event_number(), | ||
2530 | FCH_EVT_RSCN, lp[i]); | ||
2531 | |||
2527 | /* If we are about to begin discovery, just ACC the RSCN. | 2532 | /* If we are about to begin discovery, just ACC the RSCN. |
2528 | * Discovery processing will satisfy it. | 2533 | * Discovery processing will satisfy it. |
2529 | */ | 2534 | */ |
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index b2f1552f1848..53821e5778b3 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -340,6 +340,9 @@ lpfc_linkdown(struct lpfc_hba * phba) | |||
340 | spin_unlock_irq(phba->host->host_lock); | 340 | spin_unlock_irq(phba->host->host_lock); |
341 | } | 341 | } |
342 | 342 | ||
343 | fc_host_post_event(phba->host, fc_get_event_number(), | ||
344 | FCH_EVT_LINKDOWN, 0); | ||
345 | |||
343 | /* Clean up any firmware default rpi's */ | 346 | /* Clean up any firmware default rpi's */ |
344 | if ((mb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL))) { | 347 | if ((mb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL))) { |
345 | lpfc_unreg_did(phba, 0xffffffff, mb); | 348 | lpfc_unreg_did(phba, 0xffffffff, mb); |
@@ -427,6 +430,9 @@ lpfc_linkup(struct lpfc_hba * phba) | |||
427 | struct list_head *listp, *node_list[7]; | 430 | struct list_head *listp, *node_list[7]; |
428 | int i; | 431 | int i; |
429 | 432 | ||
433 | fc_host_post_event(phba->host, fc_get_event_number(), | ||
434 | FCH_EVT_LINKUP, 0); | ||
435 | |||
430 | spin_lock_irq(phba->host->host_lock); | 436 | spin_lock_irq(phba->host->host_lock); |
431 | phba->hba_state = LPFC_LINK_UP; | 437 | phba->hba_state = LPFC_LINK_UP; |
432 | phba->fc_flag &= ~(FC_PT2PT | FC_PT2PT_PLOGI | FC_ABORT_DISCOVERY | | 438 | phba->fc_flag &= ~(FC_PT2PT | FC_PT2PT_PLOGI | FC_ABORT_DISCOVERY | |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index f6948ffe689a..84e7fc595f5e 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -511,6 +511,7 @@ lpfc_handle_eratt(struct lpfc_hba * phba) | |||
511 | { | 511 | { |
512 | struct lpfc_sli *psli = &phba->sli; | 512 | struct lpfc_sli *psli = &phba->sli; |
513 | struct lpfc_sli_ring *pring; | 513 | struct lpfc_sli_ring *pring; |
514 | uint32_t event_data; | ||
514 | 515 | ||
515 | if (phba->work_hs & HS_FFER6) { | 516 | if (phba->work_hs & HS_FFER6) { |
516 | /* Re-establishing Link */ | 517 | /* Re-establishing Link */ |
@@ -555,6 +556,11 @@ lpfc_handle_eratt(struct lpfc_hba * phba) | |||
555 | phba->brd_no, phba->work_hs, | 556 | phba->brd_no, phba->work_hs, |
556 | phba->work_status[0], phba->work_status[1]); | 557 | phba->work_status[0], phba->work_status[1]); |
557 | 558 | ||
559 | event_data = FC_REG_DUMP_EVENT; | ||
560 | fc_host_post_vendor_event(phba->host, fc_get_event_number(), | ||
561 | sizeof(event_data), (char *) &event_data, | ||
562 | SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_EMULEX); | ||
563 | |||
558 | psli->sli_flag &= ~LPFC_SLI2_ACTIVE; | 564 | psli->sli_flag &= ~LPFC_SLI2_ACTIVE; |
559 | lpfc_offline(phba); | 565 | lpfc_offline(phba); |
560 | phba->hba_state = LPFC_HBA_ERROR; | 566 | phba->hba_state = LPFC_HBA_ERROR; |