From 7fb7fe5c7bacb1b1189b779f7f81c785bfc964a4 Mon Sep 17 00:00:00 2001 From: Julian Wiedmann Date: Wed, 23 Sep 2020 10:36:57 +0200 Subject: s390/qeth: cancel cmds earlier during teardown Originators of cmd IO typically hold the rtnl or conf_mutex to protect against a concurrent teardown. Since qeth_set_offline() already holds the conf_mutex, the main reason why we still care about cancelling pending cmds is so that they release the rtnl when we need it ourselves. So move this step a little earlier into the teardown sequence. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller --- drivers/s390/net/qeth_l2_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/s390/net/qeth_l2_main.c') diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index e12ac32b8b47..cbd1ab71e785 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -315,10 +315,8 @@ static void qeth_l2_stop_card(struct qeth_card *card) cancel_work_sync(&card->rx_mode_work); qeth_l2_drain_rx_mode_cache(card); - if (card->state == CARD_STATE_SOFTSETUP) { - qeth_clear_ipacmd_list(card); + if (card->state == CARD_STATE_SOFTSETUP) card->state = CARD_STATE_DOWN; - } qeth_qdio_clear_card(card, 0); qeth_drain_output_queues(card); -- cgit v1.2.3-59-g8ed1b