From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84A0BC433E0 for ; Thu, 25 Feb 2021 22:53:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 369BD64F26 for ; Thu, 25 Feb 2021 22:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230352AbhBYWxJ (ORCPT ); Thu, 25 Feb 2021 17:53:09 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:58242 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbhBYWxG (ORCPT ); Thu, 25 Feb 2021 17:53:06 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lFPUZ-008TfO-PY; Thu, 25 Feb 2021 23:52:19 +0100 Date: Thu, 25 Feb 2021 23:52:19 +0100 From: Andrew Lunn To: Vladimir Oltean Cc: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, Michael Walle , Claudiu Manoil , Alexandru Marginean , Vladimir Oltean Subject: Re: [PATCH v2 net 3/6] net: enetc: take the MDIO lock only once per NAPI poll cycle Message-ID: References: <20210225121835.3864036-1-olteanv@gmail.com> <20210225121835.3864036-4-olteanv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210225121835.3864036-4-olteanv@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Feb 25, 2021 at 02:18:32PM +0200, Vladimir Oltean wrote: > @@ -327,8 +329,8 @@ static void enetc_get_tx_tstamp(struct enetc_hw *hw, union enetc_tx_bd *txbd, > { > u32 lo, hi, tstamp_lo; > > - lo = enetc_rd(hw, ENETC_SICTR0); > - hi = enetc_rd(hw, ENETC_SICTR1); > + lo = enetc_rd_hot(hw, ENETC_SICTR0); > + hi = enetc_rd_hot(hw, ENETC_SICTR1); > tstamp_lo = le32_to_cpu(txbd->wb.tstamp); > if (lo <= tstamp_lo) > hi -= 1; Hi Vladimir This change is not obvious, and there is no mention of it in the commit message. Please could you explain it. I guess it is to do with enetc_get_tx_tstamp() being called with the MDIO lock held now, when it was not before? Thanks Andrew