diff options
author | Ursula Braun <ubraun@linux.vnet.ibm.com> | 2015-12-11 14:27:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-15 00:16:45 +0300 |
commit | e5ebe63214d44d4dcf43df02edf3613e04d671b9 (patch) | |
tree | 8b78cee295a1057c83523751fefbbff24ce36ede /drivers/s390 | |
parent | b475e3161ce74a7e2ee72322585ed5f39985c06a (diff) | |
download | linux-e5ebe63214d44d4dcf43df02edf3613e04d671b9.tar.xz |
qeth: initialize net_device with carrier off
/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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 1 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 8f1b091e1732..80b1979e8d95 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -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); } diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index e2eb88c0d41d..10d9d3eefd20 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -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); } |