1
0
Fork 0

s390/cio: fix IO subchannel event race

If the subchannel event function is called from IRQ context and we
observe that the subchannel in question is gone we flag the attached
device as not operational and schedule the event function to be called
again from process context where the subchannel gets deregistered.
However if the subchannel reappeared at the time the event function
gets called from process context we would do nothing and leave the
device in not operational state. Recognize this case in sch_get_action
and trigger reexamination of the subchannel/device.

Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
hifive-unleashed-5.1
Sebastian Ott 2012-09-05 14:19:42 +02:00 committed by Martin Schwidefsky
parent 1f08be80be
commit 43d0be75af
1 changed files with 2 additions and 0 deletions

View File

@ -1426,6 +1426,8 @@ static enum io_sch_action sch_get_action(struct subchannel *sch)
return IO_SCH_REPROBE;
if (cdev->online)
return IO_SCH_VERIFY;
if (cdev->private->state == DEV_STATE_NOT_OPER)
return IO_SCH_UNREG_ATTACH;
return IO_SCH_NOP;
}