X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Ftxgbe%2Fbase%2Ftxgbe_type.h;h=b69e7b85baf75db341f45201150210a1a9f2b35a;hb=db94014c4c6084d4797b514c6d0f517cdd546076;hp=2c8a3866a7ace450e6ce238c94626c6aa177db3e;hpb=fa702fde0c3670bf0a206d9e074046274233c516;p=dpdk.git diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h index 2c8a3866a7..b69e7b85ba 100644 --- a/drivers/net/txgbe/base/txgbe_type.h +++ b/drivers/net/txgbe/base/txgbe_type.h @@ -600,6 +600,9 @@ struct txgbe_mac_info { s32 (*dmac_config)(struct txgbe_hw *hw); s32 (*setup_eee)(struct txgbe_hw *hw, bool enable_eee); + s32 (*kr_handle)(struct txgbe_hw *hw); + void (*bp_down_event)(struct txgbe_hw *hw); + enum txgbe_mac_type type; u8 addr[ETH_ADDR_LEN]; u8 perm_addr[ETH_ADDR_LEN]; @@ -617,9 +620,10 @@ struct txgbe_mac_info { u32 rx_pb_size; u32 max_tx_queues; u32 max_rx_queues; + u64 autoc; + u64 orig_autoc; /* cached value of AUTOC */ u8 san_mac_rar_index; bool get_link_status; - u64 orig_autoc; /* cached value of AUTOC */ bool orig_link_settings_stored; bool autotry_restart; u8 flags; @@ -647,6 +651,7 @@ struct txgbe_phy_info { s32 (*setup_link_speed)(struct txgbe_hw *hw, u32 speed, bool autoneg_wait_to_complete); s32 (*check_link)(struct txgbe_hw *hw, u32 *speed, bool *link_up); + s32 (*get_fw_version)(struct txgbe_hw *hw, u32 *fw_version); s32 (*read_i2c_byte)(struct txgbe_hw *hw, u8 byte_offset, u8 dev_addr, u8 *data); s32 (*write_i2c_byte)(struct txgbe_hw *hw, u8 byte_offset, @@ -682,6 +687,33 @@ struct txgbe_phy_info { bool qsfp_shared_i2c_bus; u32 nw_mng_if_sel; u32 link_mode; + + /* Some features need tri-state capability */ + u16 ffe_set; + u16 ffe_main; + u16 ffe_pre; + u16 ffe_post; +}; + +#define TXGBE_DEVARG_BP_AUTO "auto_neg" +#define TXGBE_DEVARG_KR_POLL "poll" +#define TXGBE_DEVARG_KR_PRESENT "present" +#define TXGBE_DEVARG_KX_SGMII "sgmii" +#define TXGBE_DEVARG_FFE_SET "ffe_set" +#define TXGBE_DEVARG_FFE_MAIN "ffe_main" +#define TXGBE_DEVARG_FFE_PRE "ffe_pre" +#define TXGBE_DEVARG_FFE_POST "ffe_post" + +static const char * const txgbe_valid_arguments[] = { + TXGBE_DEVARG_BP_AUTO, + TXGBE_DEVARG_KR_POLL, + TXGBE_DEVARG_KR_PRESENT, + TXGBE_DEVARG_KX_SGMII, + TXGBE_DEVARG_FFE_SET, + TXGBE_DEVARG_FFE_MAIN, + TXGBE_DEVARG_FFE_PRE, + TXGBE_DEVARG_FFE_POST, + NULL }; struct txgbe_mbx_stats { @@ -720,6 +752,13 @@ enum txgbe_isb_idx { TXGBE_ISB_MAX }; +struct txgbe_devargs { + u16 auto_neg; + u16 poll; + u16 present; + u16 sgmii; +}; + struct txgbe_hw { void IOMEM *hw_addr; void *back; @@ -741,12 +780,14 @@ struct txgbe_hw { int api_version; bool allow_unsupported_sfp; bool need_crosstalk_fix; + struct txgbe_devargs devarg; uint64_t isb_dma; void IOMEM *isb_mem; u16 nb_rx_queues; u16 nb_tx_queues; + u32 fw_version; u32 mode; enum txgbe_link_status { TXGBE_LINK_STATUS_NONE = 0, @@ -772,6 +813,13 @@ struct txgbe_hw { } qp_last[TXGBE_MAX_QP]; }; +struct txgbe_backplane_ability { + u32 next_page; /* Next Page (bit0) */ + u32 link_ability; /* Link Ability (bit[7:0]) */ + u32 fec_ability; /* FEC Request (bit1), FEC Enable (bit0) */ + u32 current_link_mode; /* current link mode for local device */ +}; + #include "txgbe_regs.h" #include "txgbe_dummy.h"