Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 265E7ECAAA1 for ; Thu, 27 Oct 2022 23:15:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235547AbiJ0XPg (ORCPT ); Thu, 27 Oct 2022 19:15:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234705AbiJ0XPf (ORCPT ); Thu, 27 Oct 2022 19:15:35 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2B9C578A9 for ; Thu, 27 Oct 2022 16:15:27 -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-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=5EZlcchJAy25hzFY5raR2BbWbOpbRCxyc+hZqLOPp2g=; b=0YQrv0eebEPzAIS7bxE2xv0YV4 s5aLVYXRBySzpSZkUlbLQZ+JAMxPpQDV6Twe2Oapq7iA8WOqXs6bmIf72F4N7JPgG3Ipp/+lm//pd UJ651TE+pb0z9zAkSen8TNUWkyg4MEBUMx0nyXouZZB3ApdiHpJpIt9wn33OBfka+PKI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ooC5C-000lBX-HR; Fri, 28 Oct 2022 01:14:42 +0200 Date: Fri, 28 Oct 2022 01:14:42 +0200 From: Andrew Lunn To: David Thompson Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, cai.huoqing@linux.dev, brgl@bgdev.pl, limings@nvidia.com, Asmaa Mnebhi Subject: Re: [PATCH net-next v1 2/4] mlxbf_gige: support 10M/100M/1G speeds on BlueField-3 Message-ID: References: <20221027220013.24276-1-davthompson@nvidia.com> <20221027220013.24276-3-davthompson@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221027220013.24276-3-davthompson@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > +static void mlxbf_gige_bf3_adjust_link(struct net_device *netdev) > +{ > + struct mlxbf_gige *priv = netdev_priv(netdev); > + struct phy_device *phydev = netdev->phydev; > + unsigned long flags; > + u8 sgmii_mode; > + u16 ipg_size; > + u32 val; > + > + spin_lock_irqsave(&priv->lock, flags); What are you protecting with this spinlock? phylib holds the phy mutex while it calls the adjust_link method, so calls to it are serialised. Andrew