Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2688016pxb; Sun, 24 Apr 2022 23:27:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0mpC6c7/7MCtnZpPRQXbCh1yMdca4MHuQW0uRg2Ks7JNlVExuOjCwITKVaSqa4MfRKpIe X-Received: by 2002:a05:6a00:130e:b0:4f3:9654:266d with SMTP id j14-20020a056a00130e00b004f39654266dmr17270197pfu.59.1650868078699; Sun, 24 Apr 2022 23:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650868078; cv=none; d=google.com; s=arc-20160816; b=ylEV8IpRdHjymlS+Sat7Vq9+kBV67o5CJppb50AKqY3h3KWqh2pdihUSBhqj83vO/P dtNkPuZTfopbwcWyIAHs37RH7eiycVwd1cWxJbqyDdYypFkoeEbJ4sJmX+qEhhFej3dM v8slz+T81chzAO0YV1Tj0e/MYgGGxZCDqtpG26kVDNOG7YCms1cAA9t5Univ8iyorUhY y8/ICOqW7V9FAAOHP3u5BB8LnyxoNnO4rBb+l418YZgYi9s5DGBCDFTmpVU/Blb2CAux k+KCot+TghMwTMKQXGRQSeJBoQvMMz2Yod9UfcRQFfp9xuwME/KJ9ScEdx44SD5B8x5A jcbg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qEUBBBtfizPnF2ZREwqHESf7fpz3AdIcPRP7AfUvFIk=; b=QKM6SAAnnHMwGVr2HPMf0CvL6ioSNnmTtUt6956IFXElXXrrIe1jXEpEMphz1u+CfU LpVri/cUSZCEHCgE6AgKbQjqPU1Bka5lbK8H+4tIt2p9dy8EniIGYzEFf8eB6jFDa7lh trK1UwxP12bR3hb/5QJlJY3IByCGmq44KyvmPUwzMDTawWp77OHbGtDB3vumW91kz+M2 JMsIWRCJYs5NwLfOmNknMWkk/dOYcgRXYHzHfi5LVA4rdhaN8Y58YltG7+w44Ze4w9ri D+eQ/Wmb5q3gnDgPq6A5gaEbqMjv/AC3hiZLHZoAY9aPB6KO/s8GFKfLIrPv0yI11EB8 7Alw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=oYSNA3Qq; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm18-20020a056a00339200b0050a5b062419si16048039pfb.54.2022.04.24.23.27.44; Sun, 24 Apr 2022 23:27:58 -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=@lunn.ch header.s=20171124 header.b=oYSNA3Qq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238061AbiDXTV2 (ORCPT + 99 others); Sun, 24 Apr 2022 15:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236155AbiDXTV0 (ORCPT ); Sun, 24 Apr 2022 15:21:26 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 197DD33EA8; Sun, 24 Apr 2022 12:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=qEUBBBtfizPnF2ZREwqHESf7fpz3AdIcPRP7AfUvFIk=; b=oY SNA3Qq2+dalvye9liAWtt3da+i+RgRuHJDngrkgCF2RwEmlDcv+JFM9131LIVuo227BrgAN3AMJfd 1zqaSoRqCCxvh+mOmLeFRH0alC8I02bKfmn7csP1jHljsOhaQGqBqPpR0snUnzN3tEdcnGri579Q0 1YRgUoYo8jgRdxU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nihkT-00HIb7-M3; Sun, 24 Apr 2022 21:18:21 +0200 Date: Sun, 24 Apr 2022 21:18:21 +0200 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= 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] net: dsa: mv88e6xxx: Fix port_hidden_wait to account for port_base_addr Message-ID: References: <20220424141759.315303-1-nathan@nathanrossi.com> <20220424165228.4030aea6@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220424165228.4030aea6@thinkpad> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED 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, Apr 24, 2022 at 04:52:28PM +0200, Marek Beh?n wrote: > On Sun, 24 Apr 2022 14:17:59 +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). > > So basically the code is accessing the wrong register for devices with > non-zero port_base_addr. This means that the patch should have a Fixes > tag with the commit that introduced this bug, so that it gets > backported to relevant stable versions. > > Could you resend with Fixes tag? I think that would be: Fixes: 609070133aff ("net: dsa: mv88e6xxx: update code operating on hidden registers") That patch moved the code out of chip.c into port_hidden. At the same time, the functions got renamed from mv88e6390_hidden_read() to mv886xxx_hidden_read(). 6390 does have zero-based ports, so was correct before the rename. But the more generic name suggest it should take into account devices which do not have zero based ports. With the fixes tag added and based on met: Reviewed-by: Andrew Lunn Andrew