Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp385859lqs; Thu, 13 Jun 2024 12:55:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVutIsmYLPOpF6ik4TWAMs/UZPnrq5K7bkzqooImKLipX5KJdDbQGBaehpwd7mGTygiC8kXQk6EYMt+55k2P0IES5EohyeKloEBxIFPNg== X-Google-Smtp-Source: AGHT+IH9ITEz/oYRwBeQGdzo4aYbg7VvmWUpFlwKs+EmAR0bfhcOJLFlBt2aM8P0TM9IEUze583I X-Received: by 2002:a05:6a21:1a1:b0:1b6:d9fa:8be with SMTP id adf61e73a8af0-1bae8238eccmr973896637.40.1718308558398; Thu, 13 Jun 2024 12:55:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718308558; cv=pass; d=google.com; s=arc-20160816; b=PaexPSnJS26EkKPMIt2JLejD4qgkYOxOGRp9i1XNEWxEkK3AKhQQdk6MI1OgfZy2V4 q9UEG037B0f3Y3J3tJSDmI9VUrE0ttIsCLVQKGD4hcIU5ZHSNhm6EzUfWq2c8HXgg1u3 b3g+b/PC/FmSpkQRAgUK4KhosL0EtachAXy5FZHNee8mMBlyBQ1X5NuT9tnB0mZFyHVh V6SmX4HUIvtlCB/9Ptos1hEe8EmfY2yQBocEOq/kp7R5et2JPNzzzLYTlkyw1fIO/lIv 5c43ZExo/WxRZpeM0j7/gR3AbIgXMhjwyiq7sqxQDSTiE5K18p3kshJnIxMrbVVZLlHH lV0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bX9yCP+ayyPjjEYI3UrDUQu6a798S/7dzFInHc8v3yQ=; fh=dxl77niYK5m156a4y8kTt2lrjn1QzPpzxf3fDiopRUs=; b=FEfKcykhtacZmsvM38+hD/f0sIT///waJuJXrio03RUf/NmEDb3oNQDeNacI7xSaPf CjcvKQUZo/DXKviF4RQtmeWJ+zhTgOYCwWhLk9rl5dYpwPdJbNJsy9r4OQ+fo/nQmZZ7 M5Ot2NVGESLrrT6/+ftTwk/ZsHM3yYr2cX9bpi9MZO4Xmt0TXQ2g31DmSz80y1AoDynH jF4uPeVTyVFqI0+7PEMLN/LnlgKiV/d7Se6soLp8vLtOOHN5hybbBBGUPQQe6qHb+wVl J4A6ufggsKdF1HzdEFHieKMYj4y0dDYe5TWIRsHcykEn2lpAHKXHzUsU6xVbtFSIhcHQ U8fw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=2WNkZWTO; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-213928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213928-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ee1c66si18936355ad.361.2024.06.13.12.55.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 12:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=2WNkZWTO; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-213928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213928-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id AE52BB26771 for ; Thu, 13 Jun 2024 19:33:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F6DD14C59A; Thu, 13 Jun 2024 19:33:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="2WNkZWTO" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D4A512D203; Thu, 13 Jun 2024 19:33:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718307193; cv=none; b=qovTL2u/UqjrpXLNpf1fwirymNWh9JEg7gLq8aq+J14va+fvO99BXKUkKT0iSlNWDN9flCalKJVAvwLv2JzZwc73t+MyjlqZZDEDPROvFVLIblG01BBT3mkR+loZ8EueTY9hf3QSeHAY0Eyno+veOpN0T8V0THra31cAIFt1Z18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718307193; c=relaxed/simple; bh=5sD1IK/8V8bWGT1IDN8YyNkWTWo86CTAtfNysGwYtMI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=htRDNu90PcLSLlLt5fP9nY0jbq+0Ik9Emq/xbfC3JOVH4rlgw9CGlrlyo47lXqWeFIC8cKmXU1ANP+AvnUTM41X3tBj1Ai7AjPsH0zPNI2ejtTpLf+nlamldAH+CJnY8xS34Z0fMGFSYIgzgbSi59ReY8fVZd0ppX3sALp76GwU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=2WNkZWTO; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=bX9yCP+ayyPjjEYI3UrDUQu6a798S/7dzFInHc8v3yQ=; b=2WNkZWTO+1TR8M5CZwDs3LIfpy 5lrJlm/B++8FhrKOzInyPI4hBgsxTRsd7VCeAf3sIGdbw6ufMIjv9mkVp/dsrZ6vDt3W6vbc+I87g dmPAjIy4CCYaJk41uX3M4Uii5cnUQgswbxLf9dsTDXadxZYjsctJ6mrtJ9cxMbzRtLhg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sHqBx-00005Z-0Z; Thu, 13 Jun 2024 21:33:01 +0200 Date: Thu, 13 Jun 2024 21:33:01 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , stable@vger.kernel.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net v1 2/2] net: phy: dp83tg720: get initial master/slave configuration Message-ID: References: <20240613183034.2407798-1-o.rempel@pengutronix.de> <20240613183034.2407798-2-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240613183034.2407798-2-o.rempel@pengutronix.de> On Thu, Jun 13, 2024 at 08:30:34PM +0200, Oleksij Rempel wrote: > Get initial master/slave configuration, otherwise ethtool > wont be able to provide this information until link is > established. This makes troubleshooting harder, since wrong > role configuration would prevent the link start. I looked at how genphy_c45_read_status() works. If we have phydev->autoneg == AUTONEG_ENABLE then genphy_c45_baset1_read_status() is called which sets phydev->master_slave_get. If not AUTONEG_ENABLE it calls genphy_c45_read_pma() which ends up calling genphy_c45_pma_baset1_read_master_slave(). So it seems like the .read_status op should be setting master/slave each time it is called, and not one time during .config_init. What do you think? Andrew