aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/qdio_main.c
diff options
context:
space:
mode:
authorJan Glauber <jang@linux.vnet.ibm.com>2011-01-05 06:47:49 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-01-05 06:47:28 -0500
commit4f325184f2d4c1f2258873b2a333005dc4dfcbc0 (patch)
treee69a7940ca8d51a6e1f639cf4df0b5e33925d357 /drivers/s390/cio/qdio_main.c
parent078f8ecaa30718694d1e13d9f415b7ce75b3c968 (diff)
[S390] qdio: prevent race for shared indicators
If the shared indicator is used the following race leads to an inbound stall: Device CPU0 CPU1 ======================================================== non-shared DSCI =>1 ALSI => 1 Thin INT ALSI => 0 non-shared DSCI tasklets scheduled shared DSCI => 1 ALSI => 1 shared DSCI => 0 ALSI ? -> set Thin INT ALSI => 0 ALSI was set, shared DSCI => 1 After that no more interrupts occur because the DSCI is still set. Fix that race by only resetting the shared DSCI if it was actually set so the tasklets for all shared devices are scheduled and will run after the interrupt. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/qdio_main.c')
-rw-r--r--drivers/s390/cio/qdio_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index 194ea8c182b2..6621de94f3ad 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -1552,7 +1552,7 @@ int qdio_start_irq(struct ccw_device *cdev, int nr)
1552 1552
1553 WARN_ON(queue_irqs_enabled(q)); 1553 WARN_ON(queue_irqs_enabled(q));
1554 1554
1555 if (!shared_ind(q->irq_ptr)) 1555 if (!shared_ind(q->irq_ptr->dsci))
1556 xchg(q->irq_ptr->dsci, 0); 1556 xchg(q->irq_ptr->dsci, 0);
1557 1557
1558 qdio_stop_polling(q); 1558 qdio_stop_polling(q);
@@ -1562,7 +1562,7 @@ int qdio_start_irq(struct ccw_device *cdev, int nr)
1562 * We need to check again to not lose initiative after 1562 * We need to check again to not lose initiative after
1563 * resetting the ACK state. 1563 * resetting the ACK state.
1564 */ 1564 */
1565 if (!shared_ind(q->irq_ptr) && *q->irq_ptr->dsci) 1565 if (!shared_ind(q->irq_ptr->dsci) && *q->irq_ptr->dsci)
1566 goto rescan; 1566 goto rescan;
1567 if (!qdio_inbound_q_done(q)) 1567 if (!qdio_inbound_q_done(q))
1568 goto rescan; 1568 goto rescan;