Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp169314rdh; Tue, 13 Feb 2024 12:59:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXWG+CnwtIezzJhdB/X34emt8oT5wdkyswKuN980mqC53F/gpz1GavZiiZnWBcy1xBrPXdXWGX+t45OM+4fvllV8ofDHIwGlF+rjs2BfA== X-Google-Smtp-Source: AGHT+IEzcp0FgNxFyRoJCYXDLldnEHD/1Y9HznPdFCHrY9VDApR99FhY9yyhNVnZ0akADXGNltq7 X-Received: by 2002:a05:6358:7682:b0:176:d522:76b4 with SMTP id e2-20020a056358768200b00176d52276b4mr565167rwg.14.1707857948286; Tue, 13 Feb 2024 12:59:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707857948; cv=pass; d=google.com; s=arc-20160816; b=PFltTvsIvLyJm/fFN7/Dfs1Nvfn7USccEEFbIPbLYopUslm2YWOWwPVifSbxbOOBbm vux+cwlhEB7rJJN1arF8CSEtLCr+9kggNMyDIAyCGBljBj1/VLwRRfxj+/4xXUs3M4/w dZcsAHxnNdP6emKpBFqsuV5xSFdUx8cakwuIm/4r6kmmLhF69pCo6JR1CWbiTJwRtSG0 Do2ozZe/XjP1fBOUPkrS5wN8wwfvZ5AcmwKUUjzq3uVJA/nCpD/V5ALaIHvDUHHpzRG6 fF8cvR9WVr88xIZ13TBaAAkuO7UkeoTEHdawHvBbyHSwNvNmvN9bbD0xj2irQeRxo1Ng RmVA== 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=JzBsHjPCw9jYYKUYI1fE7FfGlYl2lggPJVrd5oZJYqE=; fh=bVEnWbIx5Bxd/F5k8jxQewTF8TwuXWmWds4dzbpRnfE=; b=RtbYJdJWTawRu90mitXyfE4exNhNJUfqlM0tqKJ6bA+hE2r6GZD8z7MPrEC4ZKnX07 LhzMVx3R3kN8ClxUO64ypcWnFESDRtWriCvjuwBTMufHL7IEZneBDIeJrmLV3aA+NYBG muasrfCjeQvXQFfCABb9g2yr/4xYxMozEqzne1bql6dPIunrIT0r1N6pu6ImuCj34E0h MUmxaxV03/9v7rff+LgyGdgrcOCq8fU+QZk93ZpA3xCw/wK1uL9vM8SD11pLq5bGpfQh /UU4T2DYirecZxWIOoevj5ia9TsY8IapGP0Ni97vDg+8IdiX4O0J331i0a97A9JbyvXY jvXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=M9soQuv2; 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-64237-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64237-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch X-Forwarded-Encrypted: i=2; AJvYcCVIXM4EJqb7qXVy6i8cfEepXNMQzBqK2Dxx7iTNxkFNV5VLt+Lnees81E22zNkr4IGNlC/yr1POjrs1cgIMo882NY1uNCEYPWJTnhAEbA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t29-20020a63b25d000000b005cfc5a55834si2473958pgo.426.2024.02.13.12.59.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 12:59:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64237-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=M9soQuv2; 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-64237-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64237-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E948C289732 for ; Tue, 13 Feb 2024 20:59:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A341D6166F; Tue, 13 Feb 2024 20:59:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="M9soQuv2" 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 1DA0B612FD; Tue, 13 Feb 2024 20:58:57 +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=1707857939; cv=none; b=ORn5eVtIC59BN7CXRwc82g1QtbpWnvkWQaE8I+PYQGkqMgZtg8YU0PteKydQmRCTaJUL4Ibe1udw8wD/++EpPrQAN3eq5vBKja0yTtnB5WzaDmsiMCmljOizrrn+WqfFU9Rx8fsXxtZshPk6y7IBF9FB/V6+BFqu/03OPZecVIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707857939; c=relaxed/simple; bh=sMc0wkAcU9sU8DBluQOSxS/iw8EL2/v8m4HjZdznSos=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CjwkhQuYZJWUjP48/NxX+icboLVQJU+sIDSA8RMrQQ2r3xnSfkranVEAfMbhIHiVi+iY63Q6ffmMxS4J6boIoiHE32MV8p+BjonYV8Vwtxm8J9GwkHmUnyqg9p/qJzj01qkmL7bP8tq5ucESa1Wqk5OS6Q3pqvrxMEXOJ9yLOCo= 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=M9soQuv2; 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=JzBsHjPCw9jYYKUYI1fE7FfGlYl2lggPJVrd5oZJYqE=; b=M9soQuv2DofJ1tPs39LAtoERcU 8g/Z10Nuv2XDliZyevUXupgmODvPOHp9ziMSjW9SM93HQ7jGV7WLr/2iHHNO+5W56tmkRHhrFxz1F BnRZI4gpr34gmdh6TJCj2SgTkHfBNadDULgbqs2W+/NgdXE6RGhOHACpO4T1YHQqZIhQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rZzrn-007iqc-6V; Tue, 13 Feb 2024 21:58:59 +0100 Date: Tue, 13 Feb 2024 21:58:59 +0100 From: Andrew Lunn To: Christian Marangi Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Robert Marko , "Russell King (Oracle)" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next RFC PATCH 0/2] net: phy: aquantia: fix system interface provision Message-ID: References: <20240213182415.17223-1-ansuelsmth@gmail.com> <65cbbacb.050a0220.b81d1.eb5b@mx.google.com> 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: <65cbbacb.050a0220.b81d1.eb5b@mx.google.com> > > So in effect, the driver needs to write every single register it > > depends on. > > > > Well if that's the case then this RFC patch is a must. With a > misconfigured System Interface configuration, the PHY can't comunicate > with the MAC. > > > > This might be the safest change but again would not give us 100% idea that > > > the thing provision by the FW are correct. > > > > I would say, we have to assume provision is 100% wrong. Write every > > single register with the needed value. > > > > Is the provisioning information available? Can it be read from the > > flash? Can it be dumped from firmware we have on disk? Dumping it for > > a number of devices could give a list of register values which are > > highly suspect, ones that OEMs typically mess with. We could start by > > always setting those registers. > > > > We know where they are stored in the FW but it's not documented how the > provision values are stored in the FW. (the format, how they are > organized...) I can waste some time trying to reverse it and produce a > tool to parse them if needed. It might be worth it. How complex could it be? The obvious format is a C45 mmd.reg pair and a value. > Would love also some comments by Russell about this, there was a patch > adding support for WoL where another user was messing with these regs > and he was with the idea of being careful with overwriting the provision > values. I expect the SERDES eye configuration is in there somewhere, and we should not touch that. That was one of the arguments Aquantia made at the time, that needs to be stored somewhere, and is board specific. But knowing what standard 802.3 registers are commonly changed would be useful, and could help track down silly problems like the transmitter being disabled by default by provisioning. Andrew