Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp582830rdd; Tue, 9 Jan 2024 13:04:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAn177oKKkvZOAWZCNa2+2U7Pi3HdH9m8cQdstxIo2DZkPFZBRqDPll5shqX/89+XVImUJ X-Received: by 2002:a05:6358:2799:b0:174:f06b:333d with SMTP id l25-20020a056358279900b00174f06b333dmr8118027rwb.41.1704834295297; Tue, 09 Jan 2024 13:04:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704834295; cv=none; d=google.com; s=arc-20160816; b=I/xM/FO7ldX5NzcjW/+uzpsEx/8wP5y61xDg0GuSo4Qwb9EsreR/bJC4PO8K/JJ68G SrulOXSLluHKN+9yHS+Rnlom5VFnhM81qCnoyuw7i8Xu1S8/AyWV+5b4z5cmrB6114gC zbA7ACQvuNKqqfV6Hw9nc5sIJQJbrWAdTAOb5kidFBM0Dx6yJjqYVglv4RWuSEYxBxKO 4YKYld/QTcDffzYQICrTh5QXz4BiFtFGPgUbBbmmyfDubL43Gh7Tmlh53RhwvCRp9vGV bQSBK/qtEu9M+gSYQUtG1qduUlBHp/a8msHJBD5VmSkWE0y6oXc8uiXX/lhwNPeILS6/ rrYQ== ARC-Message-Signature: i=1; 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:message-id:subject:cc :to:from:date:dkim-signature; bh=uUMg5TD5JrrVZUCVQclU7k/tLZTcoCPXga7lbuCsQMU=; fh=Rj4xhKrr8Q90QII5AA/SEZMHNiOVhN1866K0QT7AcLY=; b=tovuo0JlSzqirQlVJ4hKuTvdxwXLWx/WJpatXngepHG4QOaBpO+j6hqHl/G3g1fHAW VySCDO1HNFq5R+6o/3nHRpKYCnV4KtiSu0IJIFrZJ0lc96gGcMlKmB5mOZDjYfKSPrk8 Ya7aepw7A+WizVTcVmnPEDzMLTHIxgr8DP4FfgL+2wYBmobOezsnS5G2ZKr0JTtAKDe0 lu0Swua80aXsLDaAMut49gxmFRv/XBLa3F776PxiTzxvqaooWPOdijqRB44beEMn3faI ipDXnfU4BI9iyQkNPeah4CVV5xq+QWlciT49dtohdcEnQ2MA5q90TWilxGo6BCfzpDer OWDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=co1IF7FL; spf=pass (google.com: domain of linux-kernel+bounces-21406-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21406-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j17-20020a63e751000000b005ceca0f3bbasi2050733pgk.429.2024.01.09.13.04.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 13:04:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21406-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=co1IF7FL; spf=pass (google.com: domain of linux-kernel+bounces-21406-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21406-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 07A2B280209 for ; Tue, 9 Jan 2024 21:04:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A35C3DB86; Tue, 9 Jan 2024 21:04:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="co1IF7FL" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 610633DB80; Tue, 9 Jan 2024 21:04:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=uUMg5TD5JrrVZUCVQclU7k/tLZTcoCPXga7lbuCsQMU=; b=co1IF7FLKVCpJqUCQqUR5EB/qv YXkGqpWrEBBfsI3LH5+1v17HBgHPMBD6whq8nE2IpEn7lLNShbguPyYueTMOezGhkqQEtreRfB+aZ dTAJFqShuO0G+i37mmcvvRSu4zvSe5UyoyAQz1/2oARsR0Aa0XtUOXJhhuA13kTy+zhI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rNJGm-004rs1-2U; Tue, 09 Jan 2024 22:04:20 +0100 Date: Tue, 9 Jan 2024 22:04:20 +0100 From: Andrew Lunn To: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, Philippe Schenker , Francesco Dolcini , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] net: phy: micrel: reset KSZ9x31 when resuming Message-ID: References: <20240109205223.40219-1-wsa+renesas@sang-engineering.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: <20240109205223.40219-1-wsa+renesas@sang-engineering.com> > +static int ksz9x31_resume(struct phy_device *phydev) > +{ > + phy_device_reset(phydev, 1); > + phy_device_reset(phydev, 0); > + > + return kszphy_resume(phydev); > +} > + > static int kszphy_probe(struct phy_device *phydev) > { > const struct kszphy_type *type = phydev->drv->driver_data; > @@ -4778,7 +4786,7 @@ static struct phy_driver ksphy_driver[] = { > .get_strings = kszphy_get_strings, > .get_stats = kszphy_get_stats, > .suspend = kszphy_suspend, > - .resume = kszphy_resume, > + .resume = ksz9x31_resume, Humm, i'm not so sure about this. phy_resume() is called by mdio_bus_phy_resume(). That first does a call to phy_init_hw(), which will perform a soft reset on the PHY, call the drivers config_init() callback, and the config_intr() callback. Then it calls phy_resume(). Does phy_resume() hitting it with a reset clear out the configuration done by config_init() and the interrupt configuration performed by config_intr()? Andrew