Commit f85b2b29 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by Martin Schwidefsky

s390/qdio: clean up pci_out_supported()

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: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: default avatarBenjamin Block <bblock@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 2cc9637c
...@@ -341,8 +341,7 @@ static inline int multicast_outbound(struct qdio_q *q) ...@@ -341,8 +341,7 @@ static inline int multicast_outbound(struct qdio_q *q)
(q->nr == q->irq_ptr->nr_output_qs - 1); (q->nr == q->irq_ptr->nr_output_qs - 1);
} }
#define pci_out_supported(q) \ #define pci_out_supported(irq) ((irq)->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED)
(q->irq_ptr->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED)
#define is_qebsm(q) (q->irq_ptr->sch_token != 0) #define is_qebsm(q) (q->irq_ptr->sch_token != 0)
#define need_siga_in(q) (q->irq_ptr->siga_flag.input) #define need_siga_in(q) (q->irq_ptr->siga_flag.input)
......
...@@ -371,7 +371,7 @@ static inline int qdio_siga_input(struct qdio_q *q) ...@@ -371,7 +371,7 @@ static inline int qdio_siga_input(struct qdio_q *q)
static inline void qdio_sync_queues(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 */ /* 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); qdio_siga_sync_all(q);
else else
qdio_siga_sync_q(q); qdio_siga_sync_q(q);
...@@ -718,7 +718,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q) ...@@ -718,7 +718,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q)
if (need_siga_sync(q)) if (need_siga_sync(q))
if (((queue_type(q) != QDIO_IQDIO_QFMT) && if (((queue_type(q) != QDIO_IQDIO_QFMT) &&
!pci_out_supported(q)) || !pci_out_supported(q->irq_ptr)) ||
(queue_type(q) == QDIO_IQDIO_QFMT && (queue_type(q) == QDIO_IQDIO_QFMT &&
multicast_outbound(q))) multicast_outbound(q)))
qdio_siga_sync_q(q); qdio_siga_sync_q(q);
...@@ -843,9 +843,9 @@ static void __qdio_outbound_processing(struct qdio_q *q) ...@@ -843,9 +843,9 @@ static void __qdio_outbound_processing(struct qdio_q *q)
if (qdio_outbound_q_moved(q)) if (qdio_outbound_q_moved(q))
qdio_kick_handler(q); qdio_kick_handler(q);
if (queue_type(q) == QDIO_ZFCP_QFMT) if (queue_type(q) == QDIO_ZFCP_QFMT && !pci_out_supported(q->irq_ptr) &&
if (!pci_out_supported(q) && !qdio_outbound_q_done(q)) !qdio_outbound_q_done(q))
goto sched; goto sched;
if (q->u.out.pci_out_enabled) if (q->u.out.pci_out_enabled)
return; return;
...@@ -883,13 +883,14 @@ void qdio_outbound_timer(struct timer_list *t) ...@@ -883,13 +883,14 @@ void qdio_outbound_timer(struct timer_list *t)
static inline void qdio_check_outbound_after_thinint(struct qdio_q *q) static inline void qdio_check_outbound_after_thinint(struct qdio_q *q)
{ {
struct qdio_irq *irq = q->irq_ptr;
struct qdio_q *out; struct qdio_q *out;
int i; int i;
if (!pci_out_supported(q)) if (!pci_out_supported(irq))
return; return;
for_each_output_queue(q->irq_ptr, out, i) for_each_output_queue(irq, out, i)
if (!qdio_outbound_q_done(out)) if (!qdio_outbound_q_done(out))
qdio_tasklet_schedule(out); qdio_tasklet_schedule(out);
} }
...@@ -976,7 +977,7 @@ static void qdio_int_handler_pci(struct qdio_irq *irq_ptr) ...@@ -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; return;
for_each_output_queue(irq_ptr, q, i) { for_each_output_queue(irq_ptr, q, i) {
......
...@@ -523,7 +523,7 @@ void qdio_print_subchannel_info(struct qdio_irq *irq_ptr, ...@@ -523,7 +523,7 @@ void qdio_print_subchannel_info(struct qdio_irq *irq_ptr,
irq_ptr->schid.sch_no, irq_ptr->schid.sch_no,
is_thinint_irq(irq_ptr), is_thinint_irq(irq_ptr),
(irq_ptr->sch_token) ? 1 : 0, (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, css_general_characteristics.aif_tdd,
(irq_ptr->siga_flag.input) ? "R" : " ", (irq_ptr->siga_flag.input) ? "R" : " ",
(irq_ptr->siga_flag.output) ? "W" : " ", (irq_ptr->siga_flag.output) ? "W" : " ",
......
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