aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Leech <christopher.leech@intel.com>2009-11-03 14:46:19 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:00:57 -0500
commit8faecddb212d502b1b77936498b9a82b13c4ff44 (patch)
tree6809700a72089288aec97187fc7f6455fa6b1d95 /include
parent174e1ebffd30a7599b889900089f7acef944cc6b (diff)
[SCSI] libfc: vport link handling and fc_vport state managment
NPIV vports are managed in libfc by changing their virtual link state when the parent N_Ports internal state changes. The vport link is only online when the N_Port is in a ready state (logged into the fabric). vport_state is updated as needed in this patch as well, currently the states LINKDOWN, INITIALIZING, ACTIVE, DSIABLED, and NO_FABRIC_SUPP are used. This also changes the fc_host port_state handling to differentiate between LINKDOWN and OFFLINE. Signed-off-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/libfc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 2c6d55de8ccd..dfeb1ee4f03f 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -788,11 +788,13 @@ int fc_fabric_login(struct fc_lport *lp);
788/* 788/*
789 * The link is up for the given local port. 789 * The link is up for the given local port.
790 */ 790 */
791void __fc_linkup(struct fc_lport *);
791void fc_linkup(struct fc_lport *); 792void fc_linkup(struct fc_lport *);
792 793
793/* 794/*
794 * Link is down for the given local port. 795 * Link is down for the given local port.
795 */ 796 */
797void __fc_linkdown(struct fc_lport *);
796void fc_linkdown(struct fc_lport *); 798void fc_linkdown(struct fc_lport *);
797 799
798/* 800/*
@@ -821,6 +823,12 @@ struct fc_lport *libfc_vport_create(struct fc_vport *vport, int privsize);
821struct fc_lport *fc_vport_id_lookup(struct fc_lport *n_port, u32 port_id); 823struct fc_lport *fc_vport_id_lookup(struct fc_lport *n_port, u32 port_id);
822 824
823/* 825/*
826 * NPIV VN_Port link state management
827 */
828void fc_vport_setlink(struct fc_lport *vn_port);
829void fc_vports_linkchange(struct fc_lport *n_port);
830
831/*
824 * REMOTE PORT LAYER 832 * REMOTE PORT LAYER
825 *****************************/ 833 *****************************/
826int fc_rport_init(struct fc_lport *lp); 834int fc_rport_init(struct fc_lport *lp);