Message ID | 20240213182415.17223-1-ansuelsmth@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-64073-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp727531dyb; Tue, 13 Feb 2024 10:25:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXhOehxCo1SX5vshG4BqmUWMnFC0f6IqTQhCYCom5kaUQZZfgIdzXAyB8okFVZvYNgW6bMmJY7X3EeT54BU8bMGZ9PmNw== X-Google-Smtp-Source: AGHT+IE7UZkxMWyAXvamNoQK4H5FkBSVTYWoxHXZ6uqzVApDAhybTgLOb6x7LBG0JMTS/uRrjWcP X-Received: by 2002:a0c:f50d:0:b0:68e:eb4b:2198 with SMTP id j13-20020a0cf50d000000b0068eeb4b2198mr248016qvm.24.1707848732778; Tue, 13 Feb 2024 10:25:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707848732; cv=pass; d=google.com; s=arc-20160816; b=k1/5iZaAW2gxR0mMufmLPz3bMVms7o30IUSuxKSAZMR9ScwdednLzdbakb21/Dta2q RVuWE+c7sBUl8rVeLn/Urln343peFrWV6qCbaUTFMqn4z660Qo1ocwHQHRLu0XrjFcM5 k5QIvpQAehJnLwh78tQWk0gC4TJ+C2UuQIMNMXkV/H3vw+WZmNLbSgD6P8R5BJbwglRt cnzEGDPfFlQpdOwc48jZwufepsxk31QvpsNeo91/I//bFCbJGsV4LCguVfTTN54aSBdN 4mkNVrN621DzL9Qce6GgYTleI5MZd9C1yTVAt3mYdx8h5uKPi7v9KIpAZOqQ4SlhE1OH WKxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=OQ5S/P9o6shLLmwJu/RxB7GB7IC8YbWNZ5o+W4xta3I=; fh=rHlqQ6+fljHDR2KA3grzgbbGq9awFelhNgze+29DsSg=; b=Y5xe5ed9CanZjQ3XhkdTFiKKjCbDjghpngiNNcHzvhDHVSZvS58HWqfLS6IhrzPyF8 0Q7FFSoi7w044zwommPFSHEW7JduR99L0G+ZllY28jwf6wdjgz6xuKpNrgk6Q4USB0jx EUUn7hx0sC5/KzifK9TFHiyaz6gJpsabXxinssPsA6MUvan90tFZM2hyodn6/wLI4njP yF4TyEbwXIeLVAz74HOZ9LU6t+6F0HZwCooHM1jHIl2whn8jMjAbGml97bmsxsPkJ7qr MnjF/QKMDp0tt+i+Veu9AU+vruhkuP1GimQiaoi8aoVLjW65YzrkufzYhQOYEWO/iWpz YFjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EDGvgEnm; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-64073-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64073-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCWU4G+LAFX/h/yFlInqOBKCsr7E3YBy63+GstU7hSUyHS20PNYTlMD8s/xS1mHZBp9lQY6IZOTio9Rb7E+Uh3k3PFvgbw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 9-20020a0562140d4900b0068efc03dfe8si265543qvr.582.2024.02.13.10.25.32 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 10:25:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64073-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EDGvgEnm; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-64073-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64073-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5F4981C21021 for <ouuuleilei@gmail.com>; Tue, 13 Feb 2024 18:25:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A4AA608FD; Tue, 13 Feb 2024 18:24:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EDGvgEnm" Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E2D4605C8; Tue, 13 Feb 2024 18:24:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707848682; cv=none; b=CN16EdBFG3crWUhNXesW23Xgm56uYMgT3+W9SDvA3So2cNRtUMI+Cv3OzKhg4u/v0Fy4S8MfDiY0sSJ0uD22OfgzndC71L5iwgKQYNVig7vONI9phbWwUYpf+g5Q7xbNTZ2yXQpfDqCUM+DS9uqMPIeha06uZ3cmnYZN27DBRSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707848682; c=relaxed/simple; bh=Aw4TgiV4L/Ax6GgNOY3EQ3AedNdMnqShmp1jU+WV4qo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=hoT5yL2Zn08z09f5oWlZY/LoYzTEl70c2X0YD219b4ZWYAnawkwhYKWcg8GKTAT6vYflWD9t0cYuYicKqxrex2YmjVtOMN1buoRDRDyA0iWLVYDrUt2FHNcIJazaqrklbsDe+qBT2C0c5nH6GcYJ3oCa1NNa+rtELvMiy1EXmv0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EDGvgEnm; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-410c1ebf5e4so21500645e9.2; Tue, 13 Feb 2024 10:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707848679; x=1708453479; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=OQ5S/P9o6shLLmwJu/RxB7GB7IC8YbWNZ5o+W4xta3I=; b=EDGvgEnmCYcYPCfp5Zlmumn6W2FnMchTSnFb7cFcTC/rdQdQe7btG0Urlkuw01Ikxt g1dV2H4ibwEX5Pg2DTgv45UsSj4tyAbJxiK0RY2Ngg/RHr9jRH3MDyrNZh5DbW3L/D3l OqTEwr9rbsoTzCbE3NB8KQAbuRKvInk2U8TbCM2DR2AHrK58Qjp7l8CN+/9+iJpba4vk y2mi2WhidqtCKYAVB6aCdz1BHJ7ULHQNzJAYJ3/IRvOmLHpzJnBkya8+MiOG5Z9G0+wj igRA5pr0/XTZRiyCwWD+qPLH8waeOfvteWSWY3PCFp83V2y0V/Ucnc6ePJcU8MfqYdy9 O6aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707848679; x=1708453479; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OQ5S/P9o6shLLmwJu/RxB7GB7IC8YbWNZ5o+W4xta3I=; b=Vr+UEE/w69Il/ShW8jG4YWnjPTb8lJY/itcRyAmReKG84VXH74f3oraqOLC5e844Jq dEN3wHiRrXBWNku7AjuQ6y8a+/5LCS5bzsGLxh2IYJAs2c/xBxzsf49/Nwf/LJtWFoCI 78iqRt9ymTs2euIYia36KWDeFfVkLyeBrpgEIJzr0mfsNcTGJoCcEu5Ymvxuxpt3YQCS TDr27QIvQd1xysjhhvtezue3oCYplCIyFEwzecgz45+/Dcqy696ZLzdLwG2KSZnND6PF ZJ1pNlbtA9wqI+K6HKJSzN/wV0PtajfTx5CLH7a6mc4uMy2g+UE0Bck5zDWh7I5mQ8Du Ddkw== X-Forwarded-Encrypted: i=1; AJvYcCXrM8lOnCDWWYLUTJof91Pq3yxm23rn7WOV966E1Pl2JpoL4c9Mh9cF+cYHimfThzjdTKDaD8v++TTVuFLUmjtBCGuE3ONLJ5udY1FJX9DC2lQQyhOsvAGr1NbvD5aGReGCpRUm X-Gm-Message-State: AOJu0YzQTXifGcVRSPsISV+ryLa9WIxuSq3VdLiWbI42KSyKY4nK1QN0 6gbUbZSD0/BuZyrzlLl1hc+fQA2DaHj32Rq3KVqzz35DjWYb2LjlUgZADtxTrJc= X-Received: by 2002:a05:600c:4e86:b0:410:e201:bc55 with SMTP id f6-20020a05600c4e8600b00410e201bc55mr391992wmq.11.1707848678509; Tue, 13 Feb 2024 10:24:38 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWAhwf+gqbnRrwi7gbKHhk0NUmawgJ9Gx7wMZFKt77THPQn1fHSSKRHqxs+AcAbDJsGdgtJ/ZG+xjlgjDfp8z/Lw911Sl2LynlVIO/KBmYgMzT8/Vp9oTfC2OckRD5J6GHwSM9pQDEKmitEGSgoeq975i9CJNHAkS1rCL3ooccYecoT+rYmzxVpx5/RV3A+TXMWdm8zarzmpnfd3WqqvSQhflyv8cc4dTSwv18Ov+RAVtv1yql7SHkujtgue/mG0TPevPCYv3ipAXNx1xLbdMjQkLfN7xkofbAXRgOajWUa55ybS/PqqfqOtnFXYMJ+SY8IsAlzljizG+KRNbdYuYY5QHQmOcm8yT7xrCvZCNBHcb5S8I2+Y75KgCLlwhtT30asI50CVd8= Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id bs25-20020a056000071900b0033b45bdb2a1sm10347974wrb.4.2024.02.13.10.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 10:24:38 -0800 (PST) From: Christian Marangi <ansuelsmth@gmail.com> To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Christian Marangi <ansuelsmth@gmail.com>, Robert Marko <robimarko@gmail.com>, "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next RFC PATCH 0/2] net: phy: aquantia: fix system interface provision Date: Tue, 13 Feb 2024 19:24:10 +0100 Message-ID: <20240213182415.17223-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790809193026235993 X-GMAIL-MSGID: 1790809193026235993 |
Series |
net: phy: aquantia: fix system interface provision
|
|
Message
Christian Marangi
Feb. 13, 2024, 6:24 p.m. UTC
Posting this as RFC as I think this require some discussion on the topic. There is currently a problem. OEM multiple time provision Aquantia FW with random and wrong data that may apply for one board but doesn't for another. And at the same time OEM use the same broken FW for multiple board and apply fixup at runtime. This is the common case for AQR112 where downstream (uboot, OEM sdk, openwrt to have the port correctly working) hack patch are used to fixup broken system interface provision from the FW. The downstream patch do one simple thing, they setup the SERDES startup rate (that the FW may wrongly not init) and overwrite the global system config for each rate to default values for the rwquested PHY interface. Now setting the SERDES startup value is SAFE, and this can be implemented right away. Overwriting the SERDES modes for each rate tho might pose some question on how this is correct or wrong. Reality is that probably every user an Aquantia PHY in one way or another makes use of the SDK and have this patch in use making any kind of provision on the FW ignored, (since the default values are always applied at runtime) making the introduction of this change safe and restoring correct functionality of AQR112 in the case of a broken FW loaded. As said in the commit description, one thing this handle is the problem where the FW is provision with 10BASE-R while the MAC supports and expect UXSGMII. The AQR PHY can correctly switch from one mode to another and I think it's the most common case where one FW is broken. This might be the safest change but again would not give us 100% idea that the thing provision by the FW are correct. Another idea might be adding a property like "aquantia,broken-system-interface-provision" and with that enable we would overwrite values with the default one. Christian Marangi (2): net: phy: aquantia: setup interface protocols for AQR112 net: phy: aquantia: add AQR112C and AQR112R PHY ID drivers/net/phy/aquantia/aquantia.h | 17 +++ drivers/net/phy/aquantia/aquantia_main.c | 152 +++++++++++++++++++++++ 2 files changed, 169 insertions(+)
Comments
On Tue, Feb 13, 2024 at 07:24:10PM +0100, Christian Marangi wrote: > Posting this as RFC as I think this require some discussion on the topic. > > There is currently a problem. OEM multiple time provision Aquantia FW > with random and wrong data that may apply for one board but doesn't for > another. And at the same time OEM use the same broken FW for multiple > board and apply fixup at runtime. > > This is the common case for AQR112 where downstream (uboot, OEM sdk, > openwrt to have the port correctly working) hack patch are used to fixup > broken system interface provision from the FW. > > The downstream patch do one simple thing, they setup the SERDES startup > rate (that the FW may wrongly not init) and overwrite the > global system config for each rate to default values for the rwquested PHY > interface. > > Now setting the SERDES startup value is SAFE, and this can be implemented > right away. > > Overwriting the SERDES modes for each rate tho might pose some question > on how this is correct or wrong. > > Reality is that probably every user an Aquantia PHY in one way or another > makes use of the SDK and have this patch in use making any kind of > provision on the FW ignored, (since the default values are always applied > at runtime) making the introduction of this change safe and restoring > correct functionality of AQR112 in the case of a broken FW loaded. This is part of the discussion i had with Aquantia about provisioning. Basically, you cannot trust any register to contain a known value, e.g the value the data sheet indicates the reset value should be, or that the 802.3 standard says it should be. So in effect, the driver needs to write every single register it depends on. > 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. Andrew
On Tue, Feb 13, 2024 at 07:46:45PM +0100, Andrew Lunn wrote: > On Tue, Feb 13, 2024 at 07:24:10PM +0100, Christian Marangi wrote: > > Posting this as RFC as I think this require some discussion on the topic. > > > > There is currently a problem. OEM multiple time provision Aquantia FW > > with random and wrong data that may apply for one board but doesn't for > > another. And at the same time OEM use the same broken FW for multiple > > board and apply fixup at runtime. > > > > This is the common case for AQR112 where downstream (uboot, OEM sdk, > > openwrt to have the port correctly working) hack patch are used to fixup > > broken system interface provision from the FW. > > > > The downstream patch do one simple thing, they setup the SERDES startup > > rate (that the FW may wrongly not init) and overwrite the > > global system config for each rate to default values for the rwquested PHY > > interface. > > > > Now setting the SERDES startup value is SAFE, and this can be implemented > > right away. > > > > Overwriting the SERDES modes for each rate tho might pose some question > > on how this is correct or wrong. > > > > Reality is that probably every user an Aquantia PHY in one way or another > > makes use of the SDK and have this patch in use making any kind of > > provision on the FW ignored, (since the default values are always applied > > at runtime) making the introduction of this change safe and restoring > > correct functionality of AQR112 in the case of a broken FW loaded. > > This is part of the discussion i had with Aquantia about > provisioning. Basically, you cannot trust any register to contain a > known value, e.g the value the data sheet indicates the reset value > should be, or that the 802.3 standard says it should be. > > 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. 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.
> > 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
On Tue, Feb 13, 2024 at 09:58:59PM +0100, Andrew Lunn wrote: > > > 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. > Working on it. I already confirmed the FW have actually a provision part and is not empty. The format looks to be u16 reg 16 value but I need to understand it better as not everything about provision is in mmd 1e so there must be some magic values to signal where the section has to be appled. > > 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. > Yes having a tool to parse them would probably be useful and eventually even apply fixup in the firmware loading (if we really want)
On Tue, Feb 13, 2024 at 10:03:05PM +0100, Christian Marangi wrote: > On Tue, Feb 13, 2024 at 09:58:59PM +0100, Andrew Lunn wrote: > > > > 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. > > > > Working on it. I already confirmed the FW have actually a provision part > and is not empty. > > The format looks to be u16 reg 16 value but I need to understand it > better as not everything about provision is in mmd 1e so there must be > some magic values to signal where the section has to be appled. > > > > 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. > > > > Yes having a tool to parse them would probably be useful and eventually > even apply fixup in the firmware loading (if we really want) > As promised, I reversed the format and created a script. It's still WIP in the sense that I have to still to find a better way to show the values. Here the script [1]. Feel free to suggest improvements to it. Various discovery were done while reversing this, especially the thing with the BUG. [1] https://github.com/Ansuel/aqr_prov_table_parser