s390/qeth: reset NAPI context during queue init
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Fri, 9 Mar 2018 17:12:59 +0000 (18:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Mar 2018 18:10:05 +0000 (13:10 -0500)
init_qdio_queues() resets the Input Queue's overall QDIO state, and
positions the buffer cursor back to 0. So this is the obvious place to
also reset the queue's NAPI context (in contrast to doing it rather
randomly in the middle of the big set_online() path).
No functional change.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c

index 8f427621e6565c41544caa66ff9afd0e87a5ff47..8c97ce2516bb0085e4c21e52e3805fa18a5f952d 100644 (file)
@@ -2873,8 +2873,8 @@ int qeth_init_qdio_queues(struct qeth_card *card)
        QETH_DBF_TEXT(SETUP, 2, "initqdqs");
 
        /* inbound queue */
-       qdio_reset_buffers(card->qdio.in_q->qdio_bufs,
-                          QDIO_MAX_BUFFERS_PER_Q);
+       qdio_reset_buffers(card->qdio.in_q->qdio_bufs, QDIO_MAX_BUFFERS_PER_Q);
+       memset(&card->rx, 0, sizeof(struct qeth_rx));
        qeth_initialize_working_pool_list(card);
        /*give only as many buffers to hardware as we have buffer pool entries*/
        for (i = 0; i < card->qdio.in_buf_pool.buf_count - 1; ++i)
index 09768677222b2bf61180e8107cad0798de8ec737..8f5babdccb426209904232847e79cad751200c83 100644 (file)
@@ -1087,7 +1087,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
        qeth_l2_setup_bridgeport_attrs(card);
 
        card->state = CARD_STATE_HARDSETUP;
-       memset(&card->rx, 0, sizeof(struct qeth_rx));
        qeth_print_status_message(card);
 
        /* softsetup */
index c302274bab222df0a564fb69c411cfa4ff4c5e14..17daf2047f7b0538422481e7ef8fde8a645630df 100644 (file)
@@ -2898,7 +2898,6 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
                card->info.hwtrap = 0;
 
        card->state = CARD_STATE_HARDSETUP;
-       memset(&card->rx, 0, sizeof(struct qeth_rx));
        qeth_print_status_message(card);
 
        /* softsetup */