Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1822708rwb; Tue, 29 Nov 2022 20:42:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf6NtmoJC82cEUs0GNaLmJglIKX6etX3RSHfVP6/K4ynLgO6xYLUsEmzliY4Qsb3JeubnhUU X-Received: by 2002:a17:906:5213:b0:7b6:12ee:b7fc with SMTP id g19-20020a170906521300b007b612eeb7fcmr40080772ejm.265.1669783375177; Tue, 29 Nov 2022 20:42:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669783375; cv=none; d=google.com; s=arc-20160816; b=twSPuDdvW8nuexOcb9qZOUdL/09eT4l36iZc9JSwS9mgzvzie3N/ZgTLrx2HWUY4b/ iC8ZC+sVQtj6K29ZBrzZuTF2wEp+XzZN6KA78B/wDXFGLRz0UTAzjlPiGLOzezDjuqZi SdaEJ1E8i1fw/ZHFZhP8yCPkyw3gjk0pVS4NZGmzTkjrpLA6iT1CFcRk9v9ryW0v2Prh 54g9ABU9+QWvRp4rXvQOeGN91k97aok9m7PBWNxzm//zjPLUu+5rI50XKSwfOqj4IKSq oZN7INCytEJM9d4CeQql6mjNkLxL+mbiCfy98oeisi2p6VbUtwVf8nSVFisEqD0NF53Y JtOQ== 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=hdpQ5VpWphD132uHcgCaCzO/0DdnXz7ph1LMU0ZQlQo=; b=FYQSERzVJ8wxgcrUJ+e4qsOzEyX7ePdAkLt0lKC1cqar/OrLeTQYBbbAHfKyzYCqnm qFyFF/ebLU+7ZO4IvjjoCLDWC5kps0RRMbGl2q8IX2GUNJ1Gn3yA8PgTNm6UDOT1EMgp FcpOl/CGykZ7HvQJHRslW0eFN8rk4J5g8aH8H/km9VH4O4H+ky/+zbXrEcKm61s/D9MI niFn9joeCwKd6rm+HzC8329aqY3ZGm5+HtupGieLertDGV1/ujsDzxFBiG9ISwgSXANi OBrGF98s9Ocd4bzoC6siqd9y9H0AelhLz7BxsV0J+x/5tNSubxUtbcYJmalMGSydVl4S 8bDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QurYTJW3; 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 y25-20020a50e619000000b00467570d605dsi387920edm.614.2022.11.29.20.42.34; Tue, 29 Nov 2022 20:42:55 -0800 (PST) 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=QurYTJW3; 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 S233166AbiK3EgI (ORCPT + 84 others); Tue, 29 Nov 2022 23:36:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233193AbiK3Ef4 (ORCPT ); Tue, 29 Nov 2022 23:35:56 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAB11A1A8; Tue, 29 Nov 2022 20:35:55 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 8E54AB81886; Wed, 30 Nov 2022 04:35:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86811C433C1; Wed, 30 Nov 2022 04:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669782953; bh=x8nbYm06jHz/XeCUDHAODP1xl6lP6WKv6YN0M3Vc+bI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QurYTJW3SxARDl3Sw3bY+lt1m11cmqLXqH3qRoqI6xwtr2l7eBFxuC9haYFh4YL/N ODoWVt9XUI4vr0VpDTyqdbAUGDlCZB6SGW6P3vi2JisG/zL0vqz5PSWXP8a+wrufsV bzHjdFlr4arTwrPCk/SU/O59rd4VWSi119N6EtmpckCJoxc5Yv4x5qxS0hbA6dt2Z+ torc21Va69+/WhGqR/D7b18bbQrrANGFTa6VDSdO2riEQsWcgYWUzbPBadrTttHomB 5lBQ3XNzZmoEgZnPXoNVZNebr/xyzjZeFQjhf94gnhvbveP68ZnyocnQSRPBrMiIvm wq9Ap9pbr0lxQ== Date: Tue, 29 Nov 2022 20:35:51 -0800 From: Jakub Kicinski To: Maxime Chevallier Cc: davem@davemloft.net, Rob Herring , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , devicetree@vger.kernel.org Subject: Re: [PATCH net-next 1/3] net: pcs: altera-tse: use read_poll_timeout to wait for reset Message-ID: <20221129203551.170d93e1@kernel.org> In-Reply-To: <20221125131801.64234-2-maxime.chevallier@bootlin.com> References: <20221125131801.64234-1-maxime.chevallier@bootlin.com> <20221125131801.64234-2-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 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 Fri, 25 Nov 2022 14:17:59 +0100 Maxime Chevallier wrote: > - for (i = 0; i < SGMII_PCS_SW_RESET_TIMEOUT; i++) { > - if (!(tse_pcs_read(tse_pcs, MII_BMCR) & BMCR_RESET)) > - return 0; > - udelay(1); > - } > - > - return -ETIMEDOUT; > + return read_poll_timeout(tse_pcs_read, bmcr, (bmcr & BMCR_RESET), > + 10, SGMII_PCS_SW_RESET_TIMEOUT, 1, > + tse_pcs, MII_BMCR); You say "no functional change intended" in the cover letter but you switch from udelay to usleep and change timeouts here. I presume this is intentional but should be mentioned in the commit message, I think.