On Tue, 5 Jun 2018 15:34:52 +0200
Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:
On 04/06/2018 15:52, Cornelia Huck wrote:But all of this is only true after the whole series has been applied,
On Fri, 25 May 2018 12:21:09 +0200This should not be done if the subchannel is not operational.
Pierre Morel <pmorel@xxxxxxxxxxxxxxxxxx> wrote:
Let's move the state change from the IRQ routine to theThis causes a change in behaviour for devices in the notoper state.
Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxxxxxxx>
drivers/s390/cio/vfio_ccw_drv.c | 20 +++++++-------------
drivers/s390/cio/vfio_ccw_fsm.c | 14 ++++++++------
2 files changed, 15 insertions(+), 19 deletions(-)
- vfio_ccw_sch_irq is called
- via the state machine, disabling the subchannel is (re-)triggeredI removed the fsm_disabled_irq() callback from VFIO_CCW_STATE_NOT_OPER
because the subchannel is not even initialized at that moment.
We have no reference to the subchannel.
In the previous driver NOT_OPER and STANDBY were quite the same.
Now NOT_OPER means "we can not operate on this sub channel"
because we do not have it in a correct state (no ISC, no mediated device,
the probe is not finiched)
Now STANDBY means we have the device ready but is disabled.
In this case the software infrastructure is ready and if an interrupt comes
(what should not happen) we will disable the subchannel again.
With your patch:Yes it is queued in any case but the IRQ is really treated only if the
- the work function is queued in any case; eventually, it will change
the device's state to idle (unless we don't have an mdev at that
point in time)
- completion is signaled
I'm not sure that's what we want.
subchannel is in the right state (STANDBY, BUSY, IDLE and QUIESCING).
In the NOT_OPER state we do not have the mdev not the driver initialized.
isn't it? Is there any way to do the changes without breaking things
What would also be very helpful is a sketch of the state machine after
your rework is done. Otherwise, this leaves me a bit unsure about the
intended semantics if I just look at the individual patches.