All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make virtio_net support carrier detection
@ 2009-03-14  0:23 Rusty Russell
  2009-03-19  1:40 ` David Miller
  0 siblings, 1 reply; 28+ messages in thread
From: Rusty Russell @ 2009-03-14  0:23 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: netdev, stable

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: Pantelis Koukousoulas <pktoss@gmail.com>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 drivers/net/virtio_net.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index c688083..e67d16c 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -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;
 
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 28+ messages in thread
[parent not found: <1236772642-12705-1-git-send-email-pktoss@gmail.com>]

end of thread, other threads:[~2009-03-19  1:40 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-14  0:23 [PATCH] Make virtio_net support carrier detection Rusty Russell
2009-03-19  1:40 ` David Miller
     [not found] <1236772642-12705-1-git-send-email-pktoss@gmail.com>
2009-03-12  7:29 ` Rusty Russell
2009-03-12  7:44   ` Pantelis Koukousoulas
2009-03-12  9:16     ` Rusty Russell
2009-03-12 10:23       ` Pantelis Koukousoulas
2009-03-12 11:05         ` Pantelis Koukousoulas
2009-03-12 11:43       ` Dan Williams
2009-03-12 12:47         ` Pantelis Koukousoulas
2009-03-12 12:52           ` David Miller
2009-03-12 12:58             ` Pantelis Koukousoulas
2009-03-12 13:03               ` David Miller
2009-03-12 13:10                 ` Pantelis Koukousoulas
2009-03-12 13:41             ` Dan Williams
2009-03-12 13:55               ` Dan Williams
2009-03-12 21:39             ` Rusty Russell
2009-03-12 23:47               ` Rusty Russell
2009-03-12 23:55                 ` Stephen Hemminger
2009-03-13  5:04                 ` Pantelis Koukousoulas
2009-03-13 19:01                 ` David Miller
2009-03-14  0:19                   ` Rusty Russell
2009-03-14 10:40                     ` Pantelis Koukousoulas
2009-03-14 11:33                       ` Pantelis Koukousoulas
2009-03-15 22:39                       ` Rusty Russell
2009-03-16  2:05                         ` Pantelis Koukousoulas
2009-03-16  2:58                     ` David Miller
2009-03-16  3:13                       ` Rusty Russell
2009-03-16  3:15                         ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.