From patchwork Tue Mar 31 13:02:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 6129751 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8574BBF4A6 for ; Tue, 31 Mar 2015 13:11:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1DC42014A for ; Tue, 31 Mar 2015 13:11:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21C942015A for ; Tue, 31 Mar 2015 13:11:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ycvt4-0003JX-Il; Tue, 31 Mar 2015 13:07:22 +0000 Received: from eusmtp01.atmel.com ([212.144.249.243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ycvr8-0001DW-49 for linux-arm-kernel@lists.infradead.org; Tue, 31 Mar 2015 13:05:23 +0000 Received: from tenerife.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.2.347.0; Tue, 31 Mar 2015 15:04:56 +0200 From: Nicolas Ferre To: , , "David S. Miller" Subject: [PATCH v2 7/8] net/macb: fix the peripheral version test Date: Tue, 31 Mar 2015 15:02:05 +0200 Message-ID: <1427806926-18887-8-git-send-email-nicolas.ferre@atmel.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1427806926-18887-1-git-send-email-nicolas.ferre@atmel.com> References: <1427806926-18887-1-git-send-email-nicolas.ferre@atmel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150331_060522_407033_1D2FB726 X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: Boris BREZILLON , Nicolas Ferre , linux-kernel@vger.kernel.org, stable@vger.kernel.org, michal.simek@xilinx.com, Alexandre Belloni , punnaia@xilinx.com, Cyrille Pitchen X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: #4.0 (if it doesn't make it for -final) --- Changes in v2: - fix peripheral version test drivers/net/ethernet/cadence/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index babe972a7c32..4412895cf4a8 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -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)) {