Skip to content

Commit 7bd2275

Browse files
julianwiedmanndavem330
authored andcommitted
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: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d7ef489 commit 7bd2275

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

drivers/s390/net/qeth_core_sys.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,
416416
goto out;
417417
}
418418

419-
card->info.mac_bits = 0;
420419
if (card->discipline) {
421420
/* start with a new, pristine netdevice: */
422421
ndev = qeth_clone_netdev(card->dev);

drivers/s390/net/qeth_l2_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
301301
dev_close(card->dev);
302302
rtnl_unlock();
303303
}
304-
card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
305304
card->state = CARD_STATE_SOFTSETUP;
306305
}
307306
if (card->state == CARD_STATE_SOFTSETUP) {
@@ -321,6 +320,7 @@ static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
321320
}
322321

323322
flush_workqueue(card->event_wq);
323+
card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
324324
}
325325

326326
static int qeth_l2_process_inbound_buffer(struct qeth_card *card,

0 commit comments

Comments
 (0)