From patchwork Sat Jun 29 12:24:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ren=C3=A9_van_Dorst?= X-Patchwork-Id: 11023919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43D8413B1 for ; Sat, 29 Jun 2019 12:24:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 329EF28737 for ; Sat, 29 Jun 2019 12:24:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25D29287FB; Sat, 29 Jun 2019 12:24:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8F36A28737 for ; Sat, 29 Jun 2019 12:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mxugKpYuFbHnxy/Cb7zsvvAUj5ilwpdbx7qRxdIM5Gc=; b=qgk1KgZwlusVIi 1jBd5SZdU+RdhRHOdYAJVJYcjmQtk0EhTSFSwPmVJCqJOuZ+1GcmJ5HCKBXrs09n58gl4/6Eg/wDz GzbptzM3D+Vip+U9IKk1FpIgnq6rF4jBlrCFva3qcZXNsd4WbxYRsejwtlnOXkALgb8CpzssUsk7T iq/EYxyR02b9yFib0Rc40hH7rEdzhOME1Jdk2AvK9K9RE7omFiOy24EVZ+/mqd6LhH6QqL3erlxRH n64Ypc+RTa69Vz5bItwNKqKTXOB/JBeprXmW8RIcMSl+tclRW61HtcxZoEyeqfG1m/BdRiDTTTSV7 yIPpyNr7v/Pz/+aVftFA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhCPI-0007F8-6Q; Sat, 29 Jun 2019 12:24:40 +0000 Received: from mx.0dd.nl ([2a04:52c0:101:921::25]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhCPF-0007Cy-9r for linux-mediatek@lists.infradead.org; Sat, 29 Jun 2019 12:24:39 +0000 Received: from mail.vdorst.com (mail.vdorst.com [IPv6:fd01::250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.0dd.nl (Postfix) with ESMTPS id E3A885FE8C; Sat, 29 Jun 2019 14:24:32 +0200 (CEST) Authentication-Results: mx.0dd.nl; dkim=pass (2048-bit key) header.d=vdorst.com header.i=@vdorst.com header.b="navb87/B"; dkim-atps=neutral Received: from pc-rene.vdorst.com (pc-rene.vdorst.com [192.168.2.125]) by mail.vdorst.com (Postfix) with ESMTPA id 9732F1CE6915; Sat, 29 Jun 2019 14:24:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.vdorst.com 9732F1CE6915 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vdorst.com; s=default; t=1561811072; bh=S+aJCigz6fwF72k/RqnynZOytfAg53dL/P7AVyy/NFk=; h=From:To:Cc:Subject:Date:From; b=navb87/BGORIBmdir2smL2aIK21EEZq2HP+PltawpWQYfmzKTjVx+3QYR67t7AhRX L7UDL5GxjJt/Id8r6I6XZZ7rqhVh/KtetRwoi3HNDedY6/TeydYoZHgFcVew8CUOzh bWNsobgeyJ6htLWRdiQ1DpEJZX2VLrl8sOkNUTi6iIAzyJ6sEsWVkF+F6CI08eJ/1G IPKKdGoPV3wurvB4l4/UZG0x9/7RHUoMqw4dsYVSOAOJPC+LSLo3QWxBv93lg3uFXK 97R3GO41An50a3+Z8CD1065fnJjMAr/Gvf8aFWyuKmAnc6/LdVyzrCwWmtkOFDSLvH gM+XEOYFWBMtw== From: =?utf-8?q?Ren=C3=A9_van_Dorst?= To: sean.wang@mediatek.com, f.fainelli@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, matthias.bgg@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com Subject: [PATCH] net: ethernet: mediatek: Fix overlapping capability bits. Date: Sat, 29 Jun 2019 14:24:19 +0200 Message-Id: <20190629122419.19026-1-opensource@vdorst.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_052437_659218_243E9EFA X-CRM114-Status: GOOD ( 10.30 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Ren=C3=A9_van_Dorst?= , netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org, frank-w@public-files.de Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10. This causes issues on non-MT7621 devices which has the MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) capability set. The wrong TRGMII setup code is executed. Moving the MTK_PATH_BIT to bit 11 fixes the issue. Fixes: 8efaa653a8a5 ("net: ethernet: mediatek: Add MT7621 TRGMII mode support") Signed-off-by: René van Dorst --- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h index 876ce6798709..2cb8a915731c 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -626,7 +626,7 @@ enum mtk_eth_path { #define MTK_TRGMII_MT7621_CLK BIT(10) /* Supported path present on SoCs */ -#define MTK_PATH_BIT(x) BIT((x) + 10) +#define MTK_PATH_BIT(x) BIT((x) + 11) #define MTK_GMAC1_RGMII \ (MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) | MTK_RGMII)