netvsc: Set maximum GSO size in the right place
authorBen Hutchings <ben@decadent.org.uk>
Thu, 9 Feb 2017 19:37:35 +0000 (19:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2017 23:22:51 +0000 (15:22 -0800)
Commit a50af86dd49e "netvsc: reduce maximum GSO size" was wrongly
backported to 4.4-stable.  The maximum size needs to be set before the
net device is registered, in netvsc_probe().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc_drv.c

index 7a601d8..e8a09ff 100644 (file)
@@ -854,7 +854,6 @@ static int netvsc_set_channels(struct net_device *net,
                }
                goto recover;
        }
-       netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
 
  out:
        netvsc_open(net);
@@ -1142,6 +1141,7 @@ static int netvsc_probe(struct hv_device *dev,
        nvdev = hv_get_drvdata(dev);
        netif_set_real_num_tx_queues(net, nvdev->num_chn);
        netif_set_real_num_rx_queues(net, nvdev->num_chn);
+       netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
 
        ret = register_netdev(net);
        if (ret != 0) {