]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/qdio: clean up pci_out_supported()
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 30 Oct 2018 07:19:54 +0000 (08:19 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 29 Mar 2019 06:23:49 +0000 (07:23 +0100)
pci_out_supported() currently takes a single queue as parameter, even
though Output IRQ support is a per-device feature. Adjust the parameter,
so that the macro can also be used in code paths with no access to a queue
struct. This allows us to remove the remaining open-coded checks for
QIB_AC_OUTBOUND_PCI_SUPPORTED.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/qdio.h
drivers/s390/cio/qdio_main.c
drivers/s390/cio/qdio_setup.c

index a6f7c2986b94f7a4a7ad24141ea546538ef8455d..2c29141005ca3c6934e5e5a6465905149784ed3a 100644 (file)
@@ -341,8 +341,7 @@ static inline int multicast_outbound(struct qdio_q *q)
               (q->nr == q->irq_ptr->nr_output_qs - 1);
 }
 
-#define pci_out_supported(q) \
-       (q->irq_ptr->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED)
+#define pci_out_supported(irq) ((irq)->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED)
 #define is_qebsm(q)                    (q->irq_ptr->sch_token != 0)
 
 #define need_siga_in(q)                        (q->irq_ptr->siga_flag.input)
index 9537e656e9278d5b9b9861320e39f086a8d94f02..02d515fa10a170319c83baf38cb78c8b000186f3 100644 (file)
@@ -371,7 +371,7 @@ static inline int qdio_siga_input(struct qdio_q *q)
 static inline void qdio_sync_queues(struct qdio_q *q)
 {
        /* PCI capable outbound queues will also be scanned so sync them too */
-       if (pci_out_supported(q))
+       if (pci_out_supported(q->irq_ptr))
                qdio_siga_sync_all(q);
        else
                qdio_siga_sync_q(q);
@@ -718,7 +718,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q)
 
        if (need_siga_sync(q))
                if (((queue_type(q) != QDIO_IQDIO_QFMT) &&
-                   !pci_out_supported(q)) ||
+                   !pci_out_supported(q->irq_ptr)) ||
                    (queue_type(q) == QDIO_IQDIO_QFMT &&
                    multicast_outbound(q)))
                        qdio_siga_sync_q(q);
@@ -843,9 +843,9 @@ static void __qdio_outbound_processing(struct qdio_q *q)
        if (qdio_outbound_q_moved(q))
                qdio_kick_handler(q);
 
-       if (queue_type(q) == QDIO_ZFCP_QFMT)
-               if (!pci_out_supported(q) && !qdio_outbound_q_done(q))
-                       goto sched;
+       if (queue_type(q) == QDIO_ZFCP_QFMT && !pci_out_supported(q->irq_ptr) &&
+           !qdio_outbound_q_done(q))
+               goto sched;
 
        if (q->u.out.pci_out_enabled)
                return;
@@ -883,13 +883,14 @@ void qdio_outbound_timer(struct timer_list *t)
 
 static inline void qdio_check_outbound_after_thinint(struct qdio_q *q)
 {
+       struct qdio_irq *irq = q->irq_ptr;
        struct qdio_q *out;
        int i;
 
-       if (!pci_out_supported(q))
+       if (!pci_out_supported(irq))
                return;
 
-       for_each_output_queue(q->irq_ptr, out, i)
+       for_each_output_queue(irq, out, i)
                if (!qdio_outbound_q_done(out))
                        qdio_tasklet_schedule(out);
 }
@@ -976,7 +977,7 @@ static void qdio_int_handler_pci(struct qdio_irq *irq_ptr)
                }
        }
 
-       if (!(irq_ptr->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED))
+       if (!pci_out_supported(irq_ptr))
                return;
 
        for_each_output_queue(irq_ptr, q, i) {
index a59887fad13e6e11e4300b7863b2487379edd706..99d7d2566a3a8bc3bfb76103dbe1ba7251568860 100644 (file)
@@ -523,7 +523,7 @@ void qdio_print_subchannel_info(struct qdio_irq *irq_ptr,
                 irq_ptr->schid.sch_no,
                 is_thinint_irq(irq_ptr),
                 (irq_ptr->sch_token) ? 1 : 0,
-                (irq_ptr->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED) ? 1 : 0,
+                pci_out_supported(irq_ptr) ? 1 : 0,
                 css_general_characteristics.aif_tdd,
                 (irq_ptr->siga_flag.input) ? "R" : " ",
                 (irq_ptr->siga_flag.output) ? "W" : " ",