net/macb: fix the peripheral version test
authorNicolas Ferre <nicolas.ferre@atmel.com>
Tue, 31 Mar 2015 13:02:05 +0000 (15:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Mar 2015 20:51:17 +0000 (16:51 -0400)
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>
Cc: <stable@vger.kernel.org> #4.0 (if it doesn't make it for -final)
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.c

index babe972a7c320e5c4e04fb87acc316df23cc4ab6..4412895cf4a8d89e7cce41443aa8e48cd1a03854 100644 (file)
@@ -2139,7 +2139,7 @@ static void macb_configure_caps(struct macb *bp, const struct macb_config *dt_co
        if (dt_conf)
                bp->caps = dt_conf->caps;
 
-       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)) {
This page took 0.033973 seconds and 5 git commands to generate.