]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 16 Feb 2016 10:55:27 +0000 (10:55 +0000)
commit e5ebe63214d44d4dcf43df02edf3613e04d671b9 upstream.

/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>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c

index 5ef5b4f45758cd226bb58becde5a3fa81ff33bb2..12339e6bd23e8e8356b657a0614de77a483f7ebe 100644 (file)
@@ -977,6 +977,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 14e0b5810e8c1cde11a8835552158bab8b59dd1a..3cbe133a0d9648743383d4aa9ce55ad5b8bd721d 100644 (file)
@@ -3310,6 +3310,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);
 }