Re: [PATCH v1 09/18] vfio/ccw: Create an OPEN FSM Event

Jason Gunthorpe
2022-06-02T19:08:47Z

On Thu, Jun 02, 2022 at 07:19:39PM +0200, Eric Farman wrote:
> 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>
> ---
> drivers/s390/cio/vfio_ccw_drv.c | 9 ++-------
> drivers/s390/cio/vfio_ccw_fsm.c | 21 +++++++++++++++++++++
> drivers/s390/cio/vfio_ccw_private.h | 1 +
> 3 files changed, 24 insertions(+), 7 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason