Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp10709rdb; Wed, 1 Nov 2023 15:07:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhQ0qs3odB1kA1PEAzxb88AsgoEahlJ6bOXRdMd2rnXQvq08L7N5qPgU2E9zQ8eaH1yEw9 X-Received: by 2002:a05:6a20:3944:b0:181:8654:8260 with SMTP id r4-20020a056a20394400b0018186548260mr1020105pzg.39.1698876476324; Wed, 01 Nov 2023 15:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698876476; cv=none; d=google.com; s=arc-20160816; b=USDVJeZl7ttMlDmlTalOH0dgtpLlNOjW7i5d2XrVTEjLl0mTyu1iIhM65Uds0IEL+j 8QQQoMT8K9Ua1KLkN5Hv86VQVhYJVvHzZmmnljXeLZnJ3XMSJLrAI0tzDs6mGr8O6a0i 56ZLo0lf/oE4uBB4qCVyUCYLL4iyYJnsEkfuYz1mgGZ1CZvZZO9e4YQwaRXF6dZKhGwm LYSPkZYRd/kAFeHAJ7sT96V1GzJHOpQORaGNFMiRlr9Hy9swXRi9iTn+qphKS+mgVaab NLHWBFUz0+JIvXRqbyT+Zu4hoyREKoSZ45WiBCaLC9Qi+9RIxw0isSPL1W8WkRMJCqas Z2/A== 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=KgzCwQKtlZ3s9s50rcNwyHCoDZfACulHcl3W84haDr4=; fh=cEjTKHvWzrDXaeEW35y4IWasG4Hkhs/vv+evhy232xk=; b=pG6uFli2r7fWfprOffGJotO09aXqfmFE0Lgvr2H0sj/q64VGbSqjYWrQSp0GcJHTO4 8W3rfPlxoJ9mgJ2IGKs/TxrtK4bGfFo8Yxvd1oIyXHrXDZHDyXDg4MRXGtL0ItRPy9At RnwtWbfV+GRbPPW9oie4Z4Uc3HtQUZo5G+UKmq+Nf28NN7raIrg1ZPRkwTlZ1YA0rpxH wzThQ0b2fsSsPXSuPFlWFDX/pjm8/+S7k8HMeuTKA/xknaKaaU7uimsFk58WSSwYaF9p 7Kz4Awb5Xbt4U3vHkzeFCoaCasVxVGAZbxPNPsauRxidD3l6KdbxjNQejRGdexrFIbOe zD2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=OYSWK1YF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id k3-20020aa788c3000000b006be08015248si2558548pff.294.2023.11.01.15.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 15:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=OYSWK1YF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5887C80FC14D; Wed, 1 Nov 2023 15:07:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234934AbjKAWHV (ORCPT + 99 others); Wed, 1 Nov 2023 18:07:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232007AbjKAWHU (ORCPT ); Wed, 1 Nov 2023 18:07:20 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1F0F119; Wed, 1 Nov 2023 15:07:13 -0700 (PDT) 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=KgzCwQKtlZ3s9s50rcNwyHCoDZfACulHcl3W84haDr4=; b=OYSWK1YF4X45HUwjA5CyXAzwr2 /I4EiffvQhPEokY4fA6QF5iTIGSbLgS1U7eaPZ3xM5YUXoCWdnp7l+T9d39GuiTedyO9gyx0P9zrh H9xyPPmNIIHUpVljhJ4VYDhb3R/0m9rJp8J/aJRXg5auR8X7biR0ppHoyZF2vVMLhtSo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qyJMW-000i2r-4k; Wed, 01 Nov 2023 23:06:56 +0100 Date: Wed, 1 Nov 2023 23:06:56 +0100 From: Andrew Lunn To: Marco von Rosenberg Cc: Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: broadcom: Wire suspend/resume for BCM54612E Message-ID: References: <20231030225446.17422-1-marcovr@selfnet.de> <9cb4f059-edea-4c81-9ee4-e6020cccb8a5@lunn.ch> <5414570.Sb9uPGUboI@5cd116mnfx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5414570.Sb9uPGUboI@5cd116mnfx> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 01 Nov 2023 15:07:51 -0700 (PDT) On Wed, Nov 01, 2023 at 10:42:52PM +0100, Marco von Rosenberg wrote: > On Tuesday, October 31, 2023 1:31:11 AM CET Andrew Lunn wrote: > > Are we talking about a device which as been suspended? The PHY has > > been left running because there is no suspend callback? Something then > > triggers a resume. The bootloader then suspends the active PHY? Linux > > then boots, detects its a resume, so does not touch the hardware > > because there is no resume callback? The suspended PHY is then > > useless. > > Hi Andrew, > > thanks for your feedback. I guess a bit of context is missing here. The issue > has nothing to do with an ordinary suspension of the OS. The main point is > that on initial power-up, the bootloader suspends the PHY before booting > Linux. With a resume callback defined, Linux would call it on boot and make the > PHY usable. Ah, so you rely on phy_attach_direct() calling phy_resume(phydev). This seems an odd way to solve the problem. It was not Linux which suspend the PHY, so using resume is asymmetric. I think soft_reset() or config_init() should be taking the PHY out of suspend. Andrew