diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2018-09-26 18:29:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-26 09:56:08 -0700 |
commit | 91cc98f51e3d3b1bd2b9cd10fcc8ebfc08cd4c45 (patch) | |
tree | 95c62ebe9aa1712eefc5aa329b6f896aa28d891b /drivers/s390/net/qeth_l2_main.c | |
parent | d782d80f36f33426e99eacae8cd7f2ff7918aaf4 (diff) | |
download | lwn-91cc98f51e3d3b1bd2b9cd10fcc8ebfc08cd4c45.tar.gz lwn-91cc98f51e3d3b1bd2b9cd10fcc8ebfc08cd4c45.zip |
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_l2_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index ed475b4ddd3e..c810d53fff51 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -694,7 +694,7 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb, int tx_bytes = skb->len; int rc; - if ((card->state != CARD_STATE_UP) || !card->lan_online) { + if (card->state != CARD_STATE_UP) { card->stats.tx_carrier_errors++; goto tx_drop; } @@ -997,10 +997,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) goto out_remove; } card->state = CARD_STATE_SOFTSETUP; - if (card->lan_online) - netif_carrier_on(card->dev); - else - netif_carrier_off(card->dev); qeth_set_allowed_threads(card, 0xffffffff, 0); |