]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix the carrier state error when data path is off
authorHaiyang Zhang <haiyangz@microsoft.com>
Wed, 21 Jun 2017 23:40:47 +0000 (16:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jun 2017 17:30:37 +0000 (13:30 -0400)
commit9635c9a4ea9da63b73624b59ced0faeb609e5c85
treea5ac78cde6ec8aeb09cb3e92cbb886ccc39f42d8
parentb95c6f57857186a528e6ee271a5696d0d7da4b97
hv_netvsc: Fix the carrier state error when data path is off

When the VF NIC is opened, the synthetic NIC's carrier state is set to
off. This tells the host to transitions data path to the VF device. But
if startup script or user manipulates the admin state of the netvsc
device directly for example:
        # ifconfig eth0 down
# ifconfig eth0 up
Then the carrier state of the synthetic NIC would be on, even though the
data path was still over the VF NIC. This patch sets the carrier state
of synthetic NIC with consideration of the related VF state.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c