openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

fcmap_cmn.h (3350B)


      1 /*
      2  * 
      3  *
      4  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5  * 
      6  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      7  */
      8 #ifndef FCMAP_CMN_H
      9 #define FCMAP_CMN_H
     10 
     11 #if defined(INCLUDE_FCMAP)
     12 
     13 #include <bcm/fcmap.h>
     14 
     15 extern int 
     16 _bcm_common_fcmap_init(int unit);
     17 
     18 extern int 
     19 bcm_common_fcmap_port_traverse(int unit, 
     20                              bcm_fcmap_port_traverse_cb callback, 
     21                              void *user_data);
     22 extern int
     23 bcm_common_fcmap_port_config_set(int unit, bcm_port_t port, 
     24                                bcm_fcmap_port_config_t *cfg);
     25 
     26 extern int
     27 bcm_common_fcmap_port_config_get(int unit, bcm_port_t port, 
     28                                bcm_fcmap_port_config_t *cfg);
     29 
     30 extern int
     31 bcm_common_fcmap_port_speed_set(int unit, bcm_port_t port, 
     32                                bcm_fcmap_port_speed_t speed);
     33 
     34 extern int
     35 bcm_common_fcmap_port_enable(int unit, bcm_port_t port);
     36 
     37 
     38 extern int
     39 bcm_common_fcmap_port_shutdown(int unit, bcm_port_t port);
     40 
     41 
     42 extern int
     43 bcm_common_fcmap_port_link_reset(int unit, bcm_port_t port);
     44 
     45 extern int
     46 bcm_common_fcmap_vlan_map_add(int unit, bcm_port_t port, 
     47                                bcm_fcmap_vlan_vsan_map_t *vlan);
     48 
     49 extern int
     50 bcm_common_fcmap_vlan_map_get(int unit, bcm_port_t port, 
     51                                bcm_fcmap_vlan_vsan_map_t *vlan);
     52 
     53 extern int
     54 bcm_common_fcmap_vlan_map_delete(int unit, bcm_port_t port, 
     55                                bcm_fcmap_vlan_vsan_map_t *vlan);
     56 
     57 
     58 extern int 
     59 bcm_common_fcmap_stat_clear(int unit, bcm_port_t port);
     60 
     61 extern int 
     62 bcm_common_fcmap_stat_get(int unit, bcm_port_t port, 
     63                         bcm_fcmap_stat_t stat, 
     64                         uint64 *val);
     65 
     66 extern int 
     67 bcm_common_fcmap_stat_get32(int unit, bcm_port_t port, 
     68                           bcm_fcmap_stat_t stat,
     69                           uint32 *val);
     70 
     71 
     72 extern int 
     73 bcm_common_fcmap_event_register(int unit, bcm_fcmap_event_cb cb, void *user_data);
     74 
     75 extern int 
     76 bcm_common_fcmap_event_unregister(int unit, bcm_fcmap_event_cb cb);
     77 
     78 extern int
     79 bcm_common_fcmap_event_enable_set(int unit,
     80                                 bcm_fcmap_event_t event, int enable);
     81 
     82 extern int
     83 bcm_common_fcmap_event_enable_get(int unit,
     84                                 bcm_fcmap_event_t event, int *enable);
     85 
     86 /*
     87  * Debug/Print config set/get.
     88  */
     89 extern int bcm_common_fcmap_config_print(uint32 level);
     90 
     91 extern int
     92 bcm_common_fcmap_linkfault_trigger_rc_get(int unit, bcm_port_t port, 
     93                                           bcm_fcmap_lf_tr_t *lf_trigger, bcm_fcmap_lf_rc_t *lf_rc);
     94 
     95 extern int
     96 bcm_common_fcmap_diag_get(int unit, bcm_port_t port, 
     97                           bcm_fcmap_diag_code_t *diag);
     98 
     99 /*
    100  * BFCMAP Port Speed Ability Set
    101  * Sets discrete port speeds for AN or single forced port speed
    102  */
    103 
    104 extern int bcm_common_fcmap_port_ability_advert_set(int unit, bcm_port_t port, 
    105                                                     bcm_fcmap_port_ability_t *ability_mask);
    106 
    107 /*
    108  * BFCMAP Port Speed Ability Get
    109  * Retrieves supported port speeds 
    110  */
    111 
    112 extern int bcm_common_fcmap_port_ability_advert_get(int unit, bcm_port_t port, 
    113                                                     bcm_fcmap_port_ability_t *ability_mask);
    114 
    115 #endif /* defined(INCLUDE_FCMAP) */
    116 
    117 #endif /* FCMAP_CMN_H */
    118