summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
diff options
context:
space:
mode:
authorJay Vosburgh <jay.vosburgh@canonical.com>2018-03-22 17:42:41 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-23 19:16:46 +0300
commitbda7fab54828bbef2164bb23c0f6b1a7d05cc718 (patch)
tree81d49263118d4d4a33b0cfceddc14e1e8435453b /drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
parente9de0018d1fa97f8db9a39fcb69b55266c52835b (diff)
downloadlinux-bda7fab54828bbef2164bb23c0f6b1a7d05cc718.tar.xz
virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS
The operstate update logic will leave an interface in the default UNKNOWN operstate if the interface carrier state never changes from the default carrier up state set at creation. This includes the case of an explicit call to netif_carrier_on, as the carrier on to on transition has no effect on operstate. This affects virtio-net for the case that the virtio peer does not support VIRTIO_NET_F_STATUS (the feature that provides carrier state updates). Without this feature, the virtio specification states that "the link should be assumed active," so, logically, the operstate should be UP instead of UNKNOWN. This has impact on user space applications that use the operstate to make availability decisions for the interface. Resolve this by changing the virtio probe logic slightly to call netif_carrier_off for both the "with" and "without" VIRTIO_NET_F_STATUS cases, and then the existing call to netif_carrier_on for the "without" case will cause an operstate transition. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c')
0 files changed, 0 insertions, 0 deletions