diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2018-09-26 19:29:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-26 19:56:08 +0300 |
commit | 91cc98f51e3d3b1bd2b9cd10fcc8ebfc08cd4c45 (patch) | |
tree | 95c62ebe9aa1712eefc5aa329b6f896aa28d891b /drivers/s390/net/qeth_core_sys.c | |
parent | d782d80f36f33426e99eacae8cd7f2ff7918aaf4 (diff) | |
download | linux-91cc98f51e3d3b1bd2b9cd10fcc8ebfc08cd4c45.tar.xz |
s390/qeth: remove duplicated carrier state tracking
The netdevice is always available, apply any carrier state changes to it
without caching them.
On a STARTLAN event (ie. carrier-up), defer updating the state to
qeth_core_hardsetup_card() in the subsequent recovery action.
Also remove the carrier-state checks from the xmit routines. Stopping
transmission on carrier-down is the responsibility of upper-level code
(eg see dev_direct_xmit()).
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_core_sys.c')
-rw-r--r-- | drivers/s390/net/qeth_core_sys.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 970f6c71a66e..30f61608fa22 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c @@ -31,10 +31,9 @@ static ssize_t qeth_dev_state_show(struct device *dev, case CARD_STATE_SOFTSETUP: return sprintf(buf, "SOFTSETUP\n"); case CARD_STATE_UP: - if (card->lan_online) - return sprintf(buf, "UP (LAN ONLINE)\n"); - else - return sprintf(buf, "UP (LAN OFFLINE)\n"); + return sprintf(buf, "UP (LAN %s)\n", + netif_carrier_ok(card->dev) ? "ONLINE" : + "OFFLINE"); case CARD_STATE_RECOVER: return sprintf(buf, "RECOVER\n"); default: |