Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2532133pxb; Sun, 23 Jan 2022 07:39:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzc6BphWJJdguBW7qz6k5mNCClv6LmQEcZu5m1+jk7O1dkw2zYWA0zS+W8cQtH5WopJyPFH X-Received: by 2002:a63:7c51:: with SMTP id l17mr9175230pgn.469.1642952356519; Sun, 23 Jan 2022 07:39:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642952356; cv=none; d=google.com; s=arc-20160816; b=HqhjN2WGYe+bs8UGFUueA7w9HmyZemlu8MKhMTWsGYBp7shWfacnMKr7TjrpjM8mJi Q7DEB5a1bUU/5JL/s64x0ym7K3W1mlYW0gPSLEf5uzifsPR/kMMjCpovQDOK4v4lsagX WniMR9WfGWwurP29jA/ZYiJuUjA3Lv77WpAPVJ8kRVePnEQbcUX1x8U/PfMsPHSlbymb zyRLOUqMG8JwyrzMxSesQUkhUH8SO+GABfpllPfUf0F8qjIW54YRGV2hI5QIED2NixLI y81198P0Q3CGMf7WeZFMogTnwpCljsYyy519DrMqW3BGlb/6RQnDr29Hc+mtkse8zo+9 pLJg== 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=EILhThOZz6AMIrApvuxhh7LQsxC+OdGSS/Ijnj3VP0U=; b=t7uJ6SDIa5XHl5MLzp6/CJjZOmiBzOkkkHTuHXQJ6ZarGatuizg76hXnFwN5xt6txp T+Ix7e+9O0jzViiVPLW/t0zFx22mlXS1SxKxdNq3l0Z8d/v0qWZXIXbPNejoWhZ3PnH+ YXL/EO4EtbY13jkC1KnmJSvfHC2iijMGoin9ji0Csq8E4FdX14SxvM5oT46LxtEAJS+I zoOkV7ViY1hQub5weoRpodHi/3QDQBnqyb4gbOtji3oR+Qntqja/AuaWqGucjsSaEcJ0 M6ZgTG0RXfp/037QnNS/XA/f6xicVy1rU+UWVlv1cMDZ3SKCk2JSWpkCZhrLi7TwuxdR tI1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=czU7ZQLF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 17si2758120plj.166.2022.01.23.07.39.04; Sun, 23 Jan 2022 07:39:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=czU7ZQLF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234903AbiAVVSy (ORCPT + 99 others); Sat, 22 Jan 2022 16:18:54 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:49048 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230339AbiAVVSw (ORCPT ); Sat, 22 Jan 2022 16:18:52 -0500 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=EILhThOZz6AMIrApvuxhh7LQsxC+OdGSS/Ijnj3VP0U=; b=czU7ZQLFY1/OHBtJ3uZuH0jVhQ x96bcmr5U1aRSCAN/9mMvscMKWMSP9bgXSOxU/0h5ho22cVjiX5IKtPW2rUCjFtDFuD2B1ubFvhlJ SkJqPcOf2PM4AwW7IcDUeFduxquF4i/Gyrqj4CIR6ABtVJmxny0tmtk3Hgw1KBFsuylA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nBNmP-002KKW-Jz; Sat, 22 Jan 2022 22:18:37 +0100 Date: Sat, 22 Jan 2022 22:18:37 +0100 From: Andrew Lunn To: Heiner Kallweit Cc: Kai-Heng Feng , linux@armlinux.org.uk, "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: phy: marvell: Honor phy LED set by system firmware on a Dell hardware Message-ID: References: <20220120051929.1625791-1-kai.heng.feng@canonical.com> <3d7b1ff0-6776-6480-ed20-c9ad61b400f7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3d7b1ff0-6776-6480-ed20-c9ad61b400f7@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > One more idea: > The hw reset default for register 16 is 0x101e. If the current value > is different when entering config_init then we could preserve it > because intentionally a specific value has been set. > Only if we find the hw reset default we'd set the values according > to the current code. We can split the problem into two. 1) I think saving LED configuration over suspend/resume is not an issue. It is probably something we will be needed if we ever get PHY LED configuration via sys/class/leds. 2) Knowing something else has configured the LEDs and the Linux driver should not touch it. In general, Linux tries not to trust the bootloader, because experience has shown bad things can happen when you do. We cannot tell if the LED configuration is different to defaults because something has deliberately set it, or it is just messed up, maybe from the previous boot/kexec, maybe by the bootloader. Even this Dell system BIOS gets it wrong, it configures the LED on power on, but not resume !?!?!. And what about reboot? So i really would like the bootloader to explicitly say it has configured the LEDs and it takes full responsibility for any and all bad behaviour as a result. Andrew