Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2736512pxb; Mon, 25 Apr 2022 00:56:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvHdw7mcdeXRklYsMHe6aiO36d0nuzHYRDNtChMRMJL9VvXece4+DX4ELCRytam6c8PSMf X-Received: by 2002:a05:6402:90c:b0:415:d340:4ae2 with SMTP id g12-20020a056402090c00b00415d3404ae2mr17666274edz.331.1650873375065; Mon, 25 Apr 2022 00:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650873375; cv=none; d=google.com; s=arc-20160816; b=Z3uV9ajF1YDNPoMU4M8Eaxh4UOtP4LpEoEPRPUSgV4uSdawmOKO7XEcQNd45omoHpn trgh/CsUmzs5FYWM6qWz/Zsth3QJc5QXjE8e9sqRIEx5y5j6CZVHh+u7cD4qlL4xvI1G gfAz1j7ZJF51x+/+Lh7jIA41WDcjt+LNil3B6Oq1f2p1D1VX7I7oIDdN/h7CIjiZ/yM5 jfwNlrEdaIs5/2gDU4Dhibd/3M3LewrVeeEo46uMxHu6D/rw9gQxWWfIvyomE5KOdZS4 9SB+4y8JoIg5xCLbPAwHaB/nD8wG0GrM4gtopmIfTu8F+QJNBg6xelBS0fgKL60Dko6j U98A== 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=/+oUpWsSFnwFSNYj93/jtRNiA9hyY8e9an1A9rZQWEw=; b=kr0cgCOvlVEn+W7qXJ1MDtVxWKR1GGEtCiWQKciEM0KUKKUb/G0ShDXMz8Q9nYs0lS FQd5+5EuJmVhPWThiNRErQD6C5u1zCxFcRbH/6jkdCt4/BIokbEE1G15r3osWEuY9mIY Wn047eNO2qbM/f+2cT8GmJuEtHYI2NItuZmzYnJAiQuLv2VLmli23W5DnWlwkLx1Vd/U j5OHtoValQ3XN27a+NBiV/OdVlMGttZeiI/HUiIpe5C5UkwOh67qztsvTzvkIixFoYRO OsFfIZ4Snl48DEBdY4HRlwdrYqXsPLg0nppnatavxJ1dHKMObs9Iw67kOt1yS9nllNA5 HuYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UyPBSsw5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id op21-20020a170906bcf500b006f383388773si3847000ejb.889.2022.04.25.00.55.51; Mon, 25 Apr 2022 00:56:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UyPBSsw5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239052AbiDXThJ (ORCPT + 99 others); Sun, 24 Apr 2022 15:37:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbiDXThH (ORCPT ); Sun, 24 Apr 2022 15:37:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 441BA35865; Sun, 24 Apr 2022 12:34:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D9353612E8; Sun, 24 Apr 2022 19:34:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7ACFC385A7; Sun, 24 Apr 2022 19:34:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650828845; bh=1yTMsjzIPbHZvzGsCO7P4g2pcIygu8eX0O+Bh6QMs4g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UyPBSsw5JlCD9LjskAiB6XHMmthvmaAWNa8rv8AdALS5/VS5sm0SeKb5dpABbJEVt cN4HeUjQd/0ZCQ1jFRXXU5wutcGWW6E+9KpzKNsQRtZTCAQTsqwpYUD1DfQRfaFF1q IO/DJUVpV99kaLATYD80QFegSRxRQggpVnArXr6oaerzFVxC3QEwDjATfnnrcrxRQc pn/a6VY3OKpvCuDWRV51NrnbpSwz3K0D/jgKd8WTuFwyvJUM4kMKbInGOhrzhsUGes eEiNYHKlhM4RI8StNcZB0yfmAVYBGddWlopdp9MSlry2XFM5BtqgM7DOw9W/sC/uP1 CcY+U9rv47PKw== Date: Sun, 24 Apr 2022 21:33:59 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Andrew Lunn Cc: Nathan Rossi , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Paolo Abeni Subject: Re: [PATCH v2] net: dsa: mv88e6xxx: Fix port_hidden_wait to account for port_base_addr Message-ID: <20220424213359.246cd5ab@thinkpad> In-Reply-To: References: <20220424153143.323338-1-nathan@nathanrossi.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 24 Apr 2022 21:26:58 +0200 Andrew Lunn wrote: > On Sun, Apr 24, 2022 at 03:31:43PM +0000, Nathan Rossi wrote: > > The other port_hidden functions rely on the port_read/port_write > > functions to access the hidden control port. These functions apply the > > offset for port_base_addr where applicable. Update port_hidden_wait to > > use the port_wait_bit so that port_base_addr offsets are accounted for > > when waiting for the busy bit to change. > > > > Without the offset the port_hidden_wait function would timeout on > > devices that have a non-zero port_base_addr (e.g. MV88E6141), however > > devices that have a zero port_base_addr would operate correctly (e.g. > > MV88E6390). > > > > Fixes: ea89098ef9a5 ("net: dsa: mv88x6xxx: mv88e6390 errata") > > That is further back than needed. And due to the code moving around > and getting renamed, you are added extra burden on those doing the > back port for no actual gain. > > Please verify what i suggested, 609070133aff1 is better and then > repost. The bug was introduced by ea89098ef9a5. 609070133aff1 is only requirement for this fix, but Fixes tag should reference the commit which introduced the bug, afaik. So it should be Fixes: ea89098ef9a5 ("net: dsa: mv88x6xxx: mv88e6390 errata") Cc: stable@vger.kernel.org # 609070133aff ("net: dsa: mv88e6xxx: update code operating on hidden registers") Marek