Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13854270pxu; Mon, 4 Jan 2021 06:21:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYRP0IT7peBUB432y+0c7xCFDoTqnqeKbdLEBBYqqpOW2KLYqwVmSpwW7IsnvWoPXFsvrG X-Received: by 2002:a17:906:30d3:: with SMTP id b19mr59217256ejb.538.1609770104311; Mon, 04 Jan 2021 06:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609770104; cv=none; d=google.com; s=arc-20160816; b=02KhKXID1fMw/8lbjk+44FgDN2kSYcmShMWCDCLOfAVpvfmDEpJ+bBly6qEL4w0llY YJiU59UPnJaIsOeUumoGB4MShS2d9TwbQ/WlAZSEkV5hMHOOeUSlOojqipjU6Gfy8rgp G0vN2Bjxn9R1TpG5QV4jfm0JDepNtGIE0XHBi5Fa++khpZJppy57YFUEtC4g1Vaegzn0 bLiTGmWJpvchsuAeZXFXjZVg2uQ0XddSVIdwHGEch2ZwR9as4J9n8JOCjT7xkf7dCcCy OrIo1mvOsl5o94OTskMo/oxW4I+SI4Ph/Gjiojcimbafx835a+jTVbH3uYo5UHbo+Yw1 LsgA== 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=Og+AUaxick4SLGgla2aXnl9MyEbzzWqWxzgVMtuWEts=; b=De9JVw+/UFhzX5a8xfNaQMTLd0Mz20DOrwA+msvE0MxB5SWXYf0u7E/J/zWbQS4CMg /z6gGtDVDx1FISIWjBGAj5om/qIUe8hFyPizCm6lpEWkfPRPoylQ6eXsl/ZGfW01r6r7 gjjO+jb/N2hzdPo55BGcB49ORTZ3Uz2PTYHkwLa8tH+2+KTCj5m6QcqlmM7EAQxDmf/R ZigLU7e5TQ5A1nHbUirTsSl83RuxICmSammPAkaOZFArbQD1XR1xsUmKhPvMKHXWR2iZ uCeJ4kq50TYzlUysT3QJQVrxMoVbrCyoYEEF7G7s+uaZ96KR1Y8QqTlRcplFjCSOed+L fHyg== 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 u23si30067445eds.248.2021.01.04.06.21.20; Mon, 04 Jan 2021 06:21:44 -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 S1726921AbhADOTo (ORCPT + 99 others); Mon, 4 Jan 2021 09:19:44 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:48636 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726692AbhADOTo (ORCPT ); Mon, 4 Jan 2021 09:19:44 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kwQh9-00FyJt-0D; Mon, 04 Jan 2021 15:18:51 +0100 Date: Mon, 4 Jan 2021 15:18:50 +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 v3] net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag Message-ID: References: <20210104103802.13091-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210104103802.13091-1-ckeepax@opensource.cirrus.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 04, 2021 at 10:38:02AM +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 (!clk) > + 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. > > The commit message adding this states: a new capability so that > macb_set_tx_clock() to not be called for IPs having this > capability > > This strongly implies that present of the flag was intended to skip > the function not absence of the flag. Update the if statement to > this effect, which repairs the existing users. > > Fixes: daafa1d33cc9 ("net: macb: add capability to not set the clock rate") > Suggested-by: Andrew Lunn > Signed-off-by: Charles Keepax Reviewed-by: Andrew Lunn Andrew