Commit 2165fdf4 authored by David S. Miller's avatar David S. Miller

Merge branch 's390-qeth-fixes'

Julian Wiedmann says:

====================
s390/qeth: fixes 2020-03-10

This fixes three minor issues:
1) a setup parameter gets cleared unnecessarily when the HW config
   changes,
2) insufficient error handling when initially filling the RX ring, and
3) a rarely used worker that needs to be cancelled during tear down.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a2d8bf77 0e635c2a
...@@ -1204,7 +1204,6 @@ static int qeth_osa_set_output_queues(struct qeth_card *card, bool single) ...@@ -1204,7 +1204,6 @@ static int qeth_osa_set_output_queues(struct qeth_card *card, bool single)
if (count == 1) if (count == 1)
dev_info(&card->gdev->dev, "Priority Queueing not supported\n"); dev_info(&card->gdev->dev, "Priority Queueing not supported\n");
card->qdio.default_out_queue = single ? 0 : QETH_DEFAULT_QUEUE;
card->qdio.no_out_queues = count; card->qdio.no_out_queues = count;
return 0; return 0;
} }
...@@ -2393,7 +2392,6 @@ static void qeth_free_qdio_queues(struct qeth_card *card) ...@@ -2393,7 +2392,6 @@ static void qeth_free_qdio_queues(struct qeth_card *card)
return; return;
qeth_free_cq(card); qeth_free_cq(card);
cancel_delayed_work_sync(&card->buffer_reclaim_work);
for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) { for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
if (card->qdio.in_q->bufs[j].rx_skb) if (card->qdio.in_q->bufs[j].rx_skb)
dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb); dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
...@@ -2625,12 +2623,12 @@ static int qeth_init_input_buffer(struct qeth_card *card, ...@@ -2625,12 +2623,12 @@ static int qeth_init_input_buffer(struct qeth_card *card,
ETH_HLEN + ETH_HLEN +
sizeof(struct ipv6hdr)); sizeof(struct ipv6hdr));
if (!buf->rx_skb) if (!buf->rx_skb)
return 1; return -ENOMEM;
} }
pool_entry = qeth_find_free_buffer_pool_entry(card); pool_entry = qeth_find_free_buffer_pool_entry(card);
if (!pool_entry) if (!pool_entry)
return 1; return -ENOBUFS;
/* /*
* since the buffer is accessed only from the input_tasklet * since the buffer is accessed only from the input_tasklet
...@@ -2675,10 +2673,15 @@ static int qeth_init_qdio_queues(struct qeth_card *card) ...@@ -2675,10 +2673,15 @@ static int qeth_init_qdio_queues(struct qeth_card *card)
/* inbound queue */ /* 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)); memset(&card->rx, 0, sizeof(struct qeth_rx));
qeth_initialize_working_pool_list(card); qeth_initialize_working_pool_list(card);
/*give only as many buffers to hardware as we have buffer pool entries*/ /*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) for (i = 0; i < card->qdio.in_buf_pool.buf_count - 1; i++) {
qeth_init_input_buffer(card, &card->qdio.in_q->bufs[i]); rc = qeth_init_input_buffer(card, &card->qdio.in_q->bufs[i]);
if (rc)
return rc;
}
card->qdio.in_q->next_buf_to_init = card->qdio.in_q->next_buf_to_init =
card->qdio.in_buf_pool.buf_count - 1; card->qdio.in_buf_pool.buf_count - 1;
rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0, 0, rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0, 0,
......
...@@ -284,6 +284,7 @@ static void qeth_l2_stop_card(struct qeth_card *card) ...@@ -284,6 +284,7 @@ static void qeth_l2_stop_card(struct qeth_card *card)
if (card->state == CARD_STATE_SOFTSETUP) { if (card->state == CARD_STATE_SOFTSETUP) {
qeth_clear_ipacmd_list(card); qeth_clear_ipacmd_list(card);
qeth_drain_output_queues(card); qeth_drain_output_queues(card);
cancel_delayed_work_sync(&card->buffer_reclaim_work);
card->state = CARD_STATE_DOWN; card->state = CARD_STATE_DOWN;
} }
......
...@@ -1178,6 +1178,7 @@ static void qeth_l3_stop_card(struct qeth_card *card) ...@@ -1178,6 +1178,7 @@ static void qeth_l3_stop_card(struct qeth_card *card)
qeth_l3_clear_ip_htable(card, 1); qeth_l3_clear_ip_htable(card, 1);
qeth_clear_ipacmd_list(card); qeth_clear_ipacmd_list(card);
qeth_drain_output_queues(card); qeth_drain_output_queues(card);
cancel_delayed_work_sync(&card->buffer_reclaim_work);
card->state = CARD_STATE_DOWN; card->state = CARD_STATE_DOWN;
} }
......
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