qeth: initialize net_device with carrier off
authorUrsula Braun <ubraun@linux.vnet.ibm.com>
Fri, 11 Dec 2015 11:27:55 +0000 (12:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Dec 2015 21:16:45 +0000 (16:16 -0500)
/sys/class/net/<interface>/operstate for an active qeth network
interface offen shows "unknown", which translates to "state UNKNOWN
in output of "ip link show". It is caused by a missing initialization
of the __LINK_STATE_NOCARRIER bit in the net_device state field.
This patch adds a netif_carrier_off() invocation when creating the
net_device for a qeth device.

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Acked-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Reference-ID: Bugzilla 133209
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c

index 8f1b091e173277a718c232bdbf707fb03db21945..80b1979e8d955f6022e7810a4b65a62f13ec1224 100644 (file)
@@ -1126,6 +1126,7 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
        qeth_l2_request_initial_mac(card);
        SET_NETDEV_DEV(card->dev, &card->gdev->dev);
        netif_napi_add(card->dev, &card->napi, qeth_l2_poll, QETH_NAPI_WEIGHT);
+       netif_carrier_off(card->dev);
        return register_netdev(card->dev);
 }
 
index e2eb88c0d41d1366bd1edb04bd788cefef135b52..10d9d3eefd2099e2a750c15bbdfa791c29b8463f 100644 (file)
@@ -3199,6 +3199,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
 
        SET_NETDEV_DEV(card->dev, &card->gdev->dev);
        netif_napi_add(card->dev, &card->napi, qeth_l3_poll, QETH_NAPI_WEIGHT);
+       netif_carrier_off(card->dev);
        return register_netdev(card->dev);
 }