Patch "vfio/ccw: Do not change FSM state in subchannel event" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    vfio/ccw: Do not change FSM state in subchannel event

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     vfio-ccw-do-not-change-fsm-state-in-subchannel-event.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9bac3735d1dcc187f6c6156a86fc4410fa67d964
Author: Eric Farman <farman@xxxxxxxxxxxxx>
Date:   Thu Jul 7 15:57:29 2022 +0200

    vfio/ccw: Do not change FSM state in subchannel event
    
    [ Upstream commit cffcc109fd682075dee79bade3d60a07152a8fd1 ]
    
    The routine vfio_ccw_sch_event() is tasked with handling subchannel events,
    specifically machine checks, on behalf of vfio-ccw. It correctly calls
    cio_update_schib(), and if that fails (meaning the subchannel is gone)
    it makes an FSM event call to mark the subchannel Not Operational.
    
    If that worked, however, then it decides that if the FSM state was already
    Not Operational (implying the subchannel just came back), then it should
    simply change the FSM to partially- or fully-open.
    
    Remove this trickery, since a subchannel returning will require more
    probing than simply "oh all is well again" to ensure it works correctly.
    
    Fixes: bbe37e4cb8970 ("vfio: ccw: introduce a finite state machine")
    Signed-off-by: Eric Farman <farman@xxxxxxxxxxxxx>
    Reviewed-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220707135737.720765-4-farman@xxxxxxxxxxxxx
    Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index 6cd41086f23e..4b5cdbdcd843 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -193,19 +193,11 @@ static int vfio_ccw_sch_event(struct subchannel *sch, int process)
 	if (work_pending(&sch->todo_work))
 		goto out_unlock;
 
-	if (cio_update_schib(sch)) {
-		vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_NOT_OPER);
-		rc = 0;
-		goto out_unlock;
-	}
-
-	private = dev_get_drvdata(&sch->dev);
-	if (private->state == VFIO_CCW_STATE_NOT_OPER) {
-		private->state = private->mdev ? VFIO_CCW_STATE_IDLE :
-				 VFIO_CCW_STATE_STANDBY;
-	}
 	rc = 0;
 
+	if (cio_update_schib(sch))
+		vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_NOT_OPER);
+
 out_unlock:
 	spin_unlock_irqrestore(sch->lock, flags);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux