summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineeth Vijayan <vneethv@linux.ibm.com>2026-04-28 11:43:41 +0300
committerAlexander Gordeev <agordeev@linux.ibm.com>2026-05-05 11:12:47 +0300
commit58d50cad63e85daae032924ecc3d457fb1ec02fb (patch)
tree95f6b872e36f939c2f9a1d8f8a4e26883cb49255
parenta59b9cb8596ce82a5a8d4dda417e1a721158ed53 (diff)
downloadlinux-58d50cad63e85daae032924ecc3d457fb1ec02fb.tar.xz
s390/cio: Purge based on the cdev's online status
Ensure that all devices currently offline are purged correctly. Previously, purging logic relied on the internal FSM state to determine whether a device was offline. However, devices with a target state of offline could be skipped if CIO internal processing was still ongoing during the purge operation. Update the purge decision logic to rely on the online variable in the cdev structure instead of the internal FSM state, providing a more reliable indication of actual device availability. Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
-rw-r--r--drivers/s390/cio/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 5bbb112b1619..fb591118ecb2 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1328,7 +1328,7 @@ static int purge_fn(struct subchannel *sch, void *data)
cdev = sch_get_cdev(sch);
if (cdev) {
- if (cdev->private->state != DEV_STATE_OFFLINE)
+ if (cdev->online)
goto unlock;
if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0)