diff options
Diffstat (limited to 'src/drivers/net')
-rw-r--r-- | src/drivers/net/netvsc.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/drivers/net/netvsc.c b/src/drivers/net/netvsc.c index 5be52fb..f753868 100644 --- a/src/drivers/net/netvsc.c +++ b/src/drivers/net/netvsc.c @@ -852,16 +852,9 @@ static int netvsc_reset ( struct vmbus_device *vmdev ) { struct net_device *netdev = rndis->netdev; int rc; - /* A closed device holds no NetVSC (or RNDIS) state, so there - * is nothing to reset. - */ - if ( ! netdev_is_open ( netdev ) ) - return 0; - - /* Close and reopen device to reset any stale state */ - netdev_close ( netdev ); - if ( ( rc = netdev_open ( netdev ) ) != 0 ) { - DBGC ( netvsc, "NETVSC %s could not reopen: %s\n", + /* Reset network device */ + if ( ( rc = netdev_reset ( netdev ) ) != 0 ) { + DBGC ( netvsc, "NETVSC %s could not reset: %s\n", netvsc->name, strerror ( rc ) ); return rc; } |