vfio/ccw: Create an OPEN FSM Event
authorEric Farman <farman@linux.ibm.com>
Thu, 7 Jul 2022 13:57:34 +0000 (15:57 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 7 Jul 2022 20:06:12 +0000 (14:06 -0600)
commit62ec0d49e683c25e35927a942c64433878de143c
tree9c22729f655b22a790ca611c0c86e9a1b7af512f
parent4cc2c051c35639787de1b5797de2cd003bbc98ab
vfio/ccw: Create an OPEN FSM Event

Move the process of enabling a subchannel for use by vfio-ccw
into the FSM, such that it can manage the sequence of lifecycle
events for the device.

That is, if the FSM state is NOT_OPER(erational), then do the work
that would enable the subchannel and move the FSM to STANDBY state.
An attempt to perform this event again from any of the other operating
states (IDLE, CP_PROCESSING, CP_PENDING) will convert the device back
to NOT_OPER so the configuration process can be started again.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20220707135737.720765-9-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_fsm.c
drivers/s390/cio/vfio_ccw_private.h