]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/cio: unregister the subchannel while purging
authorVineeth Vijayan <vneethv@linux.ibm.com>
Wed, 15 Sep 2021 11:39:16 +0000 (13:39 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 4 Oct 2021 07:49:36 +0000 (09:49 +0200)
The cio_ignore list is used to create and maintain the list of devices
which is to be ignored by Linux. During boot-time, this list is adjusted
and accommodate all the devices which are configured on the HMC
interface. Once these devices are accessible, they are then available to
Linux and set online.

cio_ignore purge function should align with this functionality. But
currently, the subchannel associated with the offline-devices are not
unregistered during purge. Add an explicit subchannel-unregister function
in the purge_fn callback.

Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/cio/device.c

index 8d14569823d73fce10aec218ab15d2f9bae6adce..07a17613fab5878af0b016dc148cb62615a7a086 100644 (file)
@@ -1322,6 +1322,7 @@ static int purge_fn(struct device *dev, void *data)
 {
        struct ccw_device *cdev = to_ccwdev(dev);
        struct ccw_dev_id *id = &cdev->private->dev_id;
+       struct subchannel *sch = to_subchannel(cdev->dev.parent);
 
        spin_lock_irq(cdev->ccwlock);
        if (is_blacklisted(id->ssid, id->devno) &&
@@ -1330,6 +1331,7 @@ static int purge_fn(struct device *dev, void *data)
                CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid,
                              id->devno);
                ccw_device_sched_todo(cdev, CDEV_TODO_UNREG);
+               css_sched_sch_todo(sch, SCH_TODO_UNREG);
                atomic_set(&cdev->private->onoff, 0);
        }
        spin_unlock_irq(cdev->ccwlock);