diff options
author | Rashika Kheria <rashika.kheria@gmail.com> | 2014-01-24 04:14:00 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-07 10:15:48 -0800 |
commit | 19ca44bdc7bf84a324344836367526a436a6e482 (patch) | |
tree | 9befd171bb1fa208b84fec9f52f2583e7baff41a /drivers/staging/silicom/bpctl_mod.c | |
parent | 388abdac58ba2d195aadaee27170c1e54943777f (diff) | |
download | op-kernel-dev-19ca44bdc7bf84a324344836367526a436a6e482.zip op-kernel-dev-19ca44bdc7bf84a324344836367526a436a6e482.tar.gz |
drivers: staging: Mark functions as static and remove unused function in bpctl_mod.c
Mark functions as static in bpctl_mod.c because they are not used
outside this file. Remove unused function from bpctl_mod.c.
This also eliminates the following warnings from bpctl_mod.c:
drivers/staging/silicom/bpctl_mod.c:1507:6: warning: no previous prototype for ‘send_bypass_clear_pulse’ [-Wmissing-prototypes]
drivers/staging/silicom/bpctl_mod.c:1762:5: warning: no previous prototype for ‘cmnd_on’ [-Wmissing-prototypes]
drivers/staging/silicom/bpctl_mod.c:1779:5: warning: no previous prototype for ‘cmnd_off’ [-Wmissing-prototypes]
...
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/silicom/bpctl_mod.c')
-rw-r--r-- | drivers/staging/silicom/bpctl_mod.c | 584 |
1 files changed, 126 insertions, 458 deletions
diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 20325f5..00b3c51 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -1502,7 +1502,8 @@ static int send_wdt_pulse(struct bpctl_dev *pbpctl_dev) return 0; } -void send_bypass_clear_pulse(struct bpctl_dev *pbpctl_dev, unsigned int value) +static void send_bypass_clear_pulse(struct bpctl_dev *pbpctl_dev, + unsigned int value) { uint32_t ctrl_ext = 0; @@ -1757,7 +1758,7 @@ static int wdt_pulse_int(struct bpctl_dev *pbpctl_dev) /*************************************/ /* CMND_ON 0x4 (100)*/ -int cmnd_on(struct bpctl_dev *pbpctl_dev) +static int cmnd_on(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; @@ -1774,7 +1775,7 @@ int cmnd_on(struct bpctl_dev *pbpctl_dev) } /* CMND_OFF 0x2 (10)*/ -int cmnd_off(struct bpctl_dev *pbpctl_dev) +static int cmnd_off(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; @@ -1792,7 +1793,7 @@ int cmnd_off(struct bpctl_dev *pbpctl_dev) } /* BYPASS_ON (0xa)*/ -int bypass_on(struct bpctl_dev *pbpctl_dev) +static int bypass_on(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; @@ -1813,7 +1814,7 @@ int bypass_on(struct bpctl_dev *pbpctl_dev) } /* BYPASS_OFF (0x8 111)*/ -int bypass_off(struct bpctl_dev *pbpctl_dev) +static int bypass_off(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; @@ -1836,7 +1837,7 @@ int bypass_off(struct bpctl_dev *pbpctl_dev) } /* TAP_OFF (0x9)*/ -int tap_off(struct bpctl_dev *pbpctl_dev) +static int tap_off(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; if ((pbpctl_dev->bp_caps & TAP_CAP) @@ -1849,7 +1850,7 @@ int tap_off(struct bpctl_dev *pbpctl_dev) } /* TAP_ON (0xb)*/ -int tap_on(struct bpctl_dev *pbpctl_dev) +static int tap_on(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; if ((pbpctl_dev->bp_caps & TAP_CAP) @@ -1862,7 +1863,7 @@ int tap_on(struct bpctl_dev *pbpctl_dev) } /* DISC_OFF (0x9)*/ -int disc_off(struct bpctl_dev *pbpctl_dev) +static int disc_off(struct bpctl_dev *pbpctl_dev) { int ret = 0; if ((pbpctl_dev->bp_caps & DISC_CAP) && (pbpctl_dev->bp_ext_ver >= 0x8)) { @@ -1874,7 +1875,7 @@ int disc_off(struct bpctl_dev *pbpctl_dev) } /* DISC_ON (0xb)*/ -int disc_on(struct bpctl_dev *pbpctl_dev) +static int disc_on(struct bpctl_dev *pbpctl_dev) { int ret = 0; if ((pbpctl_dev->bp_caps & DISC_CAP) && (pbpctl_dev->bp_ext_ver >= 0x8)) { @@ -1885,58 +1886,8 @@ int disc_on(struct bpctl_dev *pbpctl_dev) return ret; } -/* DISC_PORT_ON */ -int disc_port_on(struct bpctl_dev *pbpctl_dev) -{ - int ret = 0; - struct bpctl_dev *pbpctl_dev_m; - - if ((is_bypass_fn(pbpctl_dev)) == 1) - pbpctl_dev_m = pbpctl_dev; - else - pbpctl_dev_m = get_master_port_fn(pbpctl_dev); - if (pbpctl_dev_m == NULL) - return BP_NOT_CAP; - - if (pbpctl_dev_m->bp_caps_ex & DISC_PORT_CAP_EX) { - if (is_bypass_fn(pbpctl_dev) == 1) - write_data(pbpctl_dev_m, TX_DISA); - else - write_data(pbpctl_dev_m, TX_DISB); - - msec_delay_bp(LATCH_DELAY); - - } - return ret; -} - -/* DISC_PORT_OFF */ -int disc_port_off(struct bpctl_dev *pbpctl_dev) -{ - int ret = 0; - struct bpctl_dev *pbpctl_dev_m; - - if ((is_bypass_fn(pbpctl_dev)) == 1) - pbpctl_dev_m = pbpctl_dev; - else - pbpctl_dev_m = get_master_port_fn(pbpctl_dev); - if (pbpctl_dev_m == NULL) - return BP_NOT_CAP; - - if (pbpctl_dev_m->bp_caps_ex & DISC_PORT_CAP_EX) { - if (is_bypass_fn(pbpctl_dev) == 1) - write_data(pbpctl_dev_m, TX_ENA); - else - write_data(pbpctl_dev_m, TX_ENB); - - msec_delay_bp(LATCH_DELAY); - - } - return ret; -} - /*TWO_PORT_LINK_HW_EN (0xe)*/ -int tpl_hw_on(struct bpctl_dev *pbpctl_dev) +static int tpl_hw_on(struct bpctl_dev *pbpctl_dev) { int ret = 0, ctrl = 0; struct bpctl_dev *pbpctl_dev_b = NULL; @@ -1964,7 +1915,7 @@ int tpl_hw_on(struct bpctl_dev *pbpctl_dev) } /*TWO_PORT_LINK_HW_DIS (0xc)*/ -int tpl_hw_off(struct bpctl_dev *pbpctl_dev) +static int tpl_hw_off(struct bpctl_dev *pbpctl_dev) { int ret = 0, ctrl = 0; struct bpctl_dev *pbpctl_dev_b = NULL; @@ -1990,7 +1941,7 @@ int tpl_hw_off(struct bpctl_dev *pbpctl_dev) } /* WDT_OFF (0x6 110)*/ -int wdt_off(struct bpctl_dev *pbpctl_dev) +static int wdt_off(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; @@ -2013,7 +1964,7 @@ int wdt_off(struct bpctl_dev *pbpctl_dev) static unsigned int wdt_val_array[] = { 1000, 1500, 2000, 3000, 4000, 8000, 16000, 32000, 0 }; -int wdt_on(struct bpctl_dev *pbpctl_dev, unsigned int timeout) +static int wdt_on(struct bpctl_dev *pbpctl_dev, unsigned int timeout) { if (pbpctl_dev->bp_caps & WD_CTL_CAP) { @@ -2065,7 +2016,7 @@ int wdt_on(struct bpctl_dev *pbpctl_dev, unsigned int timeout) return BP_NOT_CAP; } -void bp75_put_hw_semaphore_generic(struct bpctl_dev *pbpctl_dev) +static void bp75_put_hw_semaphore_generic(struct bpctl_dev *pbpctl_dev) { u32 swsm; @@ -2076,7 +2027,7 @@ void bp75_put_hw_semaphore_generic(struct bpctl_dev *pbpctl_dev) BPCTL_WRITE_REG(pbpctl_dev, SWSM, swsm); } -s32 bp75_get_hw_semaphore_generic(struct bpctl_dev *pbpctl_dev) +static s32 bp75_get_hw_semaphore_generic(struct bpctl_dev *pbpctl_dev) { u32 swsm; s32 ret_val = 0; @@ -2190,7 +2141,8 @@ static s32 bp75_acquire_phy(struct bpctl_dev *pbpctl_dev) return ret_val; } -s32 bp75_read_phy_reg_mdic(struct bpctl_dev *pbpctl_dev, u32 offset, u16 *data) +static s32 bp75_read_phy_reg_mdic(struct bpctl_dev *pbpctl_dev, u32 offset, + u16 *data) { u32 i, mdic = 0; s32 ret_val = 0; @@ -2223,7 +2175,8 @@ s32 bp75_read_phy_reg_mdic(struct bpctl_dev *pbpctl_dev, u32 offset, u16 *data) return ret_val; } -s32 bp75_write_phy_reg_mdic(struct bpctl_dev *pbpctl_dev, u32 offset, u16 data) +static s32 bp75_write_phy_reg_mdic(struct bpctl_dev *pbpctl_dev, u32 offset, + u16 data) { u32 i, mdic = 0; s32 ret_val = 0; @@ -2534,7 +2487,7 @@ static int set_bp_force_link(struct bpctl_dev *pbpctl_dev, int tx_state) } /*RESET_CONT 0x20 */ -int reset_cont(struct bpctl_dev *pbpctl_dev) +static int reset_cont(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; @@ -2551,7 +2504,7 @@ int reset_cont(struct bpctl_dev *pbpctl_dev) } /*DIS_BYPASS_CAP 0x22 */ -int dis_bypass_cap(struct bpctl_dev *pbpctl_dev) +static int dis_bypass_cap(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & BP_DIS_CAP) { @@ -2570,7 +2523,7 @@ int dis_bypass_cap(struct bpctl_dev *pbpctl_dev) } /*EN_BYPASS_CAP 0x24 */ -int en_bypass_cap(struct bpctl_dev *pbpctl_dev) +static int en_bypass_cap(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & BP_DIS_CAP) { if (INTEL_IF_SERIES(pbpctl_dev->subdevice)) { @@ -2586,7 +2539,7 @@ int en_bypass_cap(struct bpctl_dev *pbpctl_dev) } /* BYPASS_STATE_PWRON 0x26*/ -int bypass_state_pwron(struct bpctl_dev *pbpctl_dev) +static int bypass_state_pwron(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & BP_PWUP_CTL_CAP) { write_data(pbpctl_dev, BYPASS_STATE_PWRON); @@ -2600,7 +2553,7 @@ int bypass_state_pwron(struct bpctl_dev *pbpctl_dev) } /* NORMAL_STATE_PWRON 0x28*/ -int normal_state_pwron(struct bpctl_dev *pbpctl_dev) +static int normal_state_pwron(struct bpctl_dev *pbpctl_dev) { if ((pbpctl_dev->bp_caps & BP_PWUP_CTL_CAP) || (pbpctl_dev->bp_caps & TAP_PWUP_CTL_CAP)) { @@ -2615,7 +2568,7 @@ int normal_state_pwron(struct bpctl_dev *pbpctl_dev) } /* BYPASS_STATE_PWROFF 0x27*/ -int bypass_state_pwroff(struct bpctl_dev *pbpctl_dev) +static int bypass_state_pwroff(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & BP_PWOFF_CTL_CAP) { write_data(pbpctl_dev, BYPASS_STATE_PWROFF); @@ -2626,7 +2579,7 @@ int bypass_state_pwroff(struct bpctl_dev *pbpctl_dev) } /* NORMAL_STATE_PWROFF 0x29*/ -int normal_state_pwroff(struct bpctl_dev *pbpctl_dev) +static int normal_state_pwroff(struct bpctl_dev *pbpctl_dev) { if ((pbpctl_dev->bp_caps & BP_PWOFF_CTL_CAP)) { write_data(pbpctl_dev, NORMAL_STATE_PWROFF); @@ -2637,7 +2590,7 @@ int normal_state_pwroff(struct bpctl_dev *pbpctl_dev) } /*TAP_STATE_PWRON 0x2a*/ -int tap_state_pwron(struct bpctl_dev *pbpctl_dev) +static int tap_state_pwron(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & TAP_PWUP_CTL_CAP) { write_data(pbpctl_dev, TAP_STATE_PWRON); @@ -2648,7 +2601,7 @@ int tap_state_pwron(struct bpctl_dev *pbpctl_dev) } /*DIS_TAP_CAP 0x2c*/ -int dis_tap_cap(struct bpctl_dev *pbpctl_dev) +static int dis_tap_cap(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & TAP_DIS_CAP) { write_data(pbpctl_dev, DIS_TAP_CAP); @@ -2659,7 +2612,7 @@ int dis_tap_cap(struct bpctl_dev *pbpctl_dev) } /*EN_TAP_CAP 0x2e*/ -int en_tap_cap(struct bpctl_dev *pbpctl_dev) +static int en_tap_cap(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & TAP_DIS_CAP) { write_data(pbpctl_dev, EN_TAP_CAP); @@ -2670,7 +2623,7 @@ int en_tap_cap(struct bpctl_dev *pbpctl_dev) } /*DISC_STATE_PWRON 0x2a*/ -int disc_state_pwron(struct bpctl_dev *pbpctl_dev) +static int disc_state_pwron(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & DISC_PWUP_CTL_CAP) { if (pbpctl_dev->bp_ext_ver >= 0x8) { @@ -2683,7 +2636,7 @@ int disc_state_pwron(struct bpctl_dev *pbpctl_dev) } /*DIS_DISC_CAP 0x2c*/ -int dis_disc_cap(struct bpctl_dev *pbpctl_dev) +static int dis_disc_cap(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & DISC_DIS_CAP) { if (pbpctl_dev->bp_ext_ver >= 0x8) { @@ -2695,60 +2648,8 @@ int dis_disc_cap(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -/*DISC_STATE_PWRON 0x2a*/ -int disc_port_state_pwron(struct bpctl_dev *pbpctl_dev) -{ - int ret = 0; - struct bpctl_dev *pbpctl_dev_m; - - return BP_NOT_CAP; - - if ((is_bypass_fn(pbpctl_dev)) == 1) - pbpctl_dev_m = pbpctl_dev; - else - pbpctl_dev_m = get_master_port_fn(pbpctl_dev); - if (pbpctl_dev_m == NULL) - return BP_NOT_CAP; - - if (pbpctl_dev_m->bp_caps_ex & DISC_PORT_CAP_EX) { - if (is_bypass_fn(pbpctl_dev) == 1) - write_data(pbpctl_dev_m, TX_DISA_PWRUP); - else - write_data(pbpctl_dev_m, TX_DISB_PWRUP); - - msec_delay_bp(LATCH_DELAY); - - } - return ret; -} - -int normal_port_state_pwron(struct bpctl_dev *pbpctl_dev) -{ - int ret = 0; - struct bpctl_dev *pbpctl_dev_m; - return BP_NOT_CAP; - - if ((is_bypass_fn(pbpctl_dev)) == 1) - pbpctl_dev_m = pbpctl_dev; - else - pbpctl_dev_m = get_master_port_fn(pbpctl_dev); - if (pbpctl_dev_m == NULL) - return BP_NOT_CAP; - - if (pbpctl_dev_m->bp_caps_ex & DISC_PORT_CAP_EX) { - if (is_bypass_fn(pbpctl_dev) == 1) - write_data(pbpctl_dev_m, TX_ENA_PWRUP); - else - write_data(pbpctl_dev_m, TX_ENB_PWRUP); - - msec_delay_bp(LATCH_DELAY); - - } - return ret; -} - /*EN_TAP_CAP 0x2e*/ -int en_disc_cap(struct bpctl_dev *pbpctl_dev) +static int en_disc_cap(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & DISC_DIS_CAP) { if (pbpctl_dev->bp_ext_ver >= 0x8) { @@ -2760,7 +2661,7 @@ int en_disc_cap(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int std_nic_on(struct bpctl_dev *pbpctl_dev) +static int std_nic_on(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & STD_NIC_CAP) { @@ -2814,7 +2715,7 @@ int std_nic_on(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int std_nic_off(struct bpctl_dev *pbpctl_dev) +static int std_nic_off(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & STD_NIC_CAP) { @@ -2977,7 +2878,7 @@ static void wd_reset_timer(unsigned long param) } /*WAIT_AT_PWRUP 0x80 */ -int bp_wait_at_pwup_en(struct bpctl_dev *pbpctl_dev) +static int bp_wait_at_pwup_en(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & SW_CTL_CAP) { @@ -2992,7 +2893,7 @@ int bp_wait_at_pwup_en(struct bpctl_dev *pbpctl_dev) } /*DIS_WAIT_AT_PWRUP 0x81 */ -int bp_wait_at_pwup_dis(struct bpctl_dev *pbpctl_dev) +static int bp_wait_at_pwup_dis(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & SW_CTL_CAP) { @@ -3009,7 +2910,7 @@ int bp_wait_at_pwup_dis(struct bpctl_dev *pbpctl_dev) /*EN_HW_RESET 0x82 */ -int bp_hw_reset_en(struct bpctl_dev *pbpctl_dev) +static int bp_hw_reset_en(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & SW_CTL_CAP) { @@ -3025,7 +2926,7 @@ int bp_hw_reset_en(struct bpctl_dev *pbpctl_dev) /*DIS_HW_RESET 0x83 */ -int bp_hw_reset_dis(struct bpctl_dev *pbpctl_dev) +static int bp_hw_reset_dis(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & SW_CTL_CAP) { @@ -3040,7 +2941,7 @@ int bp_hw_reset_dis(struct bpctl_dev *pbpctl_dev) } -int wdt_exp_mode(struct bpctl_dev *pbpctl_dev, int mode) +static int wdt_exp_mode(struct bpctl_dev *pbpctl_dev, int mode) { uint32_t status_reg = 0, status_reg1 = 0; @@ -3091,7 +2992,7 @@ int wdt_exp_mode(struct bpctl_dev *pbpctl_dev, int mode) return BP_NOT_CAP; } -int bypass_fw_ver(struct bpctl_dev *pbpctl_dev) +static int bypass_fw_ver(struct bpctl_dev *pbpctl_dev) { if (is_bypass_fn(pbpctl_dev)) return read_reg(pbpctl_dev, VER_REG_ADDR); @@ -3099,7 +3000,7 @@ int bypass_fw_ver(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int bypass_sign_check(struct bpctl_dev *pbpctl_dev) +static int bypass_sign_check(struct bpctl_dev *pbpctl_dev) { if (is_bypass_fn(pbpctl_dev)) @@ -3210,7 +3111,7 @@ static int bp_force_link_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int bypass_from_last_read(struct bpctl_dev *pbpctl_dev) +static int bypass_from_last_read(struct bpctl_dev *pbpctl_dev) { uint32_t ctrl_ext = 0; struct bpctl_dev *pbpctl_dev_b = NULL; @@ -3230,7 +3131,7 @@ int bypass_from_last_read(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int bypass_status_clear(struct bpctl_dev *pbpctl_dev) +static int bypass_status_clear(struct bpctl_dev *pbpctl_dev) { struct bpctl_dev *pbpctl_dev_b = NULL; @@ -3244,7 +3145,7 @@ int bypass_status_clear(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int bypass_flag_status(struct bpctl_dev *pbpctl_dev) +static int bypass_flag_status(struct bpctl_dev *pbpctl_dev) { if ((pbpctl_dev->bp_caps & BP_CAP)) { @@ -3257,7 +3158,7 @@ int bypass_flag_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int bypass_flag_status_clear(struct bpctl_dev *pbpctl_dev) +static int bypass_flag_status_clear(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & BP_CAP) { @@ -3272,7 +3173,7 @@ int bypass_flag_status_clear(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int bypass_change_status(struct bpctl_dev *pbpctl_dev) +static int bypass_change_status(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; @@ -3291,18 +3192,6 @@ int bypass_change_status(struct bpctl_dev *pbpctl_dev) return ret; } -int bypass_off_status(struct bpctl_dev *pbpctl_dev) -{ - - if (pbpctl_dev->bp_caps & BP_CAP) { - if (pbpctl_dev->bp_ext_ver >= PXG2BPI_VER) { - return ((((read_reg(pbpctl_dev, STATUS_REG_ADDR)) & - BYPASS_OFF_MASK) == BYPASS_OFF_MASK) ? 1 : 0); - } - } - return BP_NOT_CAP; -} - static int bypass_status(struct bpctl_dev *pbpctl_dev) { u32 ctrl_ext = 0; @@ -3386,7 +3275,7 @@ static int bypass_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int default_pwron_status(struct bpctl_dev *pbpctl_dev) +static int default_pwron_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & SW_CTL_CAP) { @@ -3418,7 +3307,7 @@ static int default_pwroff_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int dis_bypass_cap_status(struct bpctl_dev *pbpctl_dev) +static int dis_bypass_cap_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & BP_DIS_CAP) { @@ -3431,31 +3320,7 @@ int dis_bypass_cap_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int cmd_en_status(struct bpctl_dev *pbpctl_dev) -{ - - if (pbpctl_dev->bp_caps & SW_CTL_CAP) { - if (pbpctl_dev->bp_ext_ver >= PXG2BPI_VER) { - return ((((read_reg(pbpctl_dev, STATUS_REG_ADDR)) & - CMND_EN_MASK) == CMND_EN_MASK) ? 1 : 0); - } - } - return BP_NOT_CAP; -} - -int wdt_en_status(struct bpctl_dev *pbpctl_dev) -{ - - if (pbpctl_dev->bp_caps & WD_CTL_CAP) { - if (pbpctl_dev->bp_ext_ver >= PXG2BPI_VER) { - return ((((read_reg(pbpctl_dev, STATUS_REG_ADDR)) & - WDT_EN_MASK) == WDT_EN_MASK) ? 1 : 0); - } - } - return BP_NOT_CAP; -} - -int wdt_programmed(struct bpctl_dev *pbpctl_dev, int *timeout) +static int wdt_programmed(struct bpctl_dev *pbpctl_dev, int *timeout) { int ret = 0; if (pbpctl_dev->bp_caps & WD_CTL_CAP) { @@ -3481,40 +3346,7 @@ int wdt_programmed(struct bpctl_dev *pbpctl_dev, int *timeout) return ret; } -int bypass_support(struct bpctl_dev *pbpctl_dev) -{ - int ret = 0; - - if (pbpctl_dev->bp_caps & SW_CTL_CAP) { - if (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER) { - ret = - ((((read_reg(pbpctl_dev, PRODUCT_CAP_REG_ADDR)) & - BYPASS_SUPPORT_MASK) == - BYPASS_SUPPORT_MASK) ? 1 : 0); - } else if (pbpctl_dev->bp_ext_ver == PXG2BPI_VER) - ret = 1; - } else - ret = BP_NOT_CAP; - return ret; -} - -int tap_support(struct bpctl_dev *pbpctl_dev) -{ - int ret = 0; - - if (pbpctl_dev->bp_caps & SW_CTL_CAP) { - if (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER) { - ret = - ((((read_reg(pbpctl_dev, PRODUCT_CAP_REG_ADDR)) & - TAP_SUPPORT_MASK) == TAP_SUPPORT_MASK) ? 1 : 0); - } else if (pbpctl_dev->bp_ext_ver == PXG2BPI_VER) - ret = 0; - } else - ret = BP_NOT_CAP; - return ret; -} - -int normal_support(struct bpctl_dev *pbpctl_dev) +static int normal_support(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; @@ -3530,7 +3362,7 @@ int normal_support(struct bpctl_dev *pbpctl_dev) return ret; } -int get_bp_prod_caps(struct bpctl_dev *pbpctl_dev) +static int get_bp_prod_caps(struct bpctl_dev *pbpctl_dev) { if ((pbpctl_dev->bp_caps & SW_CTL_CAP) && (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER)) @@ -3539,7 +3371,7 @@ int get_bp_prod_caps(struct bpctl_dev *pbpctl_dev) } -int tap_flag_status(struct bpctl_dev *pbpctl_dev) +static int tap_flag_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & TAP_STATUS_CAP) { @@ -3551,7 +3383,7 @@ int tap_flag_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int tap_flag_status_clear(struct bpctl_dev *pbpctl_dev) +static int tap_flag_status_clear(struct bpctl_dev *pbpctl_dev) { uint32_t status_reg = 0; if (pbpctl_dev->bp_caps & TAP_STATUS_CAP) { @@ -3565,7 +3397,7 @@ int tap_flag_status_clear(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int tap_change_status(struct bpctl_dev *pbpctl_dev) +static int tap_change_status(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; if (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER) { @@ -3582,17 +3414,7 @@ int tap_change_status(struct bpctl_dev *pbpctl_dev) return ret; } -int tap_off_status(struct bpctl_dev *pbpctl_dev) -{ - if (pbpctl_dev->bp_caps & TAP_CAP) { - if (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER) - return ((((read_reg(pbpctl_dev, STATUS_TAP_REG_ADDR)) & - TAP_OFF_MASK) == TAP_OFF_MASK) ? 1 : 0); - } - return BP_NOT_CAP; -} - -int tap_status(struct bpctl_dev *pbpctl_dev) +static int tap_status(struct bpctl_dev *pbpctl_dev) { u32 ctrl_ext = 0; @@ -3631,7 +3453,7 @@ int tap_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int default_pwron_tap_status(struct bpctl_dev *pbpctl_dev) +static int default_pwron_tap_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & TAP_PWUP_CTL_CAP) { if (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER) @@ -3642,7 +3464,7 @@ int default_pwron_tap_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int dis_tap_cap_status(struct bpctl_dev *pbpctl_dev) +static int dis_tap_cap_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & TAP_PWUP_CTL_CAP) { if (pbpctl_dev->bp_ext_ver >= PXG2TBPI_VER) @@ -3653,7 +3475,7 @@ int dis_tap_cap_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int disc_flag_status(struct bpctl_dev *pbpctl_dev) +static int disc_flag_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & DISC_CAP) { @@ -3665,7 +3487,7 @@ int disc_flag_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int disc_flag_status_clear(struct bpctl_dev *pbpctl_dev) +static int disc_flag_status_clear(struct bpctl_dev *pbpctl_dev) { uint32_t status_reg = 0; if (pbpctl_dev->bp_caps & DISC_CAP) { @@ -3679,7 +3501,7 @@ int disc_flag_status_clear(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int disc_change_status(struct bpctl_dev *pbpctl_dev) +static int disc_change_status(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; if (pbpctl_dev->bp_caps & DISC_CAP) { @@ -3690,7 +3512,7 @@ int disc_change_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int disc_off_status(struct bpctl_dev *pbpctl_dev) +static int disc_off_status(struct bpctl_dev *pbpctl_dev) { struct bpctl_dev *pbpctl_dev_b = NULL; u32 ctrl_ext = 0; @@ -3786,7 +3608,7 @@ static int disc_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int default_pwron_disc_status(struct bpctl_dev *pbpctl_dev) +static int default_pwron_disc_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & DISC_PWUP_CTL_CAP) { if (pbpctl_dev->bp_ext_ver >= 0x8) @@ -3797,7 +3619,7 @@ int default_pwron_disc_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int dis_disc_cap_status(struct bpctl_dev *pbpctl_dev) +static int dis_disc_cap_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & DIS_DISC_CAP) { if (pbpctl_dev->bp_ext_ver >= 0x8) @@ -3808,55 +3630,7 @@ int dis_disc_cap_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int disc_port_status(struct bpctl_dev *pbpctl_dev) -{ - int ret = BP_NOT_CAP; - struct bpctl_dev *pbpctl_dev_m; - - if ((is_bypass_fn(pbpctl_dev)) == 1) - pbpctl_dev_m = pbpctl_dev; - else - pbpctl_dev_m = get_master_port_fn(pbpctl_dev); - if (pbpctl_dev_m == NULL) - return BP_NOT_CAP; - - if (pbpctl_dev_m->bp_caps_ex & DISC_PORT_CAP_EX) { - if (is_bypass_fn(pbpctl_dev) == 1) { - return ((((read_reg(pbpctl_dev, STATUS_TAP_REG_ADDR)) & - TX_DISA_MASK) == TX_DISA_MASK) ? 1 : 0); - } else - return ((((read_reg(pbpctl_dev, STATUS_TAP_REG_ADDR)) & - TX_DISB_MASK) == TX_DISB_MASK) ? 1 : 0); - - } - return ret; -} - -int default_pwron_disc_port_status(struct bpctl_dev *pbpctl_dev) -{ - int ret = BP_NOT_CAP; - struct bpctl_dev *pbpctl_dev_m; - - if ((is_bypass_fn(pbpctl_dev)) == 1) - pbpctl_dev_m = pbpctl_dev; - else - pbpctl_dev_m = get_master_port_fn(pbpctl_dev); - if (pbpctl_dev_m == NULL) - return BP_NOT_CAP; - - if (pbpctl_dev_m->bp_caps_ex & DISC_PORT_CAP_EX) { - if (is_bypass_fn(pbpctl_dev) == 1) - return ret; - /* return((((read_reg(pbpctl_dev,STATUS_TAP_REG_ADDR)) & TX_DISA_MASK)==TX_DISA_MASK)?1:0); */ - else - return ret; - /* return((((read_reg(pbpctl_dev,STATUS_TAP_REG_ADDR)) & TX_DISA_MASK)==TX_DISA_MASK)?1:0); */ - - } - return ret; -} - -int wdt_exp_mode_status(struct bpctl_dev *pbpctl_dev) +static int wdt_exp_mode_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & WD_CTL_CAP) { if (pbpctl_dev->bp_ext_ver <= PXG2BPI_VER) @@ -3879,7 +3653,7 @@ int wdt_exp_mode_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int tpl2_flag_status(struct bpctl_dev *pbpctl_dev) +static int tpl2_flag_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps_ex & TPL2_CAP_EX) { @@ -3890,22 +3664,7 @@ int tpl2_flag_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int tpl_hw_status(struct bpctl_dev *pbpctl_dev) -{ - struct bpctl_dev *pbpctl_dev_b = NULL; - - pbpctl_dev_b = get_status_port_fn(pbpctl_dev); - if (!pbpctl_dev_b) - return BP_NOT_CAP; - - if (TPL_IF_SERIES(pbpctl_dev->subdevice)) - return (((BPCTL_READ_REG(pbpctl_dev, CTRL)) & - BPCTLI_CTRL_SWDPIN0) != 0 ? 1 : 0); - return BP_NOT_CAP; -} - - -int bp_wait_at_pwup_status(struct bpctl_dev *pbpctl_dev) +static int bp_wait_at_pwup_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & SW_CTL_CAP) { if (pbpctl_dev->bp_ext_ver >= 0x8) @@ -3916,7 +3675,7 @@ int bp_wait_at_pwup_status(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int bp_hw_reset_status(struct bpctl_dev *pbpctl_dev) +static int bp_hw_reset_status(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & SW_CTL_CAP) { @@ -3930,7 +3689,7 @@ int bp_hw_reset_status(struct bpctl_dev *pbpctl_dev) } -int std_nic_status(struct bpctl_dev *pbpctl_dev) +static int std_nic_status(struct bpctl_dev *pbpctl_dev) { int status_val = 0; @@ -3978,7 +3737,7 @@ int std_nic_status(struct bpctl_dev *pbpctl_dev) /******************************************************/ /**************SW_INIT*********************************/ /******************************************************/ -void bypass_caps_init(struct bpctl_dev *pbpctl_dev) +static void bypass_caps_init(struct bpctl_dev *pbpctl_dev) { u_int32_t ctrl_ext = 0; struct bpctl_dev *pbpctl_dev_m = NULL; @@ -4196,23 +3955,7 @@ void bypass_caps_init(struct bpctl_dev *pbpctl_dev) } } -int bypass_off_init(struct bpctl_dev *pbpctl_dev) -{ - int ret = cmnd_on(pbpctl_dev); - if (ret < 0) - return ret; - if (INTEL_IF_SERIES(pbpctl_dev->subdevice)) - return dis_bypass_cap(pbpctl_dev); - wdt_off(pbpctl_dev); - if (pbpctl_dev->bp_caps & BP_CAP) - bypass_off(pbpctl_dev); - if (pbpctl_dev->bp_caps & TAP_CAP) - tap_off(pbpctl_dev); - cmnd_off(pbpctl_dev); - return 0; -} - -void remove_bypass_wd_auto(struct bpctl_dev *pbpctl_dev) +static void remove_bypass_wd_auto(struct bpctl_dev *pbpctl_dev) { #ifdef BP_SELF_TEST struct bpctl_dev *pbpctl_dev_sl = NULL; @@ -4241,7 +3984,7 @@ void remove_bypass_wd_auto(struct bpctl_dev *pbpctl_dev) } -int init_bypass_wd_auto(struct bpctl_dev *pbpctl_dev) +static int init_bypass_wd_auto(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & WD_CTL_CAP) { init_timer(&pbpctl_dev->bp_timer); @@ -4288,7 +4031,7 @@ int bp_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) } #endif -int set_bypass_wd_auto(struct bpctl_dev *pbpctl_dev, unsigned int param) +static int set_bypass_wd_auto(struct bpctl_dev *pbpctl_dev, unsigned int param) { if (pbpctl_dev->bp_caps & WD_CTL_CAP) { if (pbpctl_dev->reset_time != param) { @@ -4307,7 +4050,7 @@ int set_bypass_wd_auto(struct bpctl_dev *pbpctl_dev, unsigned int param) return BP_NOT_CAP; } -int get_bypass_wd_auto(struct bpctl_dev *pbpctl_dev) +static int get_bypass_wd_auto(struct bpctl_dev *pbpctl_dev) { if (pbpctl_dev->bp_caps & WD_CTL_CAP) return pbpctl_dev->reset_time; @@ -4378,7 +4121,7 @@ int is_bypass_fn(struct bpctl_dev *pbpctl_dev) return (((pbpctl_dev->func == 0) || (pbpctl_dev->func == 2)) ? 1 : 0); } -int set_bypass_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) +static int set_bypass_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) { int ret = 0; @@ -4396,12 +4139,12 @@ int set_bypass_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) return ret; } -int get_bypass_fn(struct bpctl_dev *pbpctl_dev) +static int get_bypass_fn(struct bpctl_dev *pbpctl_dev) { return bypass_status(pbpctl_dev); } -int get_bypass_change_fn(struct bpctl_dev *pbpctl_dev) +static int get_bypass_change_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4409,7 +4152,7 @@ int get_bypass_change_fn(struct bpctl_dev *pbpctl_dev) return bypass_change_status(pbpctl_dev); } -int set_dis_bypass_fn(struct bpctl_dev *pbpctl_dev, int dis_param) +static int set_dis_bypass_fn(struct bpctl_dev *pbpctl_dev, int dis_param) { int ret = 0; if (!pbpctl_dev) @@ -4428,7 +4171,7 @@ int set_dis_bypass_fn(struct bpctl_dev *pbpctl_dev, int dis_param) return ret; } -int get_dis_bypass_fn(struct bpctl_dev *pbpctl_dev) +static int get_dis_bypass_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4436,7 +4179,7 @@ int get_dis_bypass_fn(struct bpctl_dev *pbpctl_dev) return dis_bypass_cap_status(pbpctl_dev); } -int set_bypass_pwoff_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) +static int set_bypass_pwoff_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) { int ret = 0; if (!pbpctl_dev) @@ -4455,7 +4198,7 @@ int set_bypass_pwoff_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) return ret; } -int get_bypass_pwoff_fn(struct bpctl_dev *pbpctl_dev) +static int get_bypass_pwoff_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4463,7 +4206,7 @@ int get_bypass_pwoff_fn(struct bpctl_dev *pbpctl_dev) return default_pwroff_status(pbpctl_dev); } -int set_bypass_pwup_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) +static int set_bypass_pwup_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) { int ret = 0; if (!pbpctl_dev) @@ -4482,7 +4225,7 @@ int set_bypass_pwup_fn(struct bpctl_dev *pbpctl_dev, int bypass_mode) return ret; } -int get_bypass_pwup_fn(struct bpctl_dev *pbpctl_dev) +static int get_bypass_pwup_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4490,7 +4233,7 @@ int get_bypass_pwup_fn(struct bpctl_dev *pbpctl_dev) return default_pwron_status(pbpctl_dev); } -int set_bypass_wd_fn(struct bpctl_dev *pbpctl_dev, int timeout) +static int set_bypass_wd_fn(struct bpctl_dev *pbpctl_dev, int timeout) { int ret = 0; if (!pbpctl_dev) @@ -4512,7 +4255,7 @@ int set_bypass_wd_fn(struct bpctl_dev *pbpctl_dev, int timeout) return ret; } -int get_bypass_wd_fn(struct bpctl_dev *pbpctl_dev, int *timeout) +static int get_bypass_wd_fn(struct bpctl_dev *pbpctl_dev, int *timeout) { if (!pbpctl_dev) return -1; @@ -4520,7 +4263,7 @@ int get_bypass_wd_fn(struct bpctl_dev *pbpctl_dev, int *timeout) return wdt_programmed(pbpctl_dev, timeout); } -int get_wd_expire_time_fn(struct bpctl_dev *pbpctl_dev, int *time_left) +static int get_wd_expire_time_fn(struct bpctl_dev *pbpctl_dev, int *time_left) { if (!pbpctl_dev) return -1; @@ -4528,7 +4271,7 @@ int get_wd_expire_time_fn(struct bpctl_dev *pbpctl_dev, int *time_left) return wdt_timer(pbpctl_dev, time_left); } -int reset_bypass_wd_timer_fn(struct bpctl_dev *pbpctl_dev) +static int reset_bypass_wd_timer_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4536,7 +4279,7 @@ int reset_bypass_wd_timer_fn(struct bpctl_dev *pbpctl_dev) return wdt_timer_reload(pbpctl_dev); } -int get_wd_set_caps_fn(struct bpctl_dev *pbpctl_dev) +static int get_wd_set_caps_fn(struct bpctl_dev *pbpctl_dev) { int bp_status = 0; @@ -4560,7 +4303,7 @@ int get_wd_set_caps_fn(struct bpctl_dev *pbpctl_dev) return bp_status; } -int set_std_nic_fn(struct bpctl_dev *pbpctl_dev, int nic_mode) +static int set_std_nic_fn(struct bpctl_dev *pbpctl_dev, int nic_mode) { int ret = 0; if (!pbpctl_dev) @@ -4580,7 +4323,7 @@ int set_std_nic_fn(struct bpctl_dev *pbpctl_dev, int nic_mode) return ret; } -int get_std_nic_fn(struct bpctl_dev *pbpctl_dev) +static int get_std_nic_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4588,7 +4331,7 @@ int get_std_nic_fn(struct bpctl_dev *pbpctl_dev) return std_nic_status(pbpctl_dev); } -int set_tap_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) +static int set_tap_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) { if (!pbpctl_dev) return -1; @@ -4604,7 +4347,7 @@ int set_tap_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) return BP_NOT_CAP; } -int get_tap_fn(struct bpctl_dev *pbpctl_dev) +static int get_tap_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4612,7 +4355,7 @@ int get_tap_fn(struct bpctl_dev *pbpctl_dev) return tap_status(pbpctl_dev); } -int set_tap_pwup_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) +static int set_tap_pwup_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) { int ret = 0; if (!pbpctl_dev) @@ -4630,7 +4373,7 @@ int set_tap_pwup_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) return ret; } -int get_tap_pwup_fn(struct bpctl_dev *pbpctl_dev) +static int get_tap_pwup_fn(struct bpctl_dev *pbpctl_dev) { int ret = 0; if (!pbpctl_dev) @@ -4642,7 +4385,7 @@ int get_tap_pwup_fn(struct bpctl_dev *pbpctl_dev) return ((ret == 0) ? 1 : 0); } -int get_tap_change_fn(struct bpctl_dev *pbpctl_dev) +static int get_tap_change_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4650,7 +4393,7 @@ int get_tap_change_fn(struct bpctl_dev *pbpctl_dev) return tap_change_status(pbpctl_dev); } -int set_dis_tap_fn(struct bpctl_dev *pbpctl_dev, int dis_param) +static int set_dis_tap_fn(struct bpctl_dev *pbpctl_dev, int dis_param) { int ret = 0; if (!pbpctl_dev) @@ -4667,7 +4410,7 @@ int set_dis_tap_fn(struct bpctl_dev *pbpctl_dev, int dis_param) return BP_NOT_CAP; } -int get_dis_tap_fn(struct bpctl_dev *pbpctl_dev) +static int get_dis_tap_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4675,7 +4418,7 @@ int get_dis_tap_fn(struct bpctl_dev *pbpctl_dev) return dis_tap_cap_status(pbpctl_dev); } -int set_disc_fn(struct bpctl_dev *pbpctl_dev, int disc_mode) +static int set_disc_fn(struct bpctl_dev *pbpctl_dev, int disc_mode) { if (!pbpctl_dev) return -1; @@ -4692,7 +4435,7 @@ int set_disc_fn(struct bpctl_dev *pbpctl_dev, int disc_mode) return BP_NOT_CAP; } -int get_disc_fn(struct bpctl_dev *pbpctl_dev) +static int get_disc_fn(struct bpctl_dev *pbpctl_dev) { int ret = 0; if (!pbpctl_dev) @@ -4703,7 +4446,7 @@ int get_disc_fn(struct bpctl_dev *pbpctl_dev) return ret; } -int set_disc_pwup_fn(struct bpctl_dev *pbpctl_dev, int disc_mode) +static int set_disc_pwup_fn(struct bpctl_dev *pbpctl_dev, int disc_mode) { int ret = 0; if (!pbpctl_dev) @@ -4721,7 +4464,7 @@ int set_disc_pwup_fn(struct bpctl_dev *pbpctl_dev, int disc_mode) return ret; } -int get_disc_pwup_fn(struct bpctl_dev *pbpctl_dev) +static int get_disc_pwup_fn(struct bpctl_dev *pbpctl_dev) { int ret = 0; if (!pbpctl_dev) @@ -4731,7 +4474,7 @@ int get_disc_pwup_fn(struct bpctl_dev *pbpctl_dev) return (ret == 0 ? 1 : (ret < 0 ? BP_NOT_CAP : 0)); } -int get_disc_change_fn(struct bpctl_dev *pbpctl_dev) +static int get_disc_change_fn(struct bpctl_dev *pbpctl_dev) { int ret = 0; if (!pbpctl_dev) @@ -4741,7 +4484,7 @@ int get_disc_change_fn(struct bpctl_dev *pbpctl_dev) return ret; } -int set_dis_disc_fn(struct bpctl_dev *pbpctl_dev, int dis_param) +static int set_dis_disc_fn(struct bpctl_dev *pbpctl_dev, int dis_param) { int ret = 0; if (!pbpctl_dev) @@ -4759,7 +4502,7 @@ int set_dis_disc_fn(struct bpctl_dev *pbpctl_dev, int dis_param) return BP_NOT_CAP; } -int get_dis_disc_fn(struct bpctl_dev *pbpctl_dev) +static int get_dis_disc_fn(struct bpctl_dev *pbpctl_dev) { int ret = 0; if (!pbpctl_dev) @@ -4770,55 +4513,7 @@ int get_dis_disc_fn(struct bpctl_dev *pbpctl_dev) return ret; } -int set_disc_port_fn(struct bpctl_dev *pbpctl_dev, int disc_mode) -{ - int ret = BP_NOT_CAP; - if (!pbpctl_dev) - return -1; - - if (!disc_mode) - ret = disc_port_off(pbpctl_dev); - else - ret = disc_port_on(pbpctl_dev); - - return ret; -} - -int get_disc_port_fn(struct bpctl_dev *pbpctl_dev) -{ - if (!pbpctl_dev) - return -1; - - return disc_port_status(pbpctl_dev); -} - -int set_disc_port_pwup_fn(struct bpctl_dev *pbpctl_dev, int disc_mode) -{ - int ret = BP_NOT_CAP; - if (!pbpctl_dev) - return -1; - - if (!disc_mode) - ret = normal_port_state_pwron(pbpctl_dev); - else - ret = disc_port_state_pwron(pbpctl_dev); - - return ret; -} - -int get_disc_port_pwup_fn(struct bpctl_dev *pbpctl_dev) -{ - int ret = 0; - if (!pbpctl_dev) - return -1; - - ret = default_pwron_disc_port_status(pbpctl_dev); - if (ret < 0) - return ret; - return ((ret == 0) ? 1 : 0); -} - -int get_wd_exp_mode_fn(struct bpctl_dev *pbpctl_dev) +static int get_wd_exp_mode_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4826,7 +4521,7 @@ int get_wd_exp_mode_fn(struct bpctl_dev *pbpctl_dev) return wdt_exp_mode_status(pbpctl_dev); } -int set_wd_exp_mode_fn(struct bpctl_dev *pbpctl_dev, int param) +static int set_wd_exp_mode_fn(struct bpctl_dev *pbpctl_dev, int param) { if (!pbpctl_dev) return -1; @@ -4834,19 +4529,7 @@ int set_wd_exp_mode_fn(struct bpctl_dev *pbpctl_dev, int param) return wdt_exp_mode(pbpctl_dev, param); } -int reset_cont_fn(struct bpctl_dev *pbpctl_dev) -{ - int ret = 0; - if (!pbpctl_dev) - return -1; - - ret = cmnd_on(pbpctl_dev); - if (ret < 0) - return ret; - return reset_cont(pbpctl_dev); -} - -int set_tx_fn(struct bpctl_dev *pbpctl_dev, int tx_state) +static int set_tx_fn(struct bpctl_dev *pbpctl_dev, int tx_state) { struct bpctl_dev *pbpctl_dev_b = NULL; @@ -4867,7 +4550,7 @@ int set_tx_fn(struct bpctl_dev *pbpctl_dev, int tx_state) return set_tx(pbpctl_dev, tx_state); } -int set_bp_force_link_fn(int dev_num, int tx_state) +static int set_bp_force_link_fn(int dev_num, int tx_state) { static struct bpctl_dev *bpctl_dev_curr; @@ -4879,7 +4562,7 @@ int set_bp_force_link_fn(int dev_num, int tx_state) return set_bp_force_link(bpctl_dev_curr, tx_state); } -int set_wd_autoreset_fn(struct bpctl_dev *pbpctl_dev, int param) +static int set_wd_autoreset_fn(struct bpctl_dev *pbpctl_dev, int param) { if (!pbpctl_dev) return -1; @@ -4887,7 +4570,7 @@ int set_wd_autoreset_fn(struct bpctl_dev *pbpctl_dev, int param) return set_bypass_wd_auto(pbpctl_dev, param); } -int get_wd_autoreset_fn(struct bpctl_dev *pbpctl_dev) +static int get_wd_autoreset_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4914,7 +4597,7 @@ int get_bp_self_test_fn(struct bpctl_dev *pbpctl_dev) #endif -int get_bypass_caps_fn(struct bpctl_dev *pbpctl_dev) +static int get_bypass_caps_fn(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4923,7 +4606,8 @@ int get_bypass_caps_fn(struct bpctl_dev *pbpctl_dev) } -int get_bypass_slave_fn(struct bpctl_dev *pbpctl_dev, struct bpctl_dev **pbpctl_dev_out) +static int get_bypass_slave_fn(struct bpctl_dev *pbpctl_dev, + struct bpctl_dev **pbpctl_dev_out) { int idx_dev = 0; if (!pbpctl_dev) @@ -4955,7 +4639,7 @@ int get_bypass_slave_fn(struct bpctl_dev *pbpctl_dev, struct bpctl_dev **pbpctl_ return 0; } -int is_bypass(struct bpctl_dev *pbpctl_dev) +static int is_bypass(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -4966,7 +4650,7 @@ int is_bypass(struct bpctl_dev *pbpctl_dev) return 0; } -int get_tx_fn(struct bpctl_dev *pbpctl_dev) +static int get_tx_fn(struct bpctl_dev *pbpctl_dev) { struct bpctl_dev *pbpctl_dev_b = NULL; if (!pbpctl_dev) @@ -4986,7 +4670,7 @@ int get_tx_fn(struct bpctl_dev *pbpctl_dev) return tx_status(pbpctl_dev); } -int get_bp_force_link_fn(int dev_num) +static int get_bp_force_link_fn(int dev_num) { static struct bpctl_dev *bpctl_dev_curr; @@ -5049,7 +4733,7 @@ static void bp_tpl_timer_fn(unsigned long param) mod_timer(&pbpctl_dev->bp_tpl_timer, jiffies + BP_LINK_MON_DELAY * HZ); } -void remove_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev) +static void remove_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev) { struct bpctl_dev *pbpctl_dev_b = NULL; if (!pbpctl_dev) @@ -5067,7 +4751,7 @@ void remove_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev) return; } -int init_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev) +static int init_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev) { if (!pbpctl_dev) return -1; @@ -5080,7 +4764,7 @@ int init_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int set_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev, unsigned int param) +static int set_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev, unsigned int param) { if (!pbpctl_dev) return -1; @@ -5098,17 +4782,7 @@ int set_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev, unsigned int param) return BP_NOT_CAP; } -int get_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev) -{ - if (!pbpctl_dev) - return -1; - if (pbpctl_dev->bp_caps & TPL_CAP) - return pbpctl_dev->bp_tpl_flag; - - return BP_NOT_CAP; -} - -int set_tpl_fn(struct bpctl_dev *pbpctl_dev, int tpl_mode) +static int set_tpl_fn(struct bpctl_dev *pbpctl_dev, int tpl_mode) { struct bpctl_dev *pbpctl_dev_b = NULL; @@ -5138,7 +4812,7 @@ int set_tpl_fn(struct bpctl_dev *pbpctl_dev, int tpl_mode) return BP_NOT_CAP; } -int get_tpl_fn(struct bpctl_dev *pbpctl_dev) +static int get_tpl_fn(struct bpctl_dev *pbpctl_dev) { int ret = BP_NOT_CAP; if (!pbpctl_dev) @@ -5152,7 +4826,7 @@ int get_tpl_fn(struct bpctl_dev *pbpctl_dev) return ret; } -int set_bp_wait_at_pwup_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) +static int set_bp_wait_at_pwup_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) { if (!pbpctl_dev) return -1; @@ -5172,7 +4846,7 @@ int set_bp_wait_at_pwup_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) return BP_NOT_CAP; } -int get_bp_wait_at_pwup_fn(struct bpctl_dev *pbpctl_dev) +static int get_bp_wait_at_pwup_fn(struct bpctl_dev *pbpctl_dev) { int ret = 0; if (!pbpctl_dev) @@ -5185,7 +4859,7 @@ int get_bp_wait_at_pwup_fn(struct bpctl_dev *pbpctl_dev) return ret; } -int set_bp_hw_reset_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) +static int set_bp_hw_reset_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) { if (!pbpctl_dev) return -1; @@ -5205,7 +4879,7 @@ int set_bp_hw_reset_fn(struct bpctl_dev *pbpctl_dev, int tap_mode) return BP_NOT_CAP; } -int get_bp_hw_reset_fn(struct bpctl_dev *pbpctl_dev) +static int get_bp_hw_reset_fn(struct bpctl_dev *pbpctl_dev) { int ret = 0; if (!pbpctl_dev) @@ -5220,7 +4894,7 @@ int get_bp_hw_reset_fn(struct bpctl_dev *pbpctl_dev) } -int get_bypass_info_fn(struct bpctl_dev *pbpctl_dev, char *dev_name, +static int get_bypass_info_fn(struct bpctl_dev *pbpctl_dev, char *dev_name, char *add_param) { if (!pbpctl_dev) @@ -7022,12 +6696,6 @@ int set_wd_exp_mode_sd(int ifindex, int param) } EXPORT_SYMBOL(set_wd_exp_mode_sd); -int reset_cont_sd(int ifindex) -{ - return reset_cont_fn(get_dev_idx_p(ifindex)); - -} - int set_tx_sd(int ifindex, int tx_state) { return set_tx_fn(get_dev_idx_p(ifindex), tx_state); |