]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] cio: fix I/O cancel function
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Mon, 25 Oct 2010 14:10:44 +0000 (16:10 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 25 Oct 2010 14:10:20 +0000 (16:10 +0200)
commit1719ac56c1a7524e7dcae568aff53f16fb6054ba
treede54c8315a5a5c2149131e22fac3daf6291ef9fa
parentb1f7929ef412ab39e5fb553b2dbed4c6f0a19a68
[S390] cio: fix I/O cancel function

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: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device.c
drivers/s390/cio/device_fsm.c