aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_svc.c
diff options
context:
space:
mode:
authorMaggie Zhang <xmzhang@brocade.com>2010-12-09 22:07:46 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:50 -0500
commitdf0f1933eb5454a5c481311837076056557467ad (patch)
tree6eb376420c7fd6db38b0b6b045a3b6eda28d9281 /drivers/scsi/bfa/bfa_svc.c
parent402c6eec1bd04581c04de758e4efddc020b78f91 (diff)
[SCSI] bfa: remove unused and empty functions
Removed unused and empty functions. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <xmzhang@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_svc.c')
-rw-r--r--drivers/scsi/bfa/bfa_svc.c260
1 files changed, 0 insertions, 260 deletions
diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c
index 04b3349ad3a1..3a2bee4d42dd 100644
--- a/drivers/scsi/bfa/bfa_svc.c
+++ b/drivers/scsi/bfa/bfa_svc.c
@@ -437,23 +437,6 @@ bfa_plog_fchdr_and_pl(struct bfa_plog_s *plog, enum bfa_plog_mid mid,
437 } 437 }
438} 438}
439 439
440void
441bfa_plog_clear(struct bfa_plog_s *plog)
442{
443 plog->head = plog->tail = 0;
444}
445
446void
447bfa_plog_enable(struct bfa_plog_s *plog)
448{
449 plog->plog_enabled = 1;
450}
451
452void
453bfa_plog_disable(struct bfa_plog_s *plog)
454{
455 plog->plog_enabled = 0;
456}
457 440
458bfa_boolean_t 441bfa_boolean_t
459bfa_plog_get_setting(struct bfa_plog_s *plog) 442bfa_plog_get_setting(struct bfa_plog_s *plog)
@@ -1853,14 +1836,6 @@ bfa_lps_fdisc(struct bfa_lps_s *lps, void *uarg, u16 pdusz, wwn_t pwwn,
1853 bfa_sm_send_event(lps, BFA_LPS_SM_LOGIN); 1836 bfa_sm_send_event(lps, BFA_LPS_SM_LOGIN);
1854} 1837}
1855 1838
1856/*
1857 * Initiate a lport logout (flogi).
1858 */
1859void
1860bfa_lps_flogo(struct bfa_lps_s *lps)
1861{
1862 bfa_sm_send_event(lps, BFA_LPS_SM_LOGOUT);
1863}
1864 1839
1865/* 1840/*
1866 * Initiate a lport FDSIC logout. 1841 * Initiate a lport FDSIC logout.
@@ -3818,89 +3793,6 @@ bfa_fcport_clear_stats(struct bfa_s *bfa, bfa_cb_port_t cbfn, void *cbarg)
3818 return BFA_STATUS_OK; 3793 return BFA_STATUS_OK;
3819} 3794}
3820 3795
3821/*
3822 * Fetch FCQoS port statistics
3823 */
3824bfa_status_t
3825bfa_fcport_get_qos_stats(struct bfa_s *bfa, union bfa_fcport_stats_u *stats,
3826 bfa_cb_port_t cbfn, void *cbarg)
3827{
3828 /* Meaningful only for FC mode */
3829 bfa_assert(bfa_ioc_get_fcmode(&bfa->ioc));
3830
3831 return bfa_fcport_get_stats(bfa, stats, cbfn, cbarg);
3832}
3833
3834/*
3835 * Reset FCoE port statistics
3836 */
3837bfa_status_t
3838bfa_fcport_clear_qos_stats(struct bfa_s *bfa, bfa_cb_port_t cbfn, void *cbarg)
3839{
3840 /* Meaningful only for FC mode */
3841 bfa_assert(bfa_ioc_get_fcmode(&bfa->ioc));
3842
3843 return bfa_fcport_clear_stats(bfa, cbfn, cbarg);
3844}
3845
3846/*
3847 * Fetch FCQoS port statistics
3848 */
3849bfa_status_t
3850bfa_fcport_get_fcoe_stats(struct bfa_s *bfa, union bfa_fcport_stats_u *stats,
3851 bfa_cb_port_t cbfn, void *cbarg)
3852{
3853 /* Meaningful only for FCoE mode */
3854 bfa_assert(!bfa_ioc_get_fcmode(&bfa->ioc));
3855
3856 return bfa_fcport_get_stats(bfa, stats, cbfn, cbarg);
3857}
3858
3859/*
3860 * Reset FCoE port statistics
3861 */
3862bfa_status_t
3863bfa_fcport_clear_fcoe_stats(struct bfa_s *bfa, bfa_cb_port_t cbfn, void *cbarg)
3864{
3865 /* Meaningful only for FCoE mode */
3866 bfa_assert(!bfa_ioc_get_fcmode(&bfa->ioc));
3867
3868 return bfa_fcport_clear_stats(bfa, cbfn, cbarg);
3869}
3870
3871void
3872bfa_fcport_qos_get_attr(struct bfa_s *bfa, struct bfa_qos_attr_s *qos_attr)
3873{
3874 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3875
3876 qos_attr->state = fcport->qos_attr.state;
3877 qos_attr->total_bb_cr = be32_to_cpu(fcport->qos_attr.total_bb_cr);
3878}
3879
3880void
3881bfa_fcport_qos_get_vc_attr(struct bfa_s *bfa,
3882 struct bfa_qos_vc_attr_s *qos_vc_attr)
3883{
3884 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3885 struct bfa_qos_vc_attr_s *bfa_vc_attr = &fcport->qos_vc_attr;
3886 u32 i = 0;
3887
3888 qos_vc_attr->total_vc_count = be16_to_cpu(bfa_vc_attr->total_vc_count);
3889 qos_vc_attr->shared_credit = be16_to_cpu(bfa_vc_attr->shared_credit);
3890 qos_vc_attr->elp_opmode_flags =
3891 be32_to_cpu(bfa_vc_attr->elp_opmode_flags);
3892
3893 /* Individual VC info */
3894 while (i < qos_vc_attr->total_vc_count) {
3895 qos_vc_attr->vc_info[i].vc_credit =
3896 bfa_vc_attr->vc_info[i].vc_credit;
3897 qos_vc_attr->vc_info[i].borrow_credit =
3898 bfa_vc_attr->vc_info[i].borrow_credit;
3899 qos_vc_attr->vc_info[i].priority =
3900 bfa_vc_attr->vc_info[i].priority;
3901 ++i;
3902 }
3903}
3904 3796
3905/* 3797/*
3906 * Fetch port attributes. 3798 * Fetch port attributes.
@@ -3924,59 +3816,6 @@ bfa_fcport_is_ratelim(struct bfa_s *bfa)
3924 3816
3925} 3817}
3926 3818
3927void
3928bfa_fcport_cfg_qos(struct bfa_s *bfa, bfa_boolean_t on_off)
3929{
3930 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3931 enum bfa_ioc_type_e ioc_type = bfa_get_type(bfa);
3932
3933 bfa_trc(bfa, on_off);
3934 bfa_trc(bfa, fcport->cfg.qos_enabled);
3935
3936 bfa_trc(bfa, ioc_type);
3937
3938 if (ioc_type == BFA_IOC_TYPE_FC) {
3939 fcport->cfg.qos_enabled = on_off;
3940 /*
3941 * Notify fcpim of the change in QoS state
3942 */
3943 bfa_fcpim_update_ioredirect(bfa);
3944 }
3945}
3946
3947void
3948bfa_fcport_cfg_ratelim(struct bfa_s *bfa, bfa_boolean_t on_off)
3949{
3950 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3951
3952 bfa_trc(bfa, on_off);
3953 bfa_trc(bfa, fcport->cfg.ratelimit);
3954
3955 fcport->cfg.ratelimit = on_off;
3956 if (fcport->cfg.trl_def_speed == BFA_PORT_SPEED_UNKNOWN)
3957 fcport->cfg.trl_def_speed = BFA_PORT_SPEED_1GBPS;
3958}
3959
3960/*
3961 * Configure default minimum ratelim speed
3962 */
3963bfa_status_t
3964bfa_fcport_cfg_ratelim_speed(struct bfa_s *bfa, enum bfa_port_speed speed)
3965{
3966 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3967
3968 bfa_trc(bfa, speed);
3969
3970 /* Auto and speeds greater than the supported speed, are invalid */
3971 if ((speed == BFA_PORT_SPEED_AUTO) || (speed > fcport->speed_sup)) {
3972 bfa_trc(bfa, fcport->speed_sup);
3973 return BFA_STATUS_UNSUPP_SPEED;
3974 }
3975
3976 fcport->cfg.trl_def_speed = speed;
3977
3978 return BFA_STATUS_OK;
3979}
3980 3819
3981/* 3820/*
3982 * Get default minimum ratelim speed 3821 * Get default minimum ratelim speed
@@ -3990,32 +3829,6 @@ bfa_fcport_get_ratelim_speed(struct bfa_s *bfa)
3990 return fcport->cfg.trl_def_speed; 3829 return fcport->cfg.trl_def_speed;
3991 3830
3992} 3831}
3993void
3994bfa_fcport_busy(struct bfa_s *bfa, bfa_boolean_t status)
3995{
3996 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3997
3998 bfa_trc(bfa, status);
3999 bfa_trc(bfa, fcport->diag_busy);
4000
4001 fcport->diag_busy = status;
4002}
4003
4004void
4005bfa_fcport_beacon(void *dev, bfa_boolean_t beacon,
4006 bfa_boolean_t link_e2e_beacon)
4007{
4008 struct bfa_s *bfa = dev;
4009 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4010
4011 bfa_trc(bfa, beacon);
4012 bfa_trc(bfa, link_e2e_beacon);
4013 bfa_trc(bfa, fcport->beacon);
4014 bfa_trc(bfa, fcport->link_e2e_beacon);
4015
4016 fcport->beacon = beacon;
4017 fcport->link_e2e_beacon = link_e2e_beacon;
4018}
4019 3832
4020bfa_boolean_t 3833bfa_boolean_t
4021bfa_fcport_is_linkup(struct bfa_s *bfa) 3834bfa_fcport_is_linkup(struct bfa_s *bfa)
@@ -4036,63 +3849,6 @@ bfa_fcport_is_qos_enabled(struct bfa_s *bfa)
4036 return fcport->cfg.qos_enabled; 3849 return fcport->cfg.qos_enabled;
4037} 3850}
4038 3851
4039bfa_status_t
4040bfa_trunk_get_attr(struct bfa_s *bfa, struct bfa_trunk_attr_s *attr)
4041
4042{
4043 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4044 struct bfa_fcport_trunk_s *trunk = &fcport->trunk;
4045
4046 bfa_trc(bfa, fcport->cfg.trunked);
4047 bfa_trc(bfa, trunk->attr.state);
4048 *attr = trunk->attr;
4049 attr->port_id = bfa_lps_get_base_pid(bfa);
4050
4051 return BFA_STATUS_OK;
4052}
4053
4054void
4055bfa_trunk_enable_cfg(struct bfa_s *bfa)
4056{
4057 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4058 struct bfa_fcport_trunk_s *trunk = &fcport->trunk;
4059
4060 bfa_trc(bfa, 1);
4061 trunk->attr.state = BFA_TRUNK_OFFLINE;
4062 fcport->cfg.trunked = BFA_TRUE;
4063}
4064
4065bfa_status_t
4066bfa_trunk_enable(struct bfa_s *bfa)
4067{
4068 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4069 struct bfa_fcport_trunk_s *trunk = &fcport->trunk;
4070
4071 bfa_trc(bfa, 1);
4072
4073 trunk->attr.state = BFA_TRUNK_OFFLINE;
4074 bfa_fcport_disable(bfa);
4075 fcport->cfg.trunked = BFA_TRUE;
4076 bfa_fcport_enable(bfa);
4077
4078 return BFA_STATUS_OK;
4079}
4080
4081bfa_status_t
4082bfa_trunk_disable(struct bfa_s *bfa)
4083{
4084 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4085 struct bfa_fcport_trunk_s *trunk = &fcport->trunk;
4086
4087 bfa_trc(bfa, 0);
4088 trunk->attr.state = BFA_TRUNK_DISABLED;
4089 bfa_fcport_disable(bfa);
4090 fcport->cfg.trunked = BFA_FALSE;
4091 bfa_fcport_enable(bfa);
4092 return BFA_STATUS_OK;
4093}
4094
4095
4096/* 3852/*
4097 * Rport State machine functions 3853 * Rport State machine functions
4098 */ 3854 */
@@ -4877,22 +4633,6 @@ bfa_rport_speed(struct bfa_rport_s *rport, enum bfa_port_speed speed)
4877} 4633}
4878 4634
4879void 4635void
4880bfa_rport_get_stats(struct bfa_rport_s *rport,
4881 struct bfa_rport_hal_stats_s *stats)
4882{
4883 *stats = rport->stats;
4884}
4885
4886void
4887bfa_rport_get_qos_attr(struct bfa_rport_s *rport,
4888 struct bfa_rport_qos_attr_s *qos_attr)
4889{
4890 qos_attr->qos_priority = rport->qos_attr.qos_priority;
4891 qos_attr->qos_flow_id = be32_to_cpu(rport->qos_attr.qos_flow_id);
4892
4893}
4894
4895void
4896bfa_rport_clear_stats(struct bfa_rport_s *rport) 4636bfa_rport_clear_stats(struct bfa_rport_s *rport)
4897{ 4637{
4898 memset(&rport->stats, 0, sizeof(rport->stats)); 4638 memset(&rport->stats, 0, sizeof(rport->stats));