Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935345AbcLUSVH (ORCPT ); Wed, 21 Dec 2016 13:21:07 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:33574 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934820AbcLUSVG (ORCPT ); Wed, 21 Dec 2016 13:21:06 -0500 Date: Wed, 21 Dec 2016 13:21:04 -0500 (EST) Message-Id: <20161221.132104.1026207180067066991.davem@davemloft.net> To: Joao.Pinto@synopsys.com Cc: peppe.cavallaro@st.com, hock.leong.kweh@intel.com, niklas.cassel@axis.com, pavel@ucw.cz, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] stmmac: CSR clock configuration fix From: David Miller In-Reply-To: <6d4c6d15a60c93a8aef5e3e03b9cd64cdcf232c8.1482232420.git.jpinto@synopsys.com> References: <6d4c6d15a60c93a8aef5e3e03b9cd64cdcf232c8.1482232420.git.jpinto@synopsys.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 21 Dec 2016 09:21:48 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 804 Lines: 23 From: Joao Pinto Date: Tue, 20 Dec 2016 11:21:47 +0000 > When testing stmmac with my QoS reference design I checked a problem in the > CSR clock configuration that was impossibilitating the phy discovery, since > every read operation returned 0x0000ffff. This patch fixes the issue. > > Signed-off-by: Joao Pinto This isn't enough. It looks like various parts of this driver set the mask field differently. dwmac1000_core.c and dwmac100_core.c set the mask to be the low bits. But dwmac4_core.c uses GENMASK(11, 8) which means the mask is a value which is shifted up already. So your patch will break chips driven by dwmac4_core.c. In order for your change to be correct you must consolidate all of these various pieces to use the same convention.