ibmvnic: Set state UP
authorMick Tarsel <mjtarsel@linux.vnet.ibm.com>
Thu, 28 Sep 2017 20:53:18 +0000 (13:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Oct 2017 03:02:35 +0000 (04:02 +0100)
State is initially reported as UNKNOWN. Before register call
netif_carrier_off(). Once the device is opened, call netif_carrier_on() in
order to set the state to UP.

Signed-off-by: Mick Tarsel <mjtarsel@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index cb8182f4fdfa1725f8d4024741e00219376d7326..4bc14a90157117567842312b65d43515972ad0e4 100644 (file)
@@ -927,6 +927,7 @@ static int ibmvnic_open(struct net_device *netdev)
        }
 
        rc = __ibmvnic_open(netdev);
+       netif_carrier_on(netdev);
        mutex_unlock(&adapter->reset_lock);
 
        return rc;
@@ -3899,6 +3900,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
        if (rc)
                goto ibmvnic_init_fail;
 
+       netif_carrier_off(netdev);
        rc = register_netdev(netdev);
        if (rc) {
                dev_err(&dev->dev, "failed to register netdev rc=%d\n", rc);