Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6031684pxu; Wed, 23 Dec 2020 11:28:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGPmUtDr+l/33rc5p9riHr77w/NztvG9wgHs+dTG4fuVxm4pAZ9EHDbZBw2fn8RHMbwQLC X-Received: by 2002:aa7:d3cc:: with SMTP id o12mr27159069edr.235.1608751710857; Wed, 23 Dec 2020 11:28:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608751710; cv=none; d=google.com; s=arc-20160816; b=hhCSZGPLHXgIgaTfYt1zjcVOHas+hNn05JP9Mge5Iwbf8C56pBfhkZxaxy0ijCuIMr r8dLyqNO3aERjyjc1SenswzSsUbJ1j4aHtqw9vPgT5UMXsUUMyumGNcdyUcSPEUkPTgx bAgSss+1KJDYup5ulqxl9KxtAdcY9iEzayOPgstCQon5yaaejYQYEPx01+4kv+o5HOdn FaeXTo/MiqsADd9sGxxcGKmGafREgY6qIjLBtrZIfaXrxBjH719thtcWnjF0LvXx7Kvk pJoNncshSDAlLZJDTqQYNWD9+DGiCm/6Rn31Ydwtrkud3d2Kp/rykE1uSxW1iXdF1wzK dmZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=x+lck0xGYv0vAIIv61NvXS3xyK0J+DnEV+78Vle6uCo=; b=zOziffX2mdekKIKBFKYGzcVhleCKtKfWxd/LbKu3ugYLE+MjPtHw4hDBYrsOGD9BZT 8p2rey0hBgcLdxKHVmCfbSzMITLiOZsTFOAX5eqJHkfHXOzUmLxdormGIp0vDBlZjipj 5uMxdS8p8Tj5fBmcLFOeMurXbM/1n3BNoI9IKyfFy+7a/SiWaT9fCtmGx8xajfzlPA3e QdIVoNSntoj4KVr/wrF4dk5K82ELVx8P7311sp5IsHlPoI+/6l3fQSQcGGznXls0Q2d5 oKDGObwRVCu++tpt1r363OB8x7tLzTPS1TFtQ75bTsUXA481jnUriuyTqSnN9CMLn7dF g9JQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si11726963ejj.456.2020.12.23.11.28.08; Wed, 23 Dec 2020 11:28:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728345AbgLWTZa (ORCPT + 99 others); Wed, 23 Dec 2020 14:25:30 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:39002 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbgLWTZ3 (ORCPT ); Wed, 23 Dec 2020 14:25:29 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1ks9kX-00DdoZ-Aj; Wed, 23 Dec 2020 20:24:41 +0100 Date: Wed, 23 Dec 2020 20:24:41 +0100 From: Andrew Lunn To: Charles Keepax Cc: nicolas.ferre@microchip.com, claudiu.beznea@microchip.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag on Zynq Message-ID: <20201223192441.GH3198262@lunn.ch> References: <20201223184144.7428-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201223184144.7428-1-ckeepax@opensource.cirrus.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 23, 2020 at 06:41:44PM +0000, Charles Keepax wrote: > A new flag MACB_CAPS_CLK_HW_CHG was added and all callers of > macb_set_tx_clk were gated on the presence of this flag. > > if (!bp->tx_clk || !(bp->caps & MACB_CAPS_CLK_HW_CHG)) > > However the flag was not added to anything other than the new > sama7g5_gem, turning that function call into a no op for all other > systems. This breaks the networking on Zynq. I'm not sure this is the correct fix. I think the original patch might be broken. Look at the commit message wording: The patch adds a new capability so that macb_set_tx_clock() to not be called for IPs having this capability So MACB_CAPS_CLK_HW_CHG disables something, not enables it. So i suspect this if statement is wrong and needs fixing. Andrew