Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C33C3C64E7C for ; Wed, 2 Dec 2020 18:36:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5409F22248 for ; Wed, 2 Dec 2020 18:36:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727007AbgLBSgN (ORCPT ); Wed, 2 Dec 2020 13:36:13 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:34666 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbgLBSgN (ORCPT ); Wed, 2 Dec 2020 13:36:13 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kkWyR-009uDz-FR; Wed, 02 Dec 2020 19:35:31 +0100 Date: Wed, 2 Dec 2020 19:35:31 +0100 From: Andrew Lunn To: Grant Edwards Cc: Florian Fainelli , netdev@vger.kernel.org Subject: Re: net: macb: fail when there's no PHY Message-ID: <20201202183531.GJ2324545@lunn.ch> References: <20170921195905.GA29873@grante> <66c0a032-4d20-69f1-deb4-6c65af6ec740@gmail.com> <6a9c1d4a-ed73-3074-f9fa-158c697c7bfe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > When using the SIOC[SG]MIIREG ioctl() call, how does one control > whether the fake fixed-link bus is accessed or the real macb-mdio bus > is accessed? As far as i remember, that ioctl is based on the interface name. So it will access the MDIO bus of the PHY that is attached to the MAC. I guess you have user space drivers using the IOCTL to access devices on the real bus? A switch? Can you swap to a DSA driver? > How does the macb driver decide which bus/id combination to use as > "the phy" that controls the link duplex/speed settting the the MAC? phy-handle points to a PHY. Andrew