[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>
This commit is contained in:
Jan Glauber
2011-01-05 12:47:49 +01:00
committad av Martin Schwidefsky
förälder 078f8ecaa3
incheckning 4f325184f2
3 ändrade filer med 13 tillägg och 49 borttagningar

Visa fil

@@ -423,9 +423,9 @@ struct indicator_t {
extern struct indicator_t *q_indicators;
static inline int shared_ind(struct qdio_irq *irq_ptr)
static inline int shared_ind(u32 *dsci)
{
return irq_ptr->dsci == &q_indicators[TIQDIO_SHARED_IND].ind;
return dsci == &q_indicators[TIQDIO_SHARED_IND].ind;
}
/* prototypes for thin interrupt */