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 800F8C05027 for ; Tue, 7 Feb 2023 01:06:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229854AbjBGBGD (ORCPT ); Mon, 6 Feb 2023 20:06:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjBGBFy (ORCPT ); Mon, 6 Feb 2023 20:05:54 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 356E434C1E; Mon, 6 Feb 2023 17:05:54 -0800 (PST) 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=Kxgr1Z+G7gEE1M9r6++laPaamK40cZIEw/H+lncP1PM=; b=4zZHJVYQpVwmLV0hD9lEw5sI7O KoK+b2mWoTseGq6EWYfuQCXIX77rxAlXHVpdje7RWVRepY+yy/dptbfLpA4aiXgzQ4XWGKkEqrtqj Y+FBGh4lHoso5KiC3FcjN/iNk3l1GczFnCFBROM09n8MXQs2NvZwuPDjlGVydQcpK5DI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pPCQa-004Fla-MG; Tue, 07 Feb 2023 02:05:44 +0100 Date: Tue, 7 Feb 2023 02:05:44 +0100 From: Andrew Lunn To: Oleksij Rempel Cc: Woojung Huh , UNGLinuxDriver@microchip.com, Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wei Fang , Heiner Kallweit , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Arun.Ramadoss@microchip.com, intel-wired-lan@lists.osuosl.org Subject: Re: [PATCH net-next v5 09/23] net: phy: start using genphy_c45_ethtool_get/set_eee() Message-ID: References: <20230206135050.3237952-1-o.rempel@pengutronix.de> <20230206135050.3237952-10-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230206135050.3237952-10-o.rempel@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 06, 2023 at 02:50:36PM +0100, Oleksij Rempel wrote: > All preparations are done. Now we can start using new functions and remove > the old code. > > Signed-off-by: Oleksij Rempel This change looks correct, in that it just replaces code with other equivalent code. But looking at it, i started to wonder about locking. I don't see phydev->lock held anywhere. But it does access members of phydev, in particular speed and duplex. If the PHY state machine is running at the same time, and phy_read_status() is called, those members can contain invalid information. So i think another patch is needed to add locking to these two functions. Otherwise: Reviewed-by: Andrew Lunn Andrew