Skip to content

Commit 70551dc

Browse files
julianwiedmanndavem330
authored andcommitted
s390/qeth: reset layer2 attribute on layer switch
After the subdriver's remove() routine has completed, the card's layer mode is undetermined again. Reflect this in the layer2 field. If qeth_dev_layer2_store() hits an error after remove() was called, the card _always_ requires a setup(), even if the previous layer mode is requested again. But qeth_dev_layer2_store() bails out early if the requested layer mode still matches the current one. So unless we reset the layer2 field, re-probing the card back to its previous mode is currently not possible. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a702349 commit 70551dc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/s390/net/qeth_core_sys.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,
426426
if (card->discipline) {
427427
card->discipline->remove(card->gdev);
428428
qeth_core_free_discipline(card);
429+
card->options.layer2 = -1;
429430
}
430431

431432
rc = qeth_core_load_discipline(card, newdis);

0 commit comments

Comments
 (0)