]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/macb: fix the peripheral version test
authorNicolas Ferre <nicolas.ferre@atmel.com>
Tue, 31 Mar 2015 13:02:05 +0000 (15:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:50 +0000 (22:03 +0200)
commit 361918970b7426bba97a64678ef2b2679c37199b upstream.

We currently need two checks of the peripheral version in MACB_MID register.
One of them got out of sync after modification by 8a013a9c71b2 (net: macb:
Include multi queue support for xilinx ZynqMP ethernet version).
Fix this in macb_configure_caps() so that xilinx ZynqMP will be considered
as a GEM flavor.

Fixes: 8a013a9c71b2 ("net: macb: Include multi queue support for xilinx ZynqMP
ethernet version")

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/cadence/macb.c

index 81d41539fcbab8e015d28e4b7729bc4812f60f0a..77bf1337d179d805dafe3c865486c53b4729dd72 100644 (file)
@@ -2165,7 +2165,7 @@ static void macb_configure_caps(struct macb *bp)
                }
        }
 
-       if (MACB_BFEXT(IDNUM, macb_readl(bp, MID)) == 0x2)
+       if (MACB_BFEXT(IDNUM, macb_readl(bp, MID)) >= 0x2)
                bp->caps |= MACB_CAPS_MACB_IS_GEM;
 
        if (macb_is_gem(bp)) {