Re: [RFC PATCH v4 3/4] vfio-ccw: Reset FSM state to IDLE inside FSM

Cornelia Huck
2021-04-15T10:54:40Z

On Tue, 13 Apr 2021 20:24:09 +0200
Eric Farman <farman@linux.ibm.com> wrote:

> When an I/O request is made, the fsm_io_request() routine
> moves the FSM state from IDLE to CP_PROCESSING, and then
> fsm_io_helper() moves it to CP_PENDING if the START SUBCHANNEL
> received a cc0. Yet, the error case to go from CP_PROCESSING
> back to IDLE is done after the FSM call returns.
>
> Let's move this up into the FSM proper, to provide some
> better symmetry when unwinding in this case.
>
> Signed-off-by: Eric Farman <farman@linux.ibm.com>
> ---
> drivers/s390/cio/vfio_ccw_fsm.c | 1 +
> drivers/s390/cio/vfio_ccw_ops.c | 2 --
> 2 files changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>