]> git.baikalelectronics.ru Git - kernel.git/commit
s390/cio: fix ccw_device_start_timeout API
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Tue, 6 Feb 2018 13:59:43 +0000 (14:59 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 22 Feb 2018 09:09:22 +0000 (10:09 +0100)
commitebebe9dab8a93c28a6356e230f4ecc9adad9e4d1
tree3529b1e31395d451cc5c6a6bcd58adb42c0fe9dd
parent3a955dac8963e2e776473dec105befee19192cf8
s390/cio: fix ccw_device_start_timeout API

There are cases a device driver can't start IO because the device is
currently in use by cio. In this case the device driver is notified
when the device is usable again.

Using ccw_device_start_timeout we would set the timeout (and change
an existing timeout) before we test for internal usage. Worst case
this could lead to an unexpected timer deletion.

Fix this by setting the timeout after we test for internal usage.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device_ops.c