Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222039
b: refs/heads/master
c: 167c25e
h: refs/heads/master
i:
  222037: fab531c
  222035: 48575f3
  222031: dfe17d6
v: v3
  • Loading branch information
Jason Wang authored and David S. Miller committed Nov 12, 2010
1 parent cb04181 commit fd8abc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 75e6047431872dadd0b13503b374e48ccd71a507
refs/heads/master: 167c25e4c5501f8b7e37f949d23652975c5a769c
12 changes: 9 additions & 3 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,9 +986,15 @@ static int virtnet_probe(struct virtio_device *vdev)
goto unregister;
}

vi->status = VIRTIO_NET_S_LINK_UP;
virtnet_update_status(vi);
netif_carrier_on(dev);
/* Assume link up if device can't report link status,
otherwise get link status from config. */
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
netif_carrier_off(dev);
virtnet_update_status(vi);
} else {
vi->status = VIRTIO_NET_S_LINK_UP;
netif_carrier_on(dev);
}

pr_debug("virtnet: registered device %s\n", dev->name);
return 0;
Expand Down

0 comments on commit fd8abc9

Please sign in to comment.