net/sfc/base: simplify the code to parse RSS hash type
[dpdk.git] / drivers / net / sfc / base / efx.h
index 3c32277..62c56e6 100644 (file)
@@ -155,6 +155,14 @@ extern     __checkReturn   efx_rc_t
 efx_nic_reset(
        __in            efx_nic_t *enp);
 
+extern __checkReturn   boolean_t
+efx_nic_hw_unavailable(
+       __in            efx_nic_t *enp);
+
+extern                 void
+efx_nic_set_hw_unavailable(
+       __in            efx_nic_t *enp);
+
 #if EFSYS_OPT_DIAG
 
 extern __checkReturn   efx_rc_t
@@ -1292,6 +1300,7 @@ typedef struct efx_nic_cfg_s {
        boolean_t               enc_bug35388_workaround;
        boolean_t               enc_bug41750_workaround;
        boolean_t               enc_bug61265_workaround;
+       boolean_t               enc_bug61297_workaround;
        boolean_t               enc_rx_batching_enabled;
        /* Maximum number of descriptors completed in an rx event. */
        uint32_t                enc_rx_batch_max;
@@ -2258,7 +2267,7 @@ typedef enum efx_rx_hash_alg_e {
  *  - a combination of legacy flags
  *  - a combination of EFX_RX_HASH() flags
  */
-typedef unsigned int efx_rx_hash_type_t;
+typedef uint32_t efx_rx_hash_type_t;
 
 typedef enum efx_rx_hash_support_e {
        EFX_RX_HASH_UNAVAILABLE = 0,    /* Hardware hash not inserted */
@@ -2359,7 +2368,8 @@ extern    __checkReturn                           efx_rc_t
 efx_rx_scale_hash_flags_get(
        __in                                    efx_nic_t *enp,
        __in                                    efx_rx_hash_alg_t hash_alg,
-       __inout_ecount(EFX_RX_HASH_NFLAGS)      unsigned int *flags,
+       __out_ecount_part(max_nflags, *nflagsp) unsigned int *flagsp,
+       __in                                    unsigned int max_nflags,
        __out                                   unsigned int *nflagsp);
 
 extern __checkReturn   efx_rc_t
@@ -3193,6 +3203,17 @@ efx_nic_set_fw_subvariant(
 
 #endif /* EFSYS_OPT_FW_SUBVARIANT_AWARE */
 
+typedef enum efx_phy_fec_type_e {
+       EFX_PHY_FEC_NONE = 0,
+       EFX_PHY_FEC_BASER,
+       EFX_PHY_FEC_RS
+} efx_phy_fec_type_t;
+
+extern __checkReturn   efx_rc_t
+efx_phy_fec_type_get(
+       __in            efx_nic_t *enp,
+       __out           efx_phy_fec_type_t *typep);
+
 #ifdef __cplusplus
 }
 #endif