staging: fsl-mc/dpio: Fix incorrect masking
authorIoana Radulescu <ruxandra.radulescu@nxp.com>
Tue, 6 Mar 2018 17:43:47 +0000 (11:43 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Mar 2018 17:57:37 +0000 (09:57 -0800)
In qbman_swp_alt_fq_state(), we need to mask the fqid value
before converting it to little endian, otherwise we write a
wrong value to hardware when running in big endian mode.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/dpio/qbman-portal.c

index 022baf5f39c872a5dd7bfb2f7e4b354babb8a392..116fafb2864018667f44e88b27a202e0fe2aa0e6 100644 (file)
@@ -922,7 +922,7 @@ int qbman_swp_alt_fq_state(struct qbman_swp *s, u32 fqid,
        if (!p)
                return -EBUSY;
 
-       p->fqid = cpu_to_le32(fqid) & ALT_FQ_FQID_MASK;
+       p->fqid = cpu_to_le32(fqid & ALT_FQ_FQID_MASK);
 
        /* Complete the management command */
        r = qbman_swp_mc_complete(s, p, alt_fq_verb);