From: Nicolas Ferre Date: Tue, 31 Mar 2015 13:02:05 +0000 (+0200) Subject: net/macb: fix the peripheral version test X-Git-Tag: v4.0.2~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6181a6b2238de82fed39b0568645ea6a1ff2c6fd;p=thirdparty%2Fkernel%2Fstable.git net/macb: fix the peripheral version test 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 Cc: Michal Simek Cc: Punnaiah Choudary Kalluri Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 81d41539fcbab..77bf1337d179d 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -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)) {