enetc: Allow to disable Tx SG
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Wed, 15 May 2019 16:08:57 +0000 (19:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 May 2019 16:14:29 +0000 (09:14 -0700)
The fact that the Tx SG flag is fixed to 'on' is only
an oversight. Non-SG mode is also supported. Fix this
by allowing to turn SG off.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc_pf.c
drivers/net/ethernet/freescale/enetc/enetc_vf.c

index 15876a6..78287c5 100644 (file)
@@ -721,7 +721,7 @@ static void enetc_pf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
        ndev->watchdog_timeo = 5 * HZ;
        ndev->max_mtu = ENETC_MAX_MTU;
 
-       ndev->hw_features = NETIF_F_RXCSUM | NETIF_F_HW_CSUM |
+       ndev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM | NETIF_F_HW_CSUM |
                            NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
                            NETIF_F_LOOPBACK;
        ndev->features = NETIF_F_HIGHDMA | NETIF_F_SG |
index 64bebee..72c3ea8 100644 (file)
@@ -130,7 +130,7 @@ static void enetc_vf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
        ndev->watchdog_timeo = 5 * HZ;
        ndev->max_mtu = ENETC_MAX_MTU;
 
-       ndev->hw_features = NETIF_F_RXCSUM | NETIF_F_HW_CSUM |
+       ndev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM | NETIF_F_HW_CSUM |
                            NETIF_F_HW_VLAN_CTAG_TX |
                            NETIF_F_HW_VLAN_CTAG_RX;
        ndev->features = NETIF_F_HIGHDMA | NETIF_F_SG |