From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="2WNkZWTO" 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