s390/qeth: don't keep track of Input Queue count
The only actual user of qdio.no_input_queues is qeth_qdio_establish(), and there we already have full awareness of the current Input Queue configuration (1 RX queue, plus potentially 1 TX Completion queue). So avoid this state tracking, and the ambiguity it brings with it. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fdd3c5f076
commit
dc15012bb0
|
@ -545,7 +545,6 @@ static inline bool qeth_out_queue_is_empty(struct qeth_qdio_out_q *queue)
|
|||
struct qeth_qdio_info {
|
||||
atomic_t state;
|
||||
/* input */
|
||||
int no_in_queues;
|
||||
struct qeth_qdio_q *in_q;
|
||||
struct qeth_qdio_q *c_q;
|
||||
struct qeth_qdio_buffer_pool in_buf_pool;
|
||||
|
|
|
@ -355,8 +355,8 @@ static int qeth_cq_init(struct qeth_card *card)
|
|||
qdio_reset_buffers(card->qdio.c_q->qdio_bufs,
|
||||
QDIO_MAX_BUFFERS_PER_Q);
|
||||
card->qdio.c_q->next_buf_to_init = 127;
|
||||
rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT,
|
||||
card->qdio.no_in_queues - 1, 0, 127, NULL);
|
||||
rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 1, 0, 127,
|
||||
NULL);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "1err%d", rc);
|
||||
goto out;
|
||||
|
@ -376,21 +376,16 @@ static int qeth_alloc_cq(struct qeth_card *card)
|
|||
dev_err(&card->gdev->dev, "Failed to create completion queue\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
card->qdio.no_in_queues = 2;
|
||||
} else {
|
||||
QETH_CARD_TEXT(card, 2, "nocq");
|
||||
card->qdio.c_q = NULL;
|
||||
card->qdio.no_in_queues = 1;
|
||||
}
|
||||
QETH_CARD_TEXT_(card, 2, "iqc%d", card->qdio.no_in_queues);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void qeth_free_cq(struct qeth_card *card)
|
||||
{
|
||||
if (card->qdio.c_q) {
|
||||
--card->qdio.no_in_queues;
|
||||
qeth_free_qdio_queue(card->qdio.c_q);
|
||||
card->qdio.c_q = NULL;
|
||||
}
|
||||
|
@ -1459,7 +1454,6 @@ static void qeth_init_qdio_info(struct qeth_card *card)
|
|||
card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
|
||||
|
||||
/* inbound */
|
||||
card->qdio.no_in_queues = 1;
|
||||
card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
|
||||
if (IS_IQD(card))
|
||||
card->qdio.init_pool.buf_count = QETH_IN_BUF_COUNT_HSDEFAULT;
|
||||
|
@ -5141,6 +5135,7 @@ static int qeth_qdio_establish(struct qeth_card *card)
|
|||
struct qdio_buffer **in_sbal_ptrs[QETH_MAX_IN_QUEUES];
|
||||
struct qeth_qib_parms *qib_parms = NULL;
|
||||
struct qdio_initialize init_data;
|
||||
unsigned int no_input_qs = 1;
|
||||
unsigned int i;
|
||||
int rc = 0;
|
||||
|
||||
|
@ -5155,8 +5150,10 @@ static int qeth_qdio_establish(struct qeth_card *card)
|
|||
}
|
||||
|
||||
in_sbal_ptrs[0] = card->qdio.in_q->qdio_bufs;
|
||||
if (card->options.cq == QETH_CQ_ENABLED)
|
||||
if (card->options.cq == QETH_CQ_ENABLED) {
|
||||
in_sbal_ptrs[1] = card->qdio.c_q->qdio_bufs;
|
||||
no_input_qs++;
|
||||
}
|
||||
|
||||
for (i = 0; i < card->qdio.no_out_queues; i++)
|
||||
out_sbal_ptrs[i] = card->qdio.out_qs[i]->qdio_bufs;
|
||||
|
@ -5166,7 +5163,7 @@ static int qeth_qdio_establish(struct qeth_card *card)
|
|||
QDIO_QETH_QFMT;
|
||||
init_data.qib_param_field_format = 0;
|
||||
init_data.qib_param_field = (void *)qib_parms;
|
||||
init_data.no_input_qs = card->qdio.no_in_queues;
|
||||
init_data.no_input_qs = no_input_qs;
|
||||
init_data.no_output_qs = card->qdio.no_out_queues;
|
||||
init_data.input_handler = qeth_qdio_input_handler;
|
||||
init_data.output_handler = qeth_qdio_output_handler;
|
||||
|
|
Loading…
Reference in New Issue