linux-uconsole/drivers/s390
Jan Glauber 002c956aab qdio: clear shared DSCI before scheduling the queue handler
commit b02f0c2ea2 upstream.

The following race can occur with qdio devices that use the shared device
state change indicator:

Device (Shared DSCI)    CPU0                            CPU1
===============================================================================

1. DSCI 0 => 1,
   INT pending
                        2. Thinint handler
                        * si_used = 1
                        * Inbound tasklet_schedule
                        * DSCI 1 => 0

3. DSCI 0 => 1,
   INT pending

                                                        4. Thinint handler
                                                        * si_used = 1
                                                        * Inbound tasklet_schedu
le
                                                           => NOP

                        5. Inbound tasklet run

6. DSCI = 1,
   INT surpressed

                                                        7. DSCI 1 => 0

The race would lead to a stall where new data in the input queue is
not recognized so the device stops working in case of no further traffic.

Fix the race by resetting the DSCI before scheduling the inbound tasklet
so the device generates an interrupt if new data arrives in the above
scenario in step 6.

Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 11:40:44 -07:00
..
block [S390] irq: merge irq.c and s390_ext.c 2011-05-26 09:48:24 +02:00
char [S390] irq: merge irq.c and s390_ext.c 2011-05-26 09:48:24 +02:00
cio qdio: clear shared DSCI before scheduling the queue handler 2011-10-03 11:40:44 -07:00
crypto [S390] ap: skip device registration on type probe failure 2011-05-23 10:24:29 +02:00
kvm [S390] irq: merge irq.c and s390_ext.c 2011-05-26 09:48:24 +02:00
net [S390] qdio: Split SBAL entry flags 2011-06-06 14:14:56 +02:00
scsi [S390] qdio: Split SBAL entry flags 2011-06-06 14:14:56 +02:00
Makefile [S390] split/move machine check handler code 2009-03-26 15:24:10 +01:00