sfc: remove max_interrupt_mode
authorEdward Cree <ecree@solarflare.com>
Thu, 2 Jul 2020 16:27:51 +0000 (17:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jul 2020 21:47:39 +0000 (14:47 -0700)
All NICs supported by this driver are capable of MSI-X interrupts (only
 Falcon A1 wasn't, and that's now hived off into its own driver), so no
 need for a nic-type parameter.  Besides, the code that checked it was
 buggy anyway (the following assignment that checked min_interrupt_mode
 overrode it).

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/efx_channels.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/siena.c

index a51925b..88522b6 100644 (file)
@@ -4108,7 +4108,6 @@ const struct efx_nic_type efx_hunt_a0_vf_nic_type = {
        .can_rx_scatter = true,
        .always_rx_scatter = true,
        .min_interrupt_mode = EFX_INT_MODE_MSIX,
-       .max_interrupt_mode = EFX_INT_MODE_MSIX,
        .timer_period_max = 1 << ERF_DD_EVQ_IND_TIMER_VAL_WIDTH,
        .offload_features = EF10_OFFLOAD_FEATURES,
        .mcdi_max_ver = 2,
@@ -4245,7 +4244,6 @@ const struct efx_nic_type efx_hunt_a0_nic_type = {
        .always_rx_scatter = true,
        .option_descriptors = true,
        .min_interrupt_mode = EFX_INT_MODE_LEGACY,
-       .max_interrupt_mode = EFX_INT_MODE_MSIX,
        .timer_period_max = 1 << ERF_DD_EVQ_IND_TIMER_VAL_WIDTH,
        .offload_features = EF10_OFFLOAD_FEATURES,
        .mcdi_max_ver = 2,
index 2f9db21..2220b95 100644 (file)
@@ -557,12 +557,6 @@ int efx_init_channels(struct efx_nic *efx)
        }
 
        /* Higher numbered interrupt modes are less capable! */
-       if (WARN_ON_ONCE(efx->type->max_interrupt_mode >
-                        efx->type->min_interrupt_mode)) {
-               return -EIO;
-       }
-       efx->interrupt_mode = max(efx->type->max_interrupt_mode,
-                                 interrupt_mode);
        efx->interrupt_mode = min(efx->type->min_interrupt_mode,
                                  interrupt_mode);
 
index 65a1068..e536c1e 100644 (file)
@@ -1317,8 +1317,6 @@ struct efx_udp_tunnel {
  * @option_descriptors: NIC supports TX option descriptors
  * @min_interrupt_mode: Lowest capability interrupt mode supported
  *     from &enum efx_int_mode.
- * @max_interrupt_mode: Highest capability interrupt mode supported
- *     from &enum efx_int_mode.
  * @timer_period_max: Maximum period of interrupt timer (in ticks)
  * @offload_features: net_device feature flags for protocol offload
  *     features implemented in hardware
@@ -1492,7 +1490,6 @@ struct efx_nic_type {
        bool always_rx_scatter;
        bool option_descriptors;
        unsigned int min_interrupt_mode;
-       unsigned int max_interrupt_mode;
        unsigned int timer_period_max;
        netdev_features_t offload_features;
        int mcdi_max_ver;
index a7dcd2d..e438853 100644 (file)
@@ -1085,7 +1085,6 @@ const struct efx_nic_type siena_a0_nic_type = {
        .can_rx_scatter = true,
        .option_descriptors = false,
        .min_interrupt_mode = EFX_INT_MODE_LEGACY,
-       .max_interrupt_mode = EFX_INT_MODE_MSIX,
        .timer_period_max = 1 << FRF_CZ_TC_TIMER_VAL_WIDTH,
        .offload_features = (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
                             NETIF_F_RXHASH | NETIF_F_NTUPLE),