staging: fsl-mc: bus: dpio: fix alter FQ state command
authorHoria Geantă <horia.geanta@nxp.com>
Sat, 22 Apr 2017 06:44:49 +0000 (09:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Apr 2017 12:21:50 +0000 (14:21 +0200)
When checking the response verb, the valid bit should be masked out,
since its value flips depending on what Response Register
(RR0 /RR1) it's been read from.

Fixes: 321eecb06bfb ("bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/dpio/qbman-portal.c

index 2a3ea29..7988612 100644 (file)
@@ -963,7 +963,7 @@ int qbman_swp_alt_fq_state(struct qbman_swp *s, u32 fqid,
        }
 
        /* Decode the outcome */
-       WARN_ON(r->verb != alt_fq_verb);
+       WARN_ON((r->verb & QBMAN_RESULT_MASK) != alt_fq_verb);
 
        /* Determine success or failure */
        if (unlikely(r->rslt != QBMAN_MC_RSLT_OK)) {