• Peter Oberparleiter's avatar
    [S390] cio: fix I/O cancel function · 376ae475
    Peter Oberparleiter authored
    Function ccw_device_cancel_halt_clear may cause an unexpected kernel
    panic if a clear function is currently active at the subchannel for
    which it is called. In that case, the iretry counter used to determine
    the number of retries is never initialized, leading to an immediate
    failure of the function which results in a kernel panic.
    
    Fix this by initializing the iretry counter when the function is
    first called. Also replace the kernel panic with a return code: a
    single malfunctioning I/O device should not automatically cause a
    system-wide kernel panic.
    Signed-off-by: default avatarPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    376ae475
device_fsm.c 30.2 KB