]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
fsi: sbefifo: Don't fail operations when in SBE IPL state
authorEddie James <eajames@linux.ibm.com>
Wed, 26 Jun 2019 18:56:55 +0000 (13:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 19:17:11 +0000 (21:17 +0200)
SBE fifo operations should be allowed while the SBE is in any of the
"IPL" states. Operations should succeed in this state.

Fixes: 9f4a8a2d7f9d fsi/sbefifo: Add driver for the SBE FIFO
Reviewed-by: Joel Stanley <joel@jms.id.au>
Tested-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/1561575415-3282-1-git-send-email-eajames@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fsi/fsi-sbefifo.c

index d92f5b87c251e1248e20fd44708a4d80f759bc00..f54df9ebc8b305bc057533a7ebf283ec43f7b6c2 100644 (file)
@@ -289,11 +289,11 @@ static int sbefifo_check_sbe_state(struct sbefifo *sbefifo)
        switch ((sbm & CFAM_SBM_SBE_STATE_MASK) >> CFAM_SBM_SBE_STATE_SHIFT) {
        case SBE_STATE_UNKNOWN:
                return -ESHUTDOWN;
+       case SBE_STATE_DMT:
+               return -EBUSY;
        case SBE_STATE_IPLING:
        case SBE_STATE_ISTEP:
        case SBE_STATE_MPIPL:
-       case SBE_STATE_DMT:
-               return -EBUSY;
        case SBE_STATE_RUNTIME:
        case SBE_STATE_DUMP: /* Not sure about that one */
                break;