vfio/ccw: Remove FSM Close from remove handlers
authorEric Farman <farman@linux.ibm.com>
Thu, 28 Jul 2022 20:49:13 +0000 (22:49 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 1 Aug 2022 19:36:47 +0000 (13:36 -0600)
Now that neither vfio_ccw_sch_probe() nor vfio_ccw_mdev_probe()
affect the FSM state, it doesn't make sense for their _remove()
counterparts try to revert things in this way. Since the FSM open
and close are handled alongside MDEV open/close, these are
unnecessary.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20220728204914.2420989-3-farman@linux.ibm.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/s390/cio/vfio_ccw_drv.c
drivers/s390/cio/vfio_ccw_ops.c

index 4804101ccb0f739bee8e0ac57b5d2010f566519a..86d9e428357b0610b37409d7e45c0146a190d4bd 100644 (file)
@@ -241,7 +241,6 @@ static void vfio_ccw_sch_remove(struct subchannel *sch)
 {
        struct vfio_ccw_private *private = dev_get_drvdata(&sch->dev);
 
-       vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_CLOSE);
        mdev_unregister_device(&sch->dev);
 
        dev_set_drvdata(&sch->dev, NULL);
index 3f67fa103c7fd344b67b9481bf1fd11a72009c48..4a806a2273b54ea0ed3ad059ed57cae9ac80bc44 100644 (file)
@@ -130,8 +130,6 @@ static void vfio_ccw_mdev_remove(struct mdev_device *mdev)
 
        vfio_unregister_group_dev(&private->vdev);
 
-       vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_CLOSE);
-
        vfio_uninit_group_dev(&private->vdev);
        atomic_inc(&private->avail);
 }