net/sfc/base: allow to use PHY stats on Huntington/Medford
[dpdk.git] / drivers / net / sfc / base / efx_impl.h
index f20c97f..255a6af 100644 (file)
@@ -152,11 +152,17 @@ typedef struct efx_rx_ops_s {
        efx_rc_t        (*erxo_scatter_enable)(efx_nic_t *, unsigned int);
 #endif
 #if EFSYS_OPT_RX_SCALE
-       efx_rc_t        (*erxo_scale_mode_set)(efx_nic_t *, efx_rx_hash_alg_t,
+       efx_rc_t        (*erxo_scale_context_alloc)(efx_nic_t *,
+                                                   efx_rx_scale_context_type_t,
+                                                   uint32_t, uint32_t *);
+       efx_rc_t        (*erxo_scale_context_free)(efx_nic_t *, uint32_t);
+       efx_rc_t        (*erxo_scale_mode_set)(efx_nic_t *, uint32_t,
+                                              efx_rx_hash_alg_t,
                                               efx_rx_hash_type_t, boolean_t);
-       efx_rc_t        (*erxo_scale_key_set)(efx_nic_t *, uint8_t *, size_t);
-       efx_rc_t        (*erxo_scale_tbl_set)(efx_nic_t *, unsigned int *,
-                                             size_t);
+       efx_rc_t        (*erxo_scale_key_set)(efx_nic_t *, uint32_t,
+                                             uint8_t *, size_t);
+       efx_rc_t        (*erxo_scale_tbl_set)(efx_nic_t *, uint32_t,
+                                             unsigned int *, size_t);
        uint32_t        (*erxo_prefix_hash)(efx_nic_t *, efx_rx_hash_alg_t,
                                            uint8_t *);
 #endif /* EFSYS_OPT_RX_SCALE */
@@ -167,7 +173,7 @@ typedef struct efx_rx_ops_s {
                                      unsigned int);
        void            (*erxo_qpush)(efx_rxq_t *, unsigned int, unsigned int *);
 #if EFSYS_OPT_RX_PACKED_STREAM
-       void            (*erxo_qps_update_credits)(efx_rxq_t *);
+       void            (*erxo_qpush_ps_credits)(efx_rxq_t *);
        uint8_t *       (*erxo_qps_packet_info)(efx_rxq_t *, uint8_t *,
                                                uint32_t, uint32_t,
                                                uint16_t *, uint32_t *, uint32_t *);
@@ -352,12 +358,7 @@ typedef struct efx_nic_ops_s {
 #ifndef EFX_RXQ_LIMIT_TARGET
 #define        EFX_RXQ_LIMIT_TARGET 512
 #endif
-#ifndef EFX_TXQ_DC_SIZE
-#define        EFX_TXQ_DC_SIZE 1 /* 16 descriptors */
-#endif
-#ifndef EFX_RXQ_DC_SIZE
-#define        EFX_RXQ_DC_SIZE 3 /* 64 descriptors */
-#endif
+
 
 #if EFSYS_OPT_FILTER
 
@@ -455,6 +456,10 @@ typedef struct efx_mcdi_s {
 #endif /* EFSYS_OPT_MCDI */
 
 #if EFSYS_OPT_NVRAM
+
+/* Invalid partition ID for en_nvram_partn_locked field of efx_nc_t */
+#define        EFX_NVRAM_PARTN_INVALID         (0xffffffffu)
+
 typedef struct efx_nvram_ops_s {
 #if EFSYS_OPT_DIAG
        efx_rc_t        (*envo_test)(efx_nic_t *);
@@ -465,11 +470,14 @@ typedef struct efx_nvram_ops_s {
        efx_rc_t        (*envo_partn_rw_start)(efx_nic_t *, uint32_t, size_t *);
        efx_rc_t        (*envo_partn_read)(efx_nic_t *, uint32_t,
                                            unsigned int, caddr_t, size_t);
+       efx_rc_t        (*envo_partn_read_backup)(efx_nic_t *, uint32_t,
+                                           unsigned int, caddr_t, size_t);
        efx_rc_t        (*envo_partn_erase)(efx_nic_t *, uint32_t,
                                            unsigned int, size_t);
        efx_rc_t        (*envo_partn_write)(efx_nic_t *, uint32_t,
                                            unsigned int, caddr_t, size_t);
-       efx_rc_t        (*envo_partn_rw_finish)(efx_nic_t *, uint32_t);
+       efx_rc_t        (*envo_partn_rw_finish)(efx_nic_t *, uint32_t,
+                                           uint32_t *);
        efx_rc_t        (*envo_partn_get_version)(efx_nic_t *, uint32_t,
                                            uint32_t *, uint16_t *);
        efx_rc_t        (*envo_partn_set_version)(efx_nic_t *, uint32_t,
@@ -558,7 +566,7 @@ efx_mcdi_nvram_update_finish(
        __in                    efx_nic_t *enp,
        __in                    uint32_t partn,
        __in                    boolean_t reboot,
-       __out_opt               uint32_t *resultp);
+       __out_opt               uint32_t *verify_resultp);
 
 #if EFSYS_OPT_DIAG
 
@@ -641,7 +649,7 @@ struct efx_nic_s {
        efx_mcdi_t              en_mcdi;
 #endif /* EFSYS_OPT_MCDI */
 #if EFSYS_OPT_NVRAM
-       efx_nvram_type_t        en_nvram_locked;
+       uint32_t                en_nvram_partn_locked;
        const efx_nvram_ops_t   *en_envop;
 #endif /* EFSYS_OPT_NVRAM */
 #if EFSYS_OPT_VPD
@@ -748,6 +756,7 @@ struct efx_rxq_s {
        unsigned int                    er_label;
        unsigned int                    er_mask;
        efsys_mem_t                     *er_esmp;
+       efx_evq_rxq_state_t             *er_ev_qstate;
 };
 
 #define        EFX_RXQ_MAGIC   0x15022005
@@ -1030,8 +1039,7 @@ struct efx_txq_s {
        do {                                                            \
                EFX_CHECK_REG((_enp), (_reg));                          \
                EFSYS_PROBE7(efx_bar_tbl_doorbell_writeo,               \
-                   const char *,                                       \
-                   #_reg,                                              \
+                   const char *, #_reg,                                \
                    uint32_t, (_index),                                 \
                    uint32_t, _reg ## _OFST,                            \
                    uint32_t, (_eop)->eo_u32[3],                        \