public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Julian Wiedmann <jwi@linux.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Stefan Raspl <raspl@linux.ibm.com>,
	Ursula Braun <ubraun@linux.ibm.com>,
	Julian Wiedmann <jwi@linux.ibm.com>
Subject: [PATCH net-next 3/9] s390/qeth: unconditionally clear MAC_REGISTERED flag
Date: Thu, 28 Feb 2019 18:59:38 +0100	[thread overview]
Message-ID: <20190228175944.24718-4-jwi@linux.ibm.com> (raw)
In-Reply-To: <20190228175944.24718-1-jwi@linux.ibm.com>

In its attempt to run only the minimal amount of tear down steps,
qeth_l2_stop_card() fails to reset the "is dev_addr registered?" flag
in some rare scenarios. But a future change to the tear down sequence
would cause us to _always_ hit this issue, so patch it up before that
code lands.

Fix it by unconditionally clearing the flag bit. This also allows us to
remove the additional cleanup step in qeth_dev_layer2_store().

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core_sys.c | 1 -
 drivers/s390/net/qeth_l2_main.c  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c
index e24d204b780a..fa575549d288 100644
--- a/drivers/s390/net/qeth_core_sys.c
+++ b/drivers/s390/net/qeth_core_sys.c
@@ -416,7 +416,6 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,
 		goto out;
 	}
 
-	card->info.mac_bits = 0;
 	if (card->discipline) {
 		/* start with a new, pristine netdevice: */
 		ndev = qeth_clone_netdev(card->dev);
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 72e6d08444a7..f71d45ea30da 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -301,7 +301,6 @@ static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
 			dev_close(card->dev);
 			rtnl_unlock();
 		}
-		card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
 		card->state = CARD_STATE_SOFTSETUP;
 	}
 	if (card->state == CARD_STATE_SOFTSETUP) {
@@ -321,6 +320,7 @@ static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
 	}
 
 	flush_workqueue(card->event_wq);
+	card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
 }
 
 static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
-- 
2.16.4

  parent reply	other threads:[~2019-02-28 17:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 17:59 [PATCH net-next 0/9] s390/qeth: updates 2019-02-28 Julian Wiedmann
2019-02-28 17:59 ` [PATCH net-next 1/9] s390/qeth: remove RECOVER state Julian Wiedmann
2019-02-28 17:59 ` [PATCH net-next 2/9] s390/qeth: enable/disable the HW trap a little earlier Julian Wiedmann
2019-02-28 17:59 ` Julian Wiedmann [this message]
2019-02-28 17:59 ` [PATCH net-next 4/9] s390/qeth: call dev_close() during recovery Julian Wiedmann
2019-02-28 17:59 ` [PATCH net-next 5/9] s390/qeth: remove a redundant check for card->dev Julian Wiedmann
2019-02-28 17:59 ` [PATCH net-next 6/9] s390/qeth: don't defer close_dev work during recovery Julian Wiedmann
2019-02-28 17:59 ` [PATCH net-next 7/9] s390/qeth: remove driver-wide workqueue Julian Wiedmann
2019-02-28 17:59 ` [PATCH net-next 8/9] s390/qeth: don't special-case HW trap during suspend Julian Wiedmann
2019-02-28 17:59 ` [PATCH net-next 9/9] s390/qeth: drop redundant state checking Julian Wiedmann
2019-02-28 20:55 ` [PATCH net-next 0/9] s390/qeth: updates 2019-02-28 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190228175944.24718-4-jwi@linux.ibm.com \
    --to=jwi@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=raspl@linux.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=ubraun@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox