Commit 7bd2275c authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: unconditionally clear MAC_REGISTERED flag

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: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d7ef489f
...@@ -416,7 +416,6 @@ static ssize_t qeth_dev_layer2_store(struct device *dev, ...@@ -416,7 +416,6 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,
goto out; goto out;
} }
card->info.mac_bits = 0;
if (card->discipline) { if (card->discipline) {
/* start with a new, pristine netdevice: */ /* start with a new, pristine netdevice: */
ndev = qeth_clone_netdev(card->dev); ndev = qeth_clone_netdev(card->dev);
......
...@@ -301,7 +301,6 @@ static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) ...@@ -301,7 +301,6 @@ static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
dev_close(card->dev); dev_close(card->dev);
rtnl_unlock(); rtnl_unlock();
} }
card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
card->state = CARD_STATE_SOFTSETUP; card->state = CARD_STATE_SOFTSETUP;
} }
if (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) ...@@ -321,6 +320,7 @@ static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
} }
flush_workqueue(card->event_wq); flush_workqueue(card->event_wq);
card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
} }
static int qeth_l2_process_inbound_buffer(struct qeth_card *card, static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment