Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp171888rdh; Tue, 13 Feb 2024 13:03:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYKXLxJOO4EY7OP5TOy5m4R3ORx5J+at8NnNu5KLAYtHZvsB5OjMVRaxf3Urs3dP3tJAHJBLcfowiSHpdM1dxOrApvfW9GP0t7dfT0kA== X-Google-Smtp-Source: AGHT+IHzs3raYRBtST9TWDh+zMV/QM46zkg3r1gubvRmFLrAMsUxbnEY7QAPcINzJMAss6OHH+gi X-Received: by 2002:a17:902:ea0a:b0:1db:57df:ff9a with SMTP id s10-20020a170902ea0a00b001db57dfff9amr78941plg.16.1707858202580; Tue, 13 Feb 2024 13:03:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707858202; cv=pass; d=google.com; s=arc-20160816; b=ovvj0HlgkK8deCyFh6w1Yyw7S4Fybrbm2MmtjqgkExgkg8Yga9+m9JxzCtZ4rkU5Ri cjuz2zpH04swQbxSqziGktXfKmH+qp+VM1JeT43gMHtY2M29NLkY2oVzznBdcOi2AUhz MuFY0fvancPMtfUubOLBt6BoPUcmzF09bBRmzIMXn5qVGgjHw087qVuh8hCaAw+YZkOb nQUp+qy8Uhq4CjKRiZ68pmctWlho/ox9MhH3RhML582pb2m3Bk7YFvP5crdeQzpGfXV7 Tkb+M7NDiT8rl6O+zlIlgdt0jUuCidhKOvfQGHKnxPIJthzlaSus9djYOQ6mKElbGkof gMAg== 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:subject:cc:to:from :date:message-id:dkim-signature; bh=T7JblcC+JB2R//36hKalltVDiKFAwpXQUzPo5XAomuI=; fh=LMZMQc8iLCSgPQ5S9yngDVzJs+TJOLETrgqFgJZb2Tw=; b=JAxg7Vw9keGhWOTHSq+Q+8Fwikuv50fFoN0ts51TvwEYgmQ9TUbDLKQf9vzRlyBLoU 3cLqtDjeB7yf6BJxx6WF77c2diFV8AhDPVxpnXBfoSqiEwqb4CxwWoPZtE5nGWQqNDzS wLhM7G0aCK1m49TLoMFBOsu1/RFwLkE/EigEKhTrEJCWP7SyGW4OxAiiyJ5q5MO/zOpD fYCeuoa7OT4ixbAX+/lQZ7gnht+oy7NmZoKM+PEbAloAERD1Lvh5xsXEoASBIkg2ekL8 lLvPIUnTJj12sJjmZSzN4SqzR/8aL4ozW2Y/BxLprRDJnISzcGpj6KSqaRWOlTj/Lpqu EE5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fN3Txu1D; 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-64238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCVPYjcxGYbvQJuf0nv7+jQHuQu/21x+9XGvQ+TOph/sSHv1DRofifd3rYkAwUEIDRVAiUimorQgTfZNia0jMBDqbD8M47XskTx6bwpIhA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jh21-20020a170903329500b001d955aef796si2451730plb.478.2024.02.13.13.03.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:03:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64238-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=@gmail.com header.s=20230601 header.b=fN3Txu1D; 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-64238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64238-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 25100285CA0 for ; Tue, 13 Feb 2024 21:03:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AFA9A61671; Tue, 13 Feb 2024 21:03:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fN3Txu1D" Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 3D5F75DF3C; Tue, 13 Feb 2024 21:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858193; cv=none; b=lsItq5Y2DhdfajlrjD2W+g3Rt12fBBkFX8mlKEUEy1LU+slQrEUnXJFjRO7MJAfx4BES4eSNUU2zruQMb044wr8+rPUn16Xk8OuUWcjB5KXt+Eo6mCs5vxBEv7OalH0Uz3CwJgwKUw1jDwhdE/DZPrPVkxXBJVCnjI8joapYOME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858193; c=relaxed/simple; bh=D5xFtmJb4RgbEH2NzGRmKv6Ow4RJxAM5+xjvAuR0vAg=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mv3FtgvL09WtT4f5s4lzgyG2whzfdDDKwzeP4qG/j1eBvAjhEKAdEZ9sL7Zf+PBMD/KLwkGReq7r7j5DV8lnJcrJVoVHLRLaUmpL3u9xgAcFafEZKHgOA3B5WTm+c2g+VQFvVnDmSV+bB854/htGgtMwVb3jTL3++O9BY/5+T94= 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=fN3Txu1D; arc=none smtp.client-ip=209.85.128.46 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-f46.google.com with SMTP id 5b1f17b1804b1-411cf319da4so5274745e9.2; Tue, 13 Feb 2024 13:03:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707858190; x=1708462990; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=T7JblcC+JB2R//36hKalltVDiKFAwpXQUzPo5XAomuI=; b=fN3Txu1DXngtP3UcxMmGntinx+DUUbM0v3YakW0akDhN+4Kgm7ceBqVG8NZbj0cYzs lIgvrTnzsFO+cVaLC1eq08WhPzvl2S01nCeedUCFG5zILBMLN2TPGT1VLF7azHvVKnja wFhf3CA4PcX7qNzC4fEErTv642bRzPWXd5/LxN2fDAuvE7UB3VYg+0VdQgxa+72mmyC+ ySIhEVK0wL8FePdEyZfTUyDzrUDfI6vUxVKbb5/H06XgqZ2n09PHOtc0sNed7m0AH+9Q EkmfImI+B3i9iAmzN32ElSNdfRbGxywimA/C4yopGW6uYz+tGTMvI7rHMPXmNZtcUuUo 77Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707858190; x=1708462990; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=T7JblcC+JB2R//36hKalltVDiKFAwpXQUzPo5XAomuI=; b=ZoYUiudzb/FwhDsv0caQMK9PygHQjTZ6Rz1C8OmFF11+vR8uhTcfc3+rINkfYUhjq/ uKfBRBWzqVN/PVlzntI5Z9x5aEkNJYGSd+POsYVtkVDoe8AcCb/d4RrBwlsH2AmQB4RP 4cgPeEaMX6UD7a6fxijWjf4zIRIEv5qR4Xlu65SiHvLH7RKUPwIVlmwzUz9MO1UFaRqz izqAVTNBSlA65RF4wrBvYsA1QsJO8RdKFAtf/C49XOQe6cdUF8oMAE52/dU0wvGy76nL cJ7Nn0aa15cLkL/lwmWL5DRDvnI9N6d8FBkAfVv7IvNYP/3VLt9/CgUI7wK+tg2HrkBi cEPQ== X-Forwarded-Encrypted: i=1; AJvYcCVTw0M4lnOEnC8am4n8GLJ+Sdg6eY0rM/+ovZjcrcYyU652021l0RSXFuySImoDO0FBWYOceR9GPUlILzwqg0doeeNfVga0JWVQ/PEVFCe4/WCufTIrYYtoj2m6PiMO0sqjmvME X-Gm-Message-State: AOJu0YxfOKWalJqnH1m9VmWuFTDhdJehlWPKpBSnNmkoFMHDJ2KZI5+s 7mKDZHr4jwR6n0d51cSEpKS1giGeo7v1Pe1tIGucR1hvubjPxfiN X-Received: by 2002:a05:600c:a0f:b0:40f:d3d8:c8d5 with SMTP id z15-20020a05600c0a0f00b0040fd3d8c8d5mr593287wmp.9.1707858190208; Tue, 13 Feb 2024 13:03:10 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWAROk4WfrZ5TMysnobPXA89x7N5PcGYTomnuvtH2fqPKqmZAPgpPJAPknPpRnNpKqR4l6qujQrCQ6guVPp8IiQoAhaE0wstMfOMTQVf3SHcCRn3He9mkBomlELEvbqWUrUc7gEDEyc17qs1H39aCf7cvYN7fnE5J/nIH6R6W3qlctfO0tyD3ou/xe/a5zns8n8xo5iOR7wStwqFR72S7a64Sfiy0A9SnwsvrIVDa9o47NjHVxuMt3XpPCDHuNDfHchFeV3DKWjhr6ui64IgXCOpF50Vd4yaXyDC9/M6ZEr2DGrjRpaJUjxBZ+UbvWIWvvbB9poHGDvP8Pv Received: from Ansuel-XPS. (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.gmail.com with ESMTPSA id i5-20020a05600c290500b0040ef95e1c78sm12665359wmd.3.2024.02.13.13.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:03:09 -0800 (PST) Message-ID: <65cbd90d.050a0220.7cc10.ef02@mx.google.com> X-Google-Original-Message-ID: Date: Tue, 13 Feb 2024 22:03:05 +0100 From: Christian Marangi To: Andrew Lunn 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 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: 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) -- Ansuel