s390/qdio: de-duplicate tiqdio_inbound_processing()
authorJulian Wiedmann <jwi@linux.ibm.com>
Fri, 17 Apr 2020 12:20:00 +0000 (14:20 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 28 Apr 2020 11:49:48 +0000 (13:49 +0200)
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>
drivers/s390/cio/qdio_main.c

index ef0be46f3e044eb0021d4bd60a2e7a63ae2c0808..68985871b6bf8cfb3befc8adb6fa9cb89b858e97 100644 (file)
@@ -880,47 +880,17 @@ static inline void qdio_check_outbound_pci_queues(struct qdio_irq *irq)
                        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;
-       int count;
+       struct qdio_q *q = (struct qdio_q *)data;
 
-       qperf_inc(q, tasklet_inbound);
        if (need_siga_sync(q) && need_siga_sync_after_ai(q))
                qdio_sync_queues(q);
 
        /* The interrupt could be caused by a PCI request: */
        qdio_check_outbound_pci_queues(q->irq_ptr);
 
-       count = qdio_inbound_q_moved(q, start);
-       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);
+       __qdio_inbound_processing(q);
 }
 
 static inline void qdio_set_state(struct qdio_irq *irq_ptr,