Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
libbp_sd.h
Go to the documentation of this file.
1 /******************************************************************************/
2 /* */
3 /* bypass library, Copyright (c) 2004 Silicom, Ltd */
4 /* Corporation. */
5 /* */
6 /* This program is free software; you can redistribute it and/or modify */
7 /* it under the terms of the GNU General Public License as published by */
8 /* the Free Software Foundation, located in the file LICENSE. */
9 /* */
10 /* Ver 1.0.0 */
11 /* */
12 /* libbypass.h */
13 /* */
14 /******************************************************************************/
15 
16 #define BP_CAP 0x01 /* BIT_0 */
17 #define BP_STATUS_CAP 0x02
18 #define BP_STATUS_CHANGE_CAP 0x04
19 #define SW_CTL_CAP 0x08
20 #define BP_DIS_CAP 0x10
21 #define BP_DIS_STATUS_CAP 0x20
22 #define STD_NIC_CAP 0x40
23 #define BP_PWOFF_ON_CAP 0x80
24 #define BP_PWOFF_OFF_CAP 0x0100
25 #define BP_PWOFF_CTL_CAP 0x0200
26 #define BP_PWUP_ON_CAP 0x0400
27 #define BP_PWUP_OFF_CAP 0x0800
28 #define BP_PWUP_CTL_CAP 0x1000
29 #define WD_CTL_CAP 0x2000
30 #define WD_STATUS_CAP 0x4000
31 #define WD_TIMEOUT_CAP 0x8000
32 #define TX_CTL_CAP 0x10000
33 #define TX_STATUS_CAP 0x20000
34 #define TAP_CAP 0x40000
35 #define TAP_STATUS_CAP 0x80000
36 #define TAP_STATUS_CHANGE_CAP 0x100000
37 #define TAP_DIS_CAP 0x200000
38 #define TAP_DIS_STATUS_CAP 0x400000
39 #define TAP_PWUP_ON_CAP 0x800000
40 #define TAP_PWUP_OFF_CAP 0x1000000
41 #define TAP_PWUP_CTL_CAP 0x2000000
42 #define NIC_CAP_NEG 0x4000000 /* BIT 26 */
43 
44 #define WD_MIN_TIME_GET(desc) (desc & 0xf)
45 #define WDT_STEP_TIME 0x10
46 
47 struct bp_info {
48  char prod_name[14];
49  unsigned char fw_ver;
50 };
51 
61 int is_bypass_sd(int if_index);
62 
71 int get_bypass_slave_sd(int if_index);
72 
129 int get_bypass_caps_sd(int if_index);
130 
155 int get_wd_set_caps_sd(int if_index);
156 
165 int set_bypass_sd(int if_index, int bypass_mode);
166 
174 int get_bypass_sd(int if_index);
175 
183 int get_bypass_change_sd(int if_index);
184 
194 int set_dis_bypass_sd(int if_index, int dis_bypass);
195 
204 int get_dis_bypass_sd(int if_index);
205 
215 int set_bypass_pwoff_sd(int if_index, int bypass_mode);
216 
225 int get_bypass_pwoff_sd(int if_index);
226 
236 int set_bypass_pwup_sd(int if_index, int bypass_mode);
237 
246 int get_bypass_pwup_sd(int if_index);
247 
259 int set_bypass_wd_sd(int if_index, int ms_timeout, int *ms_timeout_set);
260 
272 int get_bypass_wd_sd(int if_index, int *ms_timeout_set);
273 
285 int get_wd_expire_time_sd(int if_index, int *ms_time_left);
286 
297 int reset_bypass_wd_timer_sd(int if_index);
298 
309 int set_std_nic_sd(int if_index, int nic_mode);
310 
320 int get_std_nic_sd(int if_index);
321 
331 int set_tx_sd(int if_index, int tx_state);
332 
341 int get_tx_sd(int if_index);
342 
352 int set_tpl_sd(int if_index, int tpl_state);
353 
362 int get_tpl_sd(int if_index);
363 
364 int get_bp_hw_reset_sd(int if_index);
365 
366 int set_bp_hw_reset_sd(int if_index, int status);
367 
376 int set_tap_sd(int if_index, int tap_mode);
377 
385 int get_tap_sd(int if_index);
386 
394 int get_tap_change_sd(int if_index);
395 
405 int set_dis_tap_sd(int if_index, int dis_tap);
406 
415 int get_dis_tap_sd(int if_index);
416 
426 int set_tap_pwup_sd(int if_index, int tap_mode);
427 
436 int get_tap_pwup_sd(int if_index);
437 
446 int set_wd_exp_mode_sd(int if_index, int bypass_mode);
447 
455 int get_wd_exp_mode_sd(int if_index);
456 
466 int set_wd_autoreset_sd(int if_index, int time);
467 
477 int get_wd_autoreset_sd(int if_index);
486 int set_bp_disc_sd(int if_index, int disc_mode);
487 
495 int get_bp_disc_sd(int if_index);
496 
504 int get_bp_disc_change_sd(int if_index);
505 
515 int set_bp_dis_disc_sd(int if_index, int dis_disc);
516 
525 int get_bp_dis_disc_sd(int if_index);
526 
536 int set_bp_disc_pwup_sd(int if_index, int disc_mode);
537 
546 int get_bp_disc_pwup_sd(int if_index);
547 
548 int get_bypass_info_sd(int if_index, struct bp_info *bp_info);
549 int bp_if_scan_sd(void);
550 /*int get_dev_num_sd(void);*/