Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2732890pxt; Mon, 9 Aug 2021 07:40:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM7FSlzZYIHAUkCoZMVHN5WJ+Q6t0/sluXhWvwDSlFU/KkmzYvulFoOHl+WT1dublZ+B9T X-Received: by 2002:a17:906:b18c:: with SMTP id w12mr11938473ejy.534.1628520056637; Mon, 09 Aug 2021 07:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628520056; cv=none; d=google.com; s=arc-20160816; b=Fy/4ymDsqkyF1cbk2958GA9g0PQveU4KFDKO8Z//6Wz0pQQsHfij1aAUqb7HOc6Bnp +CPyFOg3ltzat9tb/CKpzOazAUPo0YPCS9ucD3T2qJdSru79S0HnUexL4vvUMP9hVC57 MEyJ6mxOcSeP+B38ABoqSrFymz+g34cKl3ieyA9k1s3v4Hi1UFgrSTNJQEJ5QYmY6AbV 88ZNXeXJkCHKwDQQaFNfFL3FwY398zSgQrrLsJf1ta1sfSavlr7iyQJSdiGRCTviOFCh HOfW+RQUbln4qEbu/qA3yVOCGq3HZVTa0Xdr8ixQivIIzKKbimN7YNJ5Bt4CJZ3+lIsn yi5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=D8/i3ET5VXTfKdXr5AovFWuXvAt8S5q6TsZVbHBUl2o=; b=TsSCbbPnXpmHURYLkzdFCqCrAj9lfO7X7Mcx/wzhMxfa/yGOE9YNe+U9cLz2uFvlkA pwR9poA/jq32lHr3gBkE4STzAt3YX2LN6mhWRQ/zL/wrm3lGMvKhCtQ60IgdZpLCDk0I KWmKW77/cWEWAk8tdSCTq2tsVkgMO5Cxcho8I3Hj+Art7SH054b32zZ4df8kJm7bLuun YzYOl5OViupJaY6rHgifH3xwTyjojuLvPX3n1e+REiaESVwR6JJX1L5KyBwrfYkONVs9 0rHakEoxTJ/Y9GfZgvvjCzIfylOyRODli15wNDCArZEYPyvOFAbuGIvZFNBu0dKfQi/9 O8Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=FQPqCuus; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si21910914edm.532.2021.08.09.07.40.33; Mon, 09 Aug 2021 07:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=FQPqCuus; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234788AbhHIORC (ORCPT + 99 others); Mon, 9 Aug 2021 10:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232717AbhHIORB (ORCPT ); Mon, 9 Aug 2021 10:17:01 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D958C0613D3; Mon, 9 Aug 2021 07:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=D8/i3ET5VXTfKdXr5AovFWuXvAt8S5q6TsZVbHBUl2o=; b=FQPqCuusjbdarU0d1SoXdE+fa m39+5zINzDSvd2bQ+DsNurZSMWxZjbl0/qqAqRoqCM7Hzu/A5cJUVK2DWuvUrKD2YXEX6Fw0ckKsz 8kC8/mRzPslpsRZY+bVNNiFkTJZrTwFFOLDfv6svyxHxJ+gQRUirgy5/AHvP6AXAU0LP8FzCfZ9OA tkcXKfgzsRc5tsChWA03DgvAide/Y3sdERK/xJ/Am3UyTKsAi7MuRvwC6QjucrH6eJFKySy7Xfntg FjPtcseuYs5zqIJKR+qfKLeacRKdAsZtSTiS103lRZ/AdM2cU1LWFP74XmMU6F5k8wnaqLNgBV9Lx mRlYNPcYw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:47114) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mD64x-0005ms-2v; Mon, 09 Aug 2021 15:16:35 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1mD64v-0001FH-FO; Mon, 09 Aug 2021 15:16:33 +0100 Date: Mon, 9 Aug 2021 15:16:33 +0100 From: "Russell King (Oracle)" To: "Ivan T. Ivanov" Cc: Andrew Lunn , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: leds: Trigger leds only if PHY speed is known Message-ID: <20210809141633.GT22278@shell.armlinux.org.uk> References: <20210716141142.12710-1-iivanov@suse.de> <162646032060.16633.4902744414139431224@localhost> <20210719152942.GQ22278@shell.armlinux.org.uk> <162737250593.8289.392757192031571742@localhost> <162806599009.5748.14837844278631256325@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162806599009.5748.14837844278631256325@localhost> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 04, 2021 at 11:33:10AM +0300, Ivan T. Ivanov wrote: > I have sent new patch[1] which I think is proper fix for this. > > [1] https://lore.kernel.org/netdev/20210804081339.19909-1-iivanov@suse.de/T/#u Thanks. I haven't reviewed the driver, but the patch itself LGTM from the point of view that phy_read_status() should definitely only be called with phydev->lock held. I think we also need the "Doing it all yourself" section in Documentation/networking/phy.rst fixed to specify that if you call this function, you must be holding phydev->lock. Lastly, I'm wondering how many other places call phy_read_status() without holding phydev->lock - sounds like something that needs a kernel-wide review, and then possibly we should introduce a lockdep check for this in phy_read_status() to catch any new introductions. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!