From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71228C433EF for ; Wed, 27 Apr 2022 15:45:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240158AbiD0PsU (ORCPT ); Wed, 27 Apr 2022 11:48:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240124AbiD0PsS (ORCPT ); Wed, 27 Apr 2022 11:48:18 -0400 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5f64:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98F033AA6D; Wed, 27 Apr 2022 08:45:03 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id A79E6300000A9; Wed, 27 Apr 2022 17:45:01 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 9BA891191F4; Wed, 27 Apr 2022 17:45:01 +0200 (CEST) Date: Wed, 27 Apr 2022 17:45:01 +0200 From: Lukas Wunner To: Andrew Lunn Cc: Steve Glendinning , UNGLinuxDriver@microchip.com, Oliver Neukum , "David S. Miller" , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-usb@vger.kernel.org, Andre Edich , Oleksij Rempel , Martyn Welch , Gabriel Hojda , Christoph Fritz , Lino Sanfilippo , Philipp Rosenberger , Heiner Kallweit , Russell King Subject: Re: [PATCH net] usbnet: smsc95xx: Fix deadlock on runtime resume Message-ID: <20220427154501.GB15329@wunner.de> References: <6710d8c18ff54139cdc538763ba544187c5a0cee.1651041411.git.lukas@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Apr 27, 2022 at 05:24:50PM +0200, Andrew Lunn wrote: > You have looked at this code, tried a few different things, so this is > probably a dumb question. > > Do you actually need to call phy_init_hw()? I should add that the PHY register state may not be preserved on runtime PM if woken via the ->reset_resume hook and I believe that's the case when phy_init_hw() is necessary. smsc95xx_suspend() currently accesses PHY registers behind the PHY driver's back to enable Energy Detect Powerdown and it uses smsc95xx_mdio_write_nopm() for that, hence that doesn't deadlock *currently*, but the code should be moved to the PHY driver, and then it will. Thanks, Lukas