Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp916864rwb; Fri, 18 Nov 2022 09:57:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf649PXjTAyg9qchlyw9R2v03yM6zs9FA3lBKe5k0xU1I6jjp5kLaWE6AJi1Rm+DaIBiHgpB X-Received: by 2002:aa7:c9cd:0:b0:461:891a:8162 with SMTP id i13-20020aa7c9cd000000b00461891a8162mr6974748edt.398.1668794227312; Fri, 18 Nov 2022 09:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668794227; cv=none; d=google.com; s=arc-20160816; b=Fb5FaL4p7g2fR9Tt311kKFRuRGAOTvaqgjB1HYeucWkMev33vXlrahrdaazFYQ6GA8 /nNFYyp7G22cNbmuktd9K0Ogg3s4dlBUyiDLOkGWAcpy4OEpB52e0A5Vrvueg7Q6291g nI4PypTu5IIbaLXeUgUdhjVGPJHgTW7DlroLuVH+0498aApeJYkopEV66nQjb2JJYoJA ifGl8QA70KnXockwODqWeHQJTRQQWRGaGwwhac9NuWlp1+YHR5OgSWmZINv2Nptyowbz 4tWGQISdXtEwxMRkiJHqIo6ZLlSRSR2Im3Attn1XpnE8RvCVFNX+p/vavbv1QaJOihJA CdyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=f50cXlhSl5OKrL1veymKT19+b2RPjsREkRB5uQP4LcA=; b=Gh2k73h5b0HYpEvm0Xl00AM6k43L/WnanrRqwkVjsqt+73uw4VmDeaTmRvRv+2ffdq z8QJDi8k2WiFBlSC2NdWrbh0fnxUdSBupaCRUw6qbVUEhfY/pjpZGv4cGpHZXY4QTOkD v4/jwxueo/tJmAI04JWE1/VBCcPvfp6tzFV+p2Q7Zkw8M33wEmUGFb9EG+IHX7f2v9td yOr9d8YsWFrvaqC0vNuUm0gJ/HW44HopZE6qvWW9OKmbfLl9171ev0tm2ZwrXR9BOMUt yar4A3P+7w7j26Z+wjXkTHEMlO4lS0jexf7vNlplWmA8xs14wHJadWyaYx05+KzAnojk pt0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QWjssaTS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a1709060f4300b007ae6076db43si2884027ejj.312.2022.11.18.09.56.44; Fri, 18 Nov 2022 09:57:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QWjssaTS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235177AbiKRRRG (ORCPT + 90 others); Fri, 18 Nov 2022 12:17:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234867AbiKRRQt (ORCPT ); Fri, 18 Nov 2022 12:16:49 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01D6913D4A; Fri, 18 Nov 2022 09:16:48 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id bj12so14518056ejb.13; Fri, 18 Nov 2022 09:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=f50cXlhSl5OKrL1veymKT19+b2RPjsREkRB5uQP4LcA=; b=QWjssaTSe3zToxs7F5fKzajzmgz8VhcvKDm0hRrHuwiXrD1YwxCIGmQUFznFn6cWdc LAWbgCMKKLIkUlcG4y4d9y6zpjXISYczomA9Srn7ihvFeBiBmHeO3rpJf9oRGLQoxDtS 2NSKw+j7omgw+IA6KOZpuvr3wJyKxyO5OcOyOg9yCzzrggw6hXGH3Y4jhWwd/hnviHYY ppCxqMujBu5zZsAaDL2GxX2Mphe3S6m1eDvxiQdbUjwECdbParRgy+H1o5TcYa3oPZdD KYxRJiES2RE3FwiD2bxPHDsLCojI6qRKiPcMqc7YzA1cwKwW8egTGq6ISxcRWlv8PlW2 FJ3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=f50cXlhSl5OKrL1veymKT19+b2RPjsREkRB5uQP4LcA=; b=1H9qnhq976MHBJuOZU8z2pp6Ddbll9+leiF+BnEuTritrfjJ/D1mQvsfMhteaThyXK 4SdxBOP82IV/HzcZhvFzFVBqKlKWrtm1tQj42hUaKFAWTWEAX6/WoVp+eg/W+/Gpxfvk 7ASsynRLHiqlMnCxtvVrEbc+ThlzVd5/PTi5n+uuae1CW9YWb+n2bhrrl4j6gTk3Lc32 l074qPXiKO39kqZ9iyLDpYVSImw5WbI7mOPUM6+aCF3B/PmvAD0zl0g7xVsZuQhKOutr jqLyw18QVpiRwgOiitjmQ+1SufhLow2yo9xmEFLydM/wFxF1enwzB9Rrf8Kr9i7coXeV uGXQ== X-Gm-Message-State: ANoB5pnLMkh1tqfgl64LUWEswzVeTUfouTFEEYTxg5hcLq9c4ChYVAUV PnlNYRUkMVywpzH9/u5wQmE= X-Received: by 2002:a17:906:f88:b0:78d:ff14:63f9 with SMTP id q8-20020a1709060f8800b0078dff1463f9mr6677725ejj.516.1668791806361; Fri, 18 Nov 2022 09:16:46 -0800 (PST) Received: from skbuf ([188.27.185.168]) by smtp.gmail.com with ESMTPSA id r9-20020a1709060d4900b007ae243c3f05sm1900342ejh.189.2022.11.18.09.16.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 09:16:46 -0800 (PST) Date: Fri, 18 Nov 2022 19:16:43 +0200 From: Vladimir Oltean To: Andrew Lunn Cc: Sean Anderson , Heiner Kallweit , Russell King , netdev@vger.kernel.org, Eric Dumazet , Tim Harvey , "David S . Miller" , linux-kernel@vger.kernel.org, Paolo Abeni , Jakub Kicinski Subject: Re: [PATCH] phy: aquantia: Configure SERDES mode by default Message-ID: <20221118171643.vu6uxbnmog4sna65@skbuf> References: <20221114210740.3332937-1-sean.anderson@seco.com> <20221114210740.3332937-1-sean.anderson@seco.com> <20221115223732.ctvzjbpeaxulnm5l@skbuf> <3771f5be-3deb-06f9-d0a0-c3139d098bf0@seco.com> <20221115230207.2e77pifwruzkexbr@skbuf> <219dc20d-fd2b-16cc-8b96-efdec5f783c9@seco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 18, 2022 at 01:02:29AM +0100, Andrew Lunn wrote: > > Well, part of my goal in sending out this patch is to get some feedback > > on the right thing to do here. As I see it, there are three ways of > > configuring this phy: > > > > - Always rate adapt to whatever the initial phy interface mode is > > - Switch phy interfaces depending on the link speed > > - Do whatever the firmware sets up > > My understanding of the aQuantia firmware is that it is split into two > parts. The first is the actual firmware that runs on the PHY. The > second is provisioning, which seems to be a bunch of instructions to > put value X in register Y. It seems like aQuantia, now Marvell, give > different provisioning to different customers. > > What this means is, you cannot really trust any register contains what > you want, that your devices does the same as somebody elses' device in > its reset state. > > So i would say, "Do whatever the firmware sets up" is the worst > choice. Assume nothing, set every register which is important to the > correct value. If "do whatever the firmware sets up" is the worst choice, it means you think it's worse than "doing whatever the firmware sets up, except a few fixups here and there which worked on my board". Whereas I think _that's_ actually even worse. What might be an even bigger offence than giving different provisioning to different customers is giving different documentation to different customers. In the Aquantia Register Specification for Gen4 PHYs given to NXP, the SerDes mode field in register 1E.31C cannot even _take_ the value of 6. They're all documented only from 0 to 5. I only learned that 6 (XFI/2) was a thing from the discussion between Sean and Tim.