From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97DC4C433E6 for ; Wed, 23 Dec 2020 19:25:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 668DA22510 for ; Wed, 23 Dec 2020 19:25:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728274AbgLWTZa (ORCPT ); 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: netdev@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