aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_fcs.h
diff options
context:
space:
mode:
authorMaggie Zhang <xmzhang@brocade.com>2010-12-09 22:08:43 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:32:43 -0500
commitf7f73812e95077c19a2801bbf4f483fcdab5232f (patch)
tree1683aef984bf23a83dc5764503a0972f64ddf5a5 /drivers/scsi/bfa/bfa_fcs.h
parentdf0f1933eb5454a5c481311837076056557467ad (diff)
[SCSI] bfa: clean up one line functions
Cleaned up one line functions. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcs.h')
-rw-r--r--drivers/scsi/bfa/bfa_fcs.h87
1 files changed, 72 insertions, 15 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h
index fcb54e5ef331..e7977ee32992 100644
--- a/drivers/scsi/bfa/bfa_fcs.h
+++ b/drivers/scsi/bfa/bfa_fcs.h
@@ -27,6 +27,21 @@
27#define BFA_FCS_OS_STR_LEN 64 27#define BFA_FCS_OS_STR_LEN 64
28 28
29/* 29/*
30 * lps_pvt BFA LPS private functions
31 */
32
33enum bfa_lps_event {
34 BFA_LPS_SM_LOGIN = 1, /* login request from user */
35 BFA_LPS_SM_LOGOUT = 2, /* logout request from user */
36 BFA_LPS_SM_FWRSP = 3, /* f/w response to login/logout */
37 BFA_LPS_SM_RESUME = 4, /* space present in reqq queue */
38 BFA_LPS_SM_DELETE = 5, /* lps delete from user */
39 BFA_LPS_SM_OFFLINE = 6, /* Link is offline */
40 BFA_LPS_SM_RX_CVL = 7, /* Rx clear virtual link */
41};
42
43
44/*
30 * !!! Only append to the enums defined here to avoid any versioning 45 * !!! Only append to the enums defined here to avoid any versioning
31 * !!! needed between trace utility and driver version 46 * !!! needed between trace utility and driver version
32 */ 47 */
@@ -41,7 +56,6 @@ enum {
41struct bfa_fcs_s; 56struct bfa_fcs_s;
42 57
43#define __fcs_min_cfg(__fcs) ((__fcs)->min_cfg) 58#define __fcs_min_cfg(__fcs) ((__fcs)->min_cfg)
44void bfa_fcs_modexit_comp(struct bfa_fcs_s *fcs);
45 59
46#define BFA_FCS_BRCD_SWITCH_OUI 0x051e 60#define BFA_FCS_BRCD_SWITCH_OUI 0x051e
47#define N2N_LOCAL_PID 0x010000 61#define N2N_LOCAL_PID 0x010000
@@ -444,9 +458,6 @@ void bfa_fcs_rport_scn(struct bfa_fcs_rport_s *rport);
444 458
445struct bfa_fcs_rport_s *bfa_fcs_rport_create(struct bfa_fcs_lport_s *port, 459struct bfa_fcs_rport_s *bfa_fcs_rport_create(struct bfa_fcs_lport_s *port,
446 u32 pid); 460 u32 pid);
447void bfa_fcs_rport_delete(struct bfa_fcs_rport_s *rport);
448void bfa_fcs_rport_online(struct bfa_fcs_rport_s *rport);
449void bfa_fcs_rport_offline(struct bfa_fcs_rport_s *rport);
450void bfa_fcs_rport_start(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, 461void bfa_fcs_rport_start(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs,
451 struct fc_logi_s *plogi_rsp); 462 struct fc_logi_s *plogi_rsp);
452void bfa_fcs_rport_plogi_create(struct bfa_fcs_lport_s *port, 463void bfa_fcs_rport_plogi_create(struct bfa_fcs_lport_s *port,
@@ -454,10 +465,8 @@ void bfa_fcs_rport_plogi_create(struct bfa_fcs_lport_s *port,
454 struct fc_logi_s *plogi); 465 struct fc_logi_s *plogi);
455void bfa_fcs_rport_plogi(struct bfa_fcs_rport_s *rport, struct fchs_s *fchs, 466void bfa_fcs_rport_plogi(struct bfa_fcs_rport_s *rport, struct fchs_s *fchs,
456 struct fc_logi_s *plogi); 467 struct fc_logi_s *plogi);
457void bfa_fcs_rport_logo_imp(struct bfa_fcs_rport_s *rport);
458void bfa_fcs_rport_prlo(struct bfa_fcs_rport_s *rport, __be16 ox_id); 468void bfa_fcs_rport_prlo(struct bfa_fcs_rport_s *rport, __be16 ox_id);
459 469
460void bfa_fcs_rport_itnim_ack(struct bfa_fcs_rport_s *rport);
461void bfa_fcs_rport_itntm_ack(struct bfa_fcs_rport_s *rport); 470void bfa_fcs_rport_itntm_ack(struct bfa_fcs_rport_s *rport);
462void bfa_fcs_rport_fcptm_offline_done(struct bfa_fcs_rport_s *rport); 471void bfa_fcs_rport_fcptm_offline_done(struct bfa_fcs_rport_s *rport);
463int bfa_fcs_rport_get_state(struct bfa_fcs_rport_s *rport); 472int bfa_fcs_rport_get_state(struct bfa_fcs_rport_s *rport);
@@ -648,6 +657,57 @@ struct bfa_fcs_s {
648}; 657};
649 658
650/* 659/*
660 * fcs_fabric_sm fabric state machine functions
661 */
662
663/*
664 * Fabric state machine events
665 */
666enum bfa_fcs_fabric_event {
667 BFA_FCS_FABRIC_SM_CREATE = 1, /* create from driver */
668 BFA_FCS_FABRIC_SM_DELETE = 2, /* delete from driver */
669 BFA_FCS_FABRIC_SM_LINK_DOWN = 3, /* link down from port */
670 BFA_FCS_FABRIC_SM_LINK_UP = 4, /* link up from port */
671 BFA_FCS_FABRIC_SM_CONT_OP = 5, /* flogi/auth continue op */
672 BFA_FCS_FABRIC_SM_RETRY_OP = 6, /* flogi/auth retry op */
673 BFA_FCS_FABRIC_SM_NO_FABRIC = 7, /* from flogi/auth */
674 BFA_FCS_FABRIC_SM_PERF_EVFP = 8, /* from flogi/auth */
675 BFA_FCS_FABRIC_SM_ISOLATE = 9, /* from EVFP processing */
676 BFA_FCS_FABRIC_SM_NO_TAGGING = 10, /* no VFT tagging from EVFP */
677 BFA_FCS_FABRIC_SM_DELAYED = 11, /* timeout delay event */
678 BFA_FCS_FABRIC_SM_AUTH_FAILED = 12, /* auth failed */
679 BFA_FCS_FABRIC_SM_AUTH_SUCCESS = 13, /* auth successful */
680 BFA_FCS_FABRIC_SM_DELCOMP = 14, /* all vports deleted event */
681 BFA_FCS_FABRIC_SM_LOOPBACK = 15, /* Received our own FLOGI */
682 BFA_FCS_FABRIC_SM_START = 16, /* from driver */
683};
684
685/*
686 * fcs_rport_sm FCS rport state machine events
687 */
688
689enum rport_event {
690 RPSM_EVENT_PLOGI_SEND = 1, /* new rport; start with PLOGI */
691 RPSM_EVENT_PLOGI_RCVD = 2, /* Inbound PLOGI from remote port */
692 RPSM_EVENT_PLOGI_COMP = 3, /* PLOGI completed to rport */
693 RPSM_EVENT_LOGO_RCVD = 4, /* LOGO from remote device */
694 RPSM_EVENT_LOGO_IMP = 5, /* implicit logo for SLER */
695 RPSM_EVENT_FCXP_SENT = 6, /* Frame from has been sent */
696 RPSM_EVENT_DELETE = 7, /* RPORT delete request */
697 RPSM_EVENT_SCN = 8, /* state change notification */
698 RPSM_EVENT_ACCEPTED = 9, /* Good response from remote device */
699 RPSM_EVENT_FAILED = 10, /* Request to rport failed. */
700 RPSM_EVENT_TIMEOUT = 11, /* Rport SM timeout event */
701 RPSM_EVENT_HCB_ONLINE = 12, /* BFA rport online callback */
702 RPSM_EVENT_HCB_OFFLINE = 13, /* BFA rport offline callback */
703 RPSM_EVENT_FC4_OFFLINE = 14, /* FC-4 offline complete */
704 RPSM_EVENT_ADDRESS_CHANGE = 15, /* Rport's PID has changed */
705 RPSM_EVENT_ADDRESS_DISC = 16, /* Need to Discover rport's PID */
706 RPSM_EVENT_PRLO_RCVD = 17, /* PRLO from remote device */
707 RPSM_EVENT_PLOGI_RETRY = 18, /* Retry PLOGI continously */
708};
709
710/*
651 * bfa fcs API functions 711 * bfa fcs API functions
652 */ 712 */
653void bfa_fcs_attach(struct bfa_fcs_s *fcs, struct bfa_s *bfa, 713void bfa_fcs_attach(struct bfa_fcs_s *fcs, struct bfa_s *bfa,
@@ -656,16 +716,12 @@ void bfa_fcs_attach(struct bfa_fcs_s *fcs, struct bfa_s *bfa,
656void bfa_fcs_init(struct bfa_fcs_s *fcs); 716void bfa_fcs_init(struct bfa_fcs_s *fcs);
657void bfa_fcs_driver_info_init(struct bfa_fcs_s *fcs, 717void bfa_fcs_driver_info_init(struct bfa_fcs_s *fcs,
658 struct bfa_fcs_driver_info_s *driver_info); 718 struct bfa_fcs_driver_info_s *driver_info);
659void bfa_fcs_set_fdmi_param(struct bfa_fcs_s *fcs, bfa_boolean_t fdmi_enable);
660void bfa_fcs_exit(struct bfa_fcs_s *fcs); 719void bfa_fcs_exit(struct bfa_fcs_s *fcs);
661void bfa_fcs_trc_init(struct bfa_fcs_s *fcs, struct bfa_trc_mod_s *trcmod);
662void bfa_fcs_start(struct bfa_fcs_s *fcs);
663 720
664/* 721/*
665 * bfa fcs vf public functions 722 * bfa fcs vf public functions
666 */ 723 */
667bfa_fcs_vf_t *bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id); 724bfa_fcs_vf_t *bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id);
668u16 bfa_fcs_fabric_vport_count(struct bfa_fcs_fabric_s *fabric);
669 725
670/* 726/*
671 * fabric protected interface functions 727 * fabric protected interface functions
@@ -679,22 +735,23 @@ void bfa_fcs_fabric_addvport(struct bfa_fcs_fabric_s *fabric,
679 struct bfa_fcs_vport_s *vport); 735 struct bfa_fcs_vport_s *vport);
680void bfa_fcs_fabric_delvport(struct bfa_fcs_fabric_s *fabric, 736void bfa_fcs_fabric_delvport(struct bfa_fcs_fabric_s *fabric,
681 struct bfa_fcs_vport_s *vport); 737 struct bfa_fcs_vport_s *vport);
682int bfa_fcs_fabric_is_online(struct bfa_fcs_fabric_s *fabric);
683struct bfa_fcs_vport_s *bfa_fcs_fabric_vport_lookup( 738struct bfa_fcs_vport_s *bfa_fcs_fabric_vport_lookup(
684 struct bfa_fcs_fabric_s *fabric, wwn_t pwwn); 739 struct bfa_fcs_fabric_s *fabric, wwn_t pwwn);
685void bfa_fcs_fabric_modstart(struct bfa_fcs_s *fcs); 740void bfa_fcs_fabric_modstart(struct bfa_fcs_s *fcs);
686void bfa_fcs_fabric_uf_recv(struct bfa_fcs_fabric_s *fabric, 741void bfa_fcs_fabric_uf_recv(struct bfa_fcs_fabric_s *fabric,
687 struct fchs_s *fchs, u16 len); 742 struct fchs_s *fchs, u16 len);
688bfa_boolean_t bfa_fcs_fabric_is_loopback(struct bfa_fcs_fabric_s *fabric);
689bfa_boolean_t bfa_fcs_fabric_is_auth_failed(struct bfa_fcs_fabric_s *fabric);
690enum bfa_port_type bfa_fcs_fabric_port_type(struct bfa_fcs_fabric_s *fabric);
691void bfa_fcs_fabric_psymb_init(struct bfa_fcs_fabric_s *fabric); 743void bfa_fcs_fabric_psymb_init(struct bfa_fcs_fabric_s *fabric);
692void bfa_fcs_fabric_port_delete_comp(struct bfa_fcs_fabric_s *fabric);
693void bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric, 744void bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric,
694 wwn_t fabric_name); 745 wwn_t fabric_name);
695u16 bfa_fcs_fabric_get_switch_oui(struct bfa_fcs_fabric_s *fabric); 746u16 bfa_fcs_fabric_get_switch_oui(struct bfa_fcs_fabric_s *fabric);
696void bfa_fcs_uf_attach(struct bfa_fcs_s *fcs); 747void bfa_fcs_uf_attach(struct bfa_fcs_s *fcs);
697void bfa_fcs_port_attach(struct bfa_fcs_s *fcs); 748void bfa_fcs_port_attach(struct bfa_fcs_s *fcs);
749void bfa_fcs_fabric_sm_online(struct bfa_fcs_fabric_s *fabric,
750 enum bfa_fcs_fabric_event event);
751void bfa_fcs_fabric_sm_loopback(struct bfa_fcs_fabric_s *fabric,
752 enum bfa_fcs_fabric_event event);
753void bfa_fcs_fabric_sm_auth_failed(struct bfa_fcs_fabric_s *fabric,
754 enum bfa_fcs_fabric_event event);
698 755
699/* 756/*
700 * BFA FCS callback interfaces 757 * BFA FCS callback interfaces