提交 4783256e 编写于 作者: P Pantelis Koukousoulas 提交者: David S. Miller

virtio_net: Make virtio_net support carrier detection

Impact: Make NetworkManager work with virtio_net

For now the semantics are simple: There is always carrier.

This allows a seamless experience with e.g., qemu/kvm
where NetworkManager just configures and sets up
everything automagically.

If/when a generally agreed-upon way to control
carrier on/off in the emulator/hypervisor level
emerges, it will be trivial to extend the driver
to support that too, but for now even this 2-liner
makes user experience that much better.
Signed-off-by: NPantelis Koukousoulas <pktoss@gmail.com>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 17d04500
......@@ -612,6 +612,7 @@ static struct ethtool_ops virtnet_ethtool_ops = {
.set_tx_csum = virtnet_set_tx_csum,
.set_sg = ethtool_op_set_sg,
.set_tso = ethtool_op_set_tso,
.get_link = ethtool_op_get_link,
};
#define MIN_MTU 68
......@@ -739,6 +740,8 @@ static int virtnet_probe(struct virtio_device *vdev)
goto unregister;
}
netif_carrier_on(dev);
pr_debug("virtnet: registered device %s\n", dev->name);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册