net/sfc: do not drop TSO on device configure
authorAndrew Rybchenko <arybchenko@solarflare.com>
Wed, 29 Mar 2017 16:59:19 +0000 (17:59 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 17:02:59 +0000 (19:02 +0200)
If Tx datapath does not support TSO, TSO was dropped on device configure.
It is incorrect to change advertised offloads.

Fixes: 7a4d44a639c9 ("net/sfc: make TSO a datapath-dependent feature")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/sfc.c
drivers/net/sfc/sfc_tx.c

index eda426c..181d87a 100644 (file)
@@ -588,9 +588,12 @@ sfc_attach(struct sfc_adapter *sa)
 
        encp = efx_nic_cfg_get(sa->nic);
 
-       sa->tso = encp->enc_fw_assisted_tso_v2_enabled;
-       if (!sa->tso)
-               sfc_warn(sa, "TSO support isn't available on this adapter");
+       if (sa->dp_tx->features & SFC_DP_TX_FEAT_TSO) {
+               sa->tso = encp->enc_fw_assisted_tso_v2_enabled;
+               if (!sa->tso)
+                       sfc_warn(sa,
+                                "TSO support isn't available on this adapter");
+       }
 
        sfc_log_init(sa, "estimate resource limits");
        rc = sfc_estimate_resource_limits(sa);
index 79b900b..3c4717f 100644 (file)
@@ -307,9 +307,6 @@ sfc_tx_init(struct sfc_adapter *sa)
                goto fail_tx_dma_desc_boundary;
        }
 
-       if (~sa->dp_tx->features & SFC_DP_TX_FEAT_TSO)
-               sa->tso = B_FALSE;
-
        rc = sfc_tx_check_mode(sa, &dev_conf->txmode);
        if (rc != 0)
                goto fail_check_mode;