aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_lport.c
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2009-07-29 20:05:00 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-08-22 18:52:07 -0400
commit96316099ac3cb259eac2d6891f3c75b38b29d26e (patch)
treef4ec7001462bd00340de19b3045063872652c5a6 /drivers/scsi/libfc/fc_lport.c
parent201e5795b7b9582accb6d83316e30f24d7d40fd3 (diff)
[SCSI] fcoe, libfc: adds exchange manager(EM) anchor list per lport and related APIs
Adds EM list using a anchor struct fc_exch_mgr_anchor, anchor is used to allow same EM instance sharing across more than one lport on a eth device, this implementation is per discussed design posted at http://www.open-fcoe.org/pipermail/devel/2009-June/002566.html. The shared EM is required for multiple lports on eth device when using multiple VLANs or NPIV. Adds fc_exch_mgr_add API to add a EM to the lport and fc_exch_mgr_del API to delete previously added EM. Also adds function fc_exch_mgr_destroy() to destroy allocated EM. The kref is added to the EM to keep track of EM usage count, the EM is destroyed when no longer in use upon kref reaching to zero. The caller can specify match function to fc_exch_mgr_add, this will be used in determining exchange allocation from its EM or not. Moved calling of fcoe_em_config below fcoe_libfc_config calling, so that list head lp->ema_list is initialized before configuring EM. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r--drivers/scsi/libfc/fc_lport.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index a430335ebf59..ca8ea264b684 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -1618,6 +1618,7 @@ int fc_lport_init(struct fc_lport *lport)
1618 if (lport->link_supported_speeds & FC_PORTSPEED_10GBIT) 1618 if (lport->link_supported_speeds & FC_PORTSPEED_10GBIT)
1619 fc_host_supported_speeds(lport->host) |= FC_PORTSPEED_10GBIT; 1619 fc_host_supported_speeds(lport->host) |= FC_PORTSPEED_10GBIT;
1620 1620
1621 INIT_LIST_HEAD(&lport->ema_list);
1621 return 0; 1622 return 0;
1622} 1623}
1623EXPORT_SYMBOL(fc_lport_init); 1624EXPORT_SYMBOL(fc_lport_init);