s390/qdio: de-duplicate tiqdio_inbound_processing()

Except for some initial thinint-only steps, the processing is identical
to the non-thinint case. So re-use the existing helper.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Julian Wiedmann 2020-04-17 14:20:00 +02:00 committed by Vasily Gorbik
parent d188cac397
commit 9b7012dfc3

View file

@ -880,47 +880,17 @@ static inline void qdio_check_outbound_pci_queues(struct qdio_irq *irq)
qdio_tasklet_schedule(out); qdio_tasklet_schedule(out);
} }
static void __tiqdio_inbound_processing(struct qdio_q *q) void tiqdio_inbound_processing(unsigned long data)
{ {
unsigned int start = q->first_to_check; struct qdio_q *q = (struct qdio_q *)data;
int count;
qperf_inc(q, tasklet_inbound);
if (need_siga_sync(q) && need_siga_sync_after_ai(q)) if (need_siga_sync(q) && need_siga_sync_after_ai(q))
qdio_sync_queues(q); qdio_sync_queues(q);
/* The interrupt could be caused by a PCI request: */ /* The interrupt could be caused by a PCI request: */
qdio_check_outbound_pci_queues(q->irq_ptr); qdio_check_outbound_pci_queues(q->irq_ptr);
count = qdio_inbound_q_moved(q, start); __qdio_inbound_processing(q);
if (count == 0)
return;
start = add_buf(start, count);
q->first_to_check = start;
qdio_kick_handler(q, count);
if (!qdio_inbound_q_done(q, start)) {
qperf_inc(q, tasklet_inbound_resched);
if (!qdio_tasklet_schedule(q))
return;
}
qdio_stop_polling(q);
/*
* We need to check again to not lose initiative after
* resetting the ACK state.
*/
if (!qdio_inbound_q_done(q, start)) {
qperf_inc(q, tasklet_inbound_resched2);
qdio_tasklet_schedule(q);
}
}
void tiqdio_inbound_processing(unsigned long data)
{
struct qdio_q *q = (struct qdio_q *)data;
__tiqdio_inbound_processing(q);
} }
static inline void qdio_set_state(struct qdio_irq *irq_ptr, static inline void qdio_set_state(struct qdio_irq *irq_ptr,