From: David S. Miller Date: Sat, 10 Dec 2016 21:21:55 +0000 (-0500) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=821781a9f40673c2aa0f29d9d8226ec320dff20c;p=linux-beck.git Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net --- 821781a9f40673c2aa0f29d9d8226ec320dff20c diff --cc drivers/net/hyperv/netvsc_drv.c index 9522763c8faf,c9140c3aeb67..c9414c054852 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@@ -1393,14 -1404,8 +1397,15 @@@ static int netvsc_probe(struct hv_devic nvdev = net_device_ctx->nvdev; 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); + /* MTU range: 68 - 1500 or 65521 */ + net->min_mtu = NETVSC_MTU_MIN; + if (nvdev->nvsp_version >= NVSP_PROTOCOL_VERSION_2) + net->max_mtu = NETVSC_MTU - ETH_HLEN; + else + net->max_mtu = ETH_DATA_LEN; + ret = register_netdev(net); if (ret != 0) { pr_err("Unable to register netdev.\n"); diff --cc drivers/net/phy/phy_device.c index 32fa7c76f29c,c4ceb082e970..0aadef9fc7dd --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@@ -969,9 -926,9 +975,10 @@@ int phy_attach_direct(struct net_devic return err; error: + phy_detach(phydev); put_device(d); - module_put(bus->owner); + if (ndev_owner != bus->owner) + module_put(bus->owner); return err; } EXPORT_SYMBOL(phy_attach_direct);