Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2576414pxb; Sun, 24 Apr 2022 19:38:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlPlgzCotCe5ZTnTsPrDIF20NqCPOTVYMy9gQFjXvgc1uTdQjqksm2szQyHTenbttuavvi X-Received: by 2002:aa7:d4c3:0:b0:425:e26d:aee2 with SMTP id t3-20020aa7d4c3000000b00425e26daee2mr4441756edr.64.1650854307474; Sun, 24 Apr 2022 19:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650854307; cv=none; d=google.com; s=arc-20160816; b=Gv3tgkfztLsFNeQT7BZkvRHHGNypO15zkU0AZ5hULa2sPIA+rr0QwxKqTqxAaOFGWg PetX+7teFmkJ2C8PnYOMxtEaYdtmPUmdNUwZA3H3NGOwRyjYSaWRUb7wPacYjNXTV+IX s/9tGtnl2dMfxnUd6ljCo339m/+zUYtgFpXjMM1gnL5Rr/branr84iB8ucmXttEVjgoG V74H39nOCrn5v7hYmR66Q0dzIHA5V9RRCjZpE7xsWLYSpbcghV8qfbl07jbW96XcrksG 3SQeZVxcoRTobhHiuwFJqSXyf85wBHBX6BvW5l3Vp7Po3TQL5qvJn6Qkd3tU8nN8j8Vx ezCQ== 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=vLXSGctaYr3dSvLukQ+7vOuJF8+lCFCej6MdKDYe6Lc=; b=ii6khR4PQSIvw79SqO3Qx6C7XtVvs3bOIYqdOCox+du5Q9y0n5GX77kl41EyQdHiRZ zn0evrSW8wVSqzAuonhKNktSQV0ByYFRK4BJmjW6OHT45q7svVLYXHj1XDwA94XPrSSm 2wcbR1/nQkyXwAAfDEixQxexFroNMKQC1mbMjeai7+8hK6tuwg+OJImO2hztn9cBTRB8 aY0+CSDd3K/OFW6K1c+3Bn1oGALBVbXiHitgcUf13SFhDrKbXIgjbWOc5BJ0c8jCH0/D P0LOOohK8H4FnTiA4HNpHjFFyp8vQYzoVdXK5tMJB0nOAsOOunSXbgnksa9irtaP8XwK eGjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YKQ5u6j6; 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 b11-20020a056402084b00b0041d7943941asi13241189edz.238.2022.04.24.19.37.51; Sun, 24 Apr 2022 19:38:27 -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=YKQ5u6j6; 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 S236407AbiDXRX5 (ORCPT + 99 others); Sun, 24 Apr 2022 13:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236289AbiDXRXz (ORCPT ); Sun, 24 Apr 2022 13:23:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 510B65675F; Sun, 24 Apr 2022 10:20:53 -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 19ECE611DE; Sun, 24 Apr 2022 17:20:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32ED0C385A7; Sun, 24 Apr 2022 17:20:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650820852; bh=8YAkiDCHNS9PdDSByTQ12GIjlNhj3SzM6u+5fNxbJO0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YKQ5u6j6e5I5Oog+kDMGmMr9uNIdmteV8T84bSi60THEFgfwCVfnMfukav2R3rMSe hb7A6oRKc5XLbqzAbUwGEBkyxg67ytcaGZ7UqP5lHohQARzzzqPLPxGObMli4olfzE RjbxRkbwYsykQ8KL3T4VNvJ7XLpdNfaXw/n88bODDbSnK7JyHD/vBqZblaJBXFIT+C KiWu1JbznqX2Uwn4wu/2af6sN7rg94QMvEMewiDOXwK9mHZfX5dZwyf7Lj9CdxyQob xPCpWPrTYW0z83wyRUypkQ0E1qNnciMAr18tvbTkxUt3HUniIYXLxg8991za+bR3sP mcIuUk02voFgw== Date: Sun, 24 Apr 2022 19:20:46 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Nathan Rossi Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , 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: <20220424192046.6f77655a@thinkpad> In-Reply-To: <20220424153143.323338-1-nathan@nathanrossi.com> 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=UTF-8 Content-Transfer-Encoding: quoted-printable 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 15:31:43 +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. >=20 > 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). >=20 > Fixes: ea89098ef9a5 ("net: dsa: mv88x6xxx: mv88e6390 errata") > Signed-off-by: Nathan Rossi > --- > Changes in v2: > - Add fixes > --- > drivers/net/dsa/mv88e6xxx/port_hidden.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/dsa/mv88e6xxx/port_hidden.c b/drivers/net/dsa/mv= 88e6xxx/port_hidden.c > index b49d05f0e1..7a9f9ff6de 100644 > --- a/drivers/net/dsa/mv88e6xxx/port_hidden.c > +++ b/drivers/net/dsa/mv88e6xxx/port_hidden.c > @@ -40,8 +40,9 @@ int mv88e6xxx_port_hidden_wait(struct mv88e6xxx_chip *c= hip) > { > int bit =3D __bf_shf(MV88E6XXX_PORT_RESERVED_1A_BUSY); > =20 > - return mv88e6xxx_wait_bit(chip, MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT, > - MV88E6XXX_PORT_RESERVED_1A, bit, 0); > + return mv88e6xxx_port_wait_bit(chip, > + MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT, > + MV88E6XXX_PORT_RESERVED_1A, bit, 0); > } > =20 > int mv88e6xxx_port_hidden_read(struct mv88e6xxx_chip *chip, int block, i= nt port, Reviewed-by: Marek Beh=C3=BAn