mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 21:14:44 +08:00
s390/qdio: clear intparm during shutdown
During shutdown, qdio returns its ccw device back to control by the upper-layer driver. But there is a remote chance that by the time where the IRQ handler gets switched back, the interrupt for the preceding ccw_device_{clear,halt} hasn't been presented yet. Upper-layer drivers would then need to handle this IRQ - and since the IO is issued with an intparm, it could very well be confused with whatever intparm mechanism the driver uses itself (eg intparm == request address). So when switching over the IRQ handler, also clear the intparm and have upper-layer drivers deal with any such delayed interrupt as if it was unsolicited. Suggested-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
ab7efda477
commit
89286320a2
@ -1207,8 +1207,10 @@ no_cleanup:
|
|||||||
qdio_shutdown_thinint(irq_ptr);
|
qdio_shutdown_thinint(irq_ptr);
|
||||||
|
|
||||||
/* restore interrupt handler */
|
/* restore interrupt handler */
|
||||||
if ((void *)cdev->handler == (void *)qdio_int_handler)
|
if ((void *)cdev->handler == (void *)qdio_int_handler) {
|
||||||
cdev->handler = irq_ptr->orig_handler;
|
cdev->handler = irq_ptr->orig_handler;
|
||||||
|
cdev->private->intparm = 0;
|
||||||
|
}
|
||||||
spin_unlock_irq(get_ccwdev_lock(cdev));
|
spin_unlock_irq(get_ccwdev_lock(cdev));
|
||||||
|
|
||||||
qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE);
|
qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE);
|
||||||
|
Loading…
Reference in New Issue
Block a user