Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp391825pxp; Wed, 9 Mar 2022 05:13:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGcrinXTRRmKYI+wXFmYc57goB3wvaq6KblpSzPf6NwPKuEycq5rS8kE4SO/TFWs/lbfpI X-Received: by 2002:a05:6a00:16d6:b0:4e0:ed6a:cf82 with SMTP id l22-20020a056a0016d600b004e0ed6acf82mr23437827pfc.9.1646831599031; Wed, 09 Mar 2022 05:13:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646831599; cv=none; d=google.com; s=arc-20160816; b=tutKXAng12lMzIOM0BislXHuWocDq/byiLMqFpu68vVOQr1dWAgrMnI43wUxWYmw9l dcYXyEKuJAPli3Yw/Xulcxt/PVekl1KqJH9Mimsc2VT/WjS2RGkMmCkzVOq2EMVWUqJA tnmg3M2WVH4OO2/I0/MNwKAfGAole+NhJws48GrQHv61wpaqOG1hn2z0abOi5T2EEv83 ALCUz4FWvCYuJfCBAJqiTMBAO6OvPIU6Ys1sdKLf+dw2ZrpotNRLCzHHDQSuLrya8CMZ ITwtG+1unTNreRy6fLywIMmqfHKrg43B6F16uyqakp4ChKeyWOePGRWsTfLOYehEGuWs BMJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date; bh=727mk4vGnEjDxSy/Y+M2lrdN1Tzk4X66mGatSlPt+oo=; b=gbcg7lvF63MtGb/wRSBxDqVn0QYwRkNU/zt7Nre/ow+0simpDVnK4ElCvypjA21BFd Iy3Rb7jIEKPsGZ34ELHaswXPId2AMkHFArN/YJ19cbQ9Jf/8LUCJ8J5Pcx3GTNyYl3mA t09PtQ0tndaNZLVsNBCWM8IA9upY/fckEOpiBhrGQxHzfDbEaFMJ3OLHSiEYlCjkT5dU BFCMNF1F558cfyju3/igJGyVKGTP9RFzZFokqt3qVXRfyU/rHrlHdk4zhgFTr8QVKlwG e9fsVqmK+bXxd074Av9E6DRxmyLQfAMj8QSxq0Eat86ZFAhAz6VVmMmYwlXMMWgqnNSB 6qNw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o16-20020a637310000000b003632751f27asi1803720pgc.308.2022.03.09.05.13.01; Wed, 09 Mar 2022 05:13:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232256AbiCIMTu (ORCPT + 99 others); Wed, 9 Mar 2022 07:19:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232360AbiCIMTo (ORCPT ); Wed, 9 Mar 2022 07:19:44 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 275B3128666 for ; Wed, 9 Mar 2022 04:18:46 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nRvH4-0008IN-H2; Wed, 09 Mar 2022 13:18:38 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nRvH1-0000g4-SU; Wed, 09 Mar 2022 13:18:35 +0100 Date: Wed, 9 Mar 2022 13:18:35 +0100 From: Oleksij Rempel To: "David S. Miller" , Jakub Kicinski , Andrew Lunn , Heiner Kallweit , Russell King Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, paskripkin@gmail.com Subject: net: asix: best way to handle orphan PHYs Message-ID: <20220309121835.GA15680@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 08:30:44 up 88 days, 16:16, 77 users, load average: 0.22, 0.28, 0.24 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hello all, I have ASIX based USB Ethernet adapter with two PHYs: internal and external. The internal PHY is enabled by default and there seems to be no way to disable internal PHY on the MAC level without affecting the external PHY. What is the preferred method to suspend internal PHY? Currently I have following options: - suspend PHY in the probe function of the PHY driver - get the phydev in the MAC driver and call phy_suspend() - whisper magic numbers from the MAC driver directly this the MDIO bus. Are there other options? Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |