s390/dasd: fix hanging device after clear subchannel
authorStefan Haberland <sth@linux.vnet.ibm.com>
Mon, 8 Aug 2016 12:08:17 +0000 (14:08 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 20 Nov 2016 01:01:32 +0000 (01:01 +0000)
commit5c444714f389bb099d42b526d7f6e3bfd218d5d4
tree2525ca8b2e0054015010ae7947105804a75567ac
parentf121a6c4cba5ab03cddc607a3ceb7897074fb8f2
s390/dasd: fix hanging device after clear subchannel

commit 9ba333dc55cbb9523553df973adb3024d223e905 upstream.

When a device is in a status where CIO has killed all I/O by itself the
interrupt for a clear request may not contain an irb to determine the
clear function. Instead it contains an error pointer -EIO.
This was ignored by the DASD int_handler leading to a hanging device
waiting for a clear interrupt.

Handle -EIO error pointer correctly for requests that are clear pending and
treat the clear as successful.

Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/s390/block/dasd.c