From: James Smart <James.Smart@Emulex.Com>
To: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH 8/9] lpfc 8.1.3 : Adding hbaapi event support using new fc transport events api
Date: Wed, 22 Feb 2006 12:34:01 -0500 [thread overview]
Message-ID: <43FCA089.9090101@emulex.com> (raw)
Adding hbaapi event support using new fc transport events api
Requires the following patch, which adds event support to the FC transport:
http://marc.theaimsgroup.com/?l=linux-scsi&m=114062467404472&w=2
Signed-off-by: James Smart <James.Smart@emulex.com>
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -320,6 +320,8 @@ lpfc_linkdown(struct lpfc_hba * phba)
spin_unlock_irq(phba->host->host_lock);
}
+ fc_host_event_post(phba->host, FCH_EVT_LINKDOWN, 0);
+
/* Clean up any firmware default rpi's */
if ((mb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL))) {
lpfc_unreg_did(phba, 0xffffffff, mb);
@@ -415,6 +417,7 @@ lpfc_linkup(struct lpfc_hba * phba)
phba->fc_ns_retry = 0;
spin_unlock_irq(phba->host->host_lock);
+ fc_host_event_post(phba->host, FCH_EVT_LINKUP, 0);
node_list[0] = &phba->fc_plogi_list;
node_list[1] = &phba->fc_adisc_list;
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -561,6 +561,7 @@ lpfc_handle_eratt(struct lpfc_hba * phba
lpfc_offline(phba);
phba->hba_state = LPFC_HBA_ERROR;
+ fc_host_event_post(phba->host, FCH_EVT_VENDOR_UNIQUE, 0);
lpfc_hba_down_post(phba);
}
}
@@ -1333,6 +1334,8 @@ lpfc_online(struct lpfc_hba * phba)
if (lpfc_sli_hba_setup(phba)) /* Initialize the HBA */
return 1;
+ fc_host_event_post(phba->host, FCH_EVT_PORT_ONLINE, 0);
+
spin_lock_irq(phba->host->host_lock);
phba->fc_flag &= ~FC_OFFLINE_MODE;
spin_unlock_irq(phba->host->host_lock);
@@ -1354,6 +1357,8 @@ lpfc_offline(struct lpfc_hba * phba)
if (phba->fc_flag & FC_OFFLINE_MODE)
return 0;
+ fc_host_event_post(phba->host, FCH_EVT_PORT_OFFLINE, 0);
+
psli = &phba->sli;
pring = &psli->ring[psli->fcp_ring];
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -2383,6 +2383,7 @@ lpfc_els_rcv_rscn(struct lpfc_hba * phba
uint32_t *lp;
IOCB_t *icmd;
uint32_t payload_len, cmd;
+ int i;
icmd = &cmdiocb->iocb;
pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
@@ -2401,6 +2402,9 @@ lpfc_els_rcv_rscn(struct lpfc_hba * phba
phba->brd_no,
phba->fc_flag, payload_len, *lp, phba->fc_rscn_id_cnt);
+ for (i = 0; i < payload_len/sizeof (uint32_t); i++)
+ fc_host_event_post(phba->host, FCH_EVT_RSCN, lp[i]);
+
/* If we are about to begin discovery, just ACC the RSCN.
* Discovery processing will satisfy it.
*/
next reply other threads:[~2006-02-22 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-22 17:34 James Smart [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-03-01 3:33 [PATCH 8/9] lpfc 8.1.3: Adding hbaapi event support using new fc transport events api Jamie Wellnitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43FCA089.9090101@emulex.com \
--to=james.smart@emulex.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.