summaryrefslogtreecommitdiff
path: root/drivers/net/hyperv/netvsc.c
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2016-08-04 10:42:15 -0700
committerDavid S. Miller <davem@davemloft.net>2016-08-08 16:14:07 -0700
commit7f5d5af0b2f859f09b3dcb16a00b800fa48d9288 (patch)
tree3354e0a6841c8c8ec8ae132e6f5281ff3b26bec4 /drivers/net/hyperv/netvsc.c
parentb37879e6ca7079943542048da37f00a386c30cee (diff)
downloadlinux-7f5d5af0b2f859f09b3dcb16a00b800fa48d9288.tar.gz
linux-7f5d5af0b2f859f09b3dcb16a00b800fa48d9288.tar.bz2
linux-7f5d5af0b2f859f09b3dcb16a00b800fa48d9288.zip
hv_netvsc: Add handler for physical link speed change
On Hyper-V host 2016 and later, VMs gets an event message of the physical link speed when vSwitch is changed. This patch handles this message, so the updated link speed can be reported by ethtool. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r--drivers/net/hyperv/netvsc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 20e09174ff62..36a7994f2811 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -472,9 +472,13 @@ static int negotiate_nvsp_ver(struct hv_device *device,
init_packet->msg.v2_msg.send_ndis_config.mtu = ndev->mtu + ETH_HLEN;
init_packet->msg.v2_msg.send_ndis_config.capability.ieee8021q = 1;
- if (nvsp_ver >= NVSP_PROTOCOL_VERSION_5)
+ if (nvsp_ver >= NVSP_PROTOCOL_VERSION_5) {
init_packet->msg.v2_msg.send_ndis_config.capability.sriov = 1;
+ /* Teaming bit is needed to receive link speed updates */
+ init_packet->msg.v2_msg.send_ndis_config.capability.teaming = 1;
+ }
+
ret = vmbus_sendpacket(device->channel, init_packet,
sizeof(struct nvsp_message),
(unsigned long)init_packet,