Skip to content

Commit

Permalink
net/netvsc: initialize link state
Browse files Browse the repository at this point in the history
[ upstream commit 047ad37 ]

If application is using link state interrupt, the correct link state
needs to be filled in when device is started. This is similar to
how virtio updates link information.

Fixes: 4e9c73e ("net/netvsc: add Hyper-V network device")

Reported-by: Mohammed Gamal <mgamal@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Mohammed Gamal <mgamal@redhat.com>
  • Loading branch information
shemminger authored and kevintraynor committed Feb 19, 2020
1 parent 19562f0 commit 29731e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/netvsc/hn_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,10 @@ hn_dev_start(struct rte_eth_dev *dev)
if (error)
hn_rndis_set_rxfilter(hv, 0);

/* Initialize Link state */
if (error == 0)
hn_dev_link_update(dev, 0);

return error;
}

Expand Down

0 comments on commit 29731e2

Please sign in to comment.