Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14129028pxu; Mon, 4 Jan 2021 13:33:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJy32Gzm8h/PpUbGyWhj1GtI0jMyecu8wWRyS0Poe8ZqRvhaFL8J4vH+Rez7P3TeWfH1pJnx X-Received: by 2002:aa7:c603:: with SMTP id h3mr68879826edq.254.1609796021645; Mon, 04 Jan 2021 13:33:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609796021; cv=none; d=google.com; s=arc-20160816; b=e7CRk/YrN3xXH0qRuyZtbAqZROYe5giH91lzuv0kalaaN46CINwq3+YndT76n8sBAO 6fUqPsb1+8sDbY+JGh9Fs0CgBQcLWH8NhrHpFHDgthXQDLqBeuHmUxCkYcbHhD1UO+VZ nUG2tI6mKHqcrOBRawZeFJyssr7BCq41+bgcVfrT7iveg+itns9uWb98ogCasLqx45W6 k1lqTjR0s0/AbR8j5JfKOvAByilv3qLDOKZy46N+hl08h+lscPQYcGSnk6onxvBK5B8I yHf1WduY0MMUUgjzGn7WXhZf89ta5RW91IvZacSAMLNYCnNRv7sefRQ1xrfXxqCYH26f 6Dlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=rv0iWmCJDt2gB+vmnbjWJ5OdybXZLPI+Fqd12M0lqhI=; b=APnRyqYaGMgyXGCp4AdO97CxorMZKKgfAMbt0+brkc0VIAXVLprTnwiR2jfdtiKdFb qohFd6V0p1HV3vX/REyrlEhTc67irG4PVO3VRltdCAHlppipfNEWX1AF9ewpBFXYjMqC l7YfWg3m1cBEaT3DixRor/xYla52lvkZCeJpybkq05Vg1OG/hwHNTD9YHTA6HF4L8X+H EptBkJ1Dk3/AaSIwJPhzYE63p+VC2dpmdn+WFy+dcQ1kSAcPw4Ld2wP8JrYp73LP7xlc W8OmAqZvW5D0TwXaQT3hdKsqLS0XV+TCWuRnjjJ3mIeMhpNAWkFGCh0ONFPAK9xdGp25 5plA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P6MV5U+B; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z27si33445035edl.135.2021.01.04.13.33.18; Mon, 04 Jan 2021 13:33:41 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P6MV5U+B; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbhADVas (ORCPT + 99 others); Mon, 4 Jan 2021 16:30:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:40428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbhADVar (ORCPT ); Mon, 4 Jan 2021 16:30:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BDFEC21919; Mon, 4 Jan 2021 21:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609795807; bh=H9RUiNpIWRm/wv7ST2Oq9S84uH9VPteE0U4ucsX6avA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P6MV5U+Bglr8KEmEnTFyrC5nZln7hmq9wyul6rjsaLtkyGfzGTQq8laytQoROjuLP vIvn7h64wPLvr97NtbcvxBNfr+9AtJLWRGgI+JKVCMgRDPDA225FGCrqiKpodAr9Yo OrTvho4lNAcKHX+hBxzm7ZLDWW3dgwewmPmObiug1DJADXr8C5A29knsU+eTCcX/qy 9XftsBrpJ+ymb2dQgqu8R4tQFvtg96VZUhO6h+3MpuUW+uiOoTExqLh1ZbPOTU0QnH uQu6UeurNc51xsQZKm7VUh8weYfGpvf6wpGOWNAfi0Trdo7I4F7iTJNdsHaemb42zq J+oeB1Wd5grIg== Date: Mon, 4 Jan 2021 13:30:05 -0800 From: Jakub Kicinski To: Andrew Lunn , Charles Keepax Cc: nicolas.ferre@microchip.com, claudiu.beznea@microchip.com, davem@davemloft.net, 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: <20210104133005.22c5488d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20210104103802.13091-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Jan 2021 15:18:50 +0100 Andrew Lunn wrote: > 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 Applied, thanks!