From: Vineeth Vijayan Date: Tue, 28 Apr 2026 08:43:41 +0000 (+0200) Subject: s390/cio: Purge based on the cdev's online status X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=58d50cad63e85daae032924ecc3d457fb1ec02fb;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Peter Oberparleiter Signed-off-by: Alexander Gordeev --- diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 5bbb112b1619a..fb591118ecb2a 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)