Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp215374iob; Mon, 2 May 2022 17:27:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNJ9s7mm/A5ZfY4CdiK41w2Jo7dwQEGRRG02LQ3s7FttI0Y8ibAfnvTJ4DwDNShfvxIeWS X-Received: by 2002:a17:902:ec8a:b0:15e:967b:f928 with SMTP id x10-20020a170902ec8a00b0015e967bf928mr11152973plg.133.1651537668736; Mon, 02 May 2022 17:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651537668; cv=none; d=google.com; s=arc-20160816; b=C0cbeh+Z410WMSs2HHhxQZIvbF+R+9V1HeZhxn3zXnfdDhsyk1x4bpTMbtovPGeecr qM2Q69E7jYUZPEak4Dl+AF055VL0ewb83cMswR5Tsbn9U1bs7+PoRl7hHUWg5/wIJ57I r+OI+Mpm9bNKfHDSxwSOYbYXGEpkDj82P0bZQSfgRHT0kboAdiOYXvXkW4dS5atrG8He x484Hfg+A2spW9qf1FOStnk3/2GGKsv6fkX8m2MvzhhCB3eggC3afnYbZSg2T+p+ulJt vl0q8Qm73DaSmWc/odak8X1FC5cw7oR/DufdEaLYvSrlvVMjz6FKwWi/oSxZKZSRx2ZY IZXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3+qzA7PHMmDHNHuNIiXNUOUy8rzwaRd3MaO7YujuXCQ=; b=IhqAQAOPHEPL4EYf49BhcZFHlm3Iqwp8LgNX33g3o9Mz61iUnLXTyRUYImfarqTlZ6 Yt2HRPvOWIZ4xj6H/h+8Xd8VBzDM42v9pHbRbCrVvQkIW/NMd/uF6KCtRBrvUXf0w86r VEPN2klhmL8VQEM94m2VreVFReYf9wyUwKsg6qoFAeSpB/jBsbb1iWITvC+0VREQ4opR t4PbUSI88ZUf8Jp50grquxGRlvixpGBrfrXRoNP8qQhPzeKClrSeN58H7EhJvlfmTtw5 3JAx912Uet+1W/r985/p2tUIy1hooI0H04DRkOOxsnLkqsYB3rvJHCaQgrWn64A8XPfO KB/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=xXWvZRUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c2-20020a056a00248200b0050dd2797010si7178902pfv.321.2022.05.02.17.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:27:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=xXWvZRUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E8E83BBD4; Mon, 2 May 2022 17:22:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241768AbiEAGZw (ORCPT + 99 others); Sun, 1 May 2022 02:25:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbiEAGZs (ORCPT ); Sun, 1 May 2022 02:25:48 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85DD650464; Sat, 30 Apr 2022 23:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3+qzA7PHMmDHNHuNIiXNUOUy8rzwaRd3MaO7YujuXCQ=; b=xXWvZRUz+UeJyVHlrRbK9vEEWU kc13z1UURFsemmhkm8BX2rGCOM6oSATTMIpaHZkI0Clvngr4KK9i0rMgFKxoy+8CjVUVp3CNvGtUO koMDmQsRLXiXKAxNVVjGlD0sk0A7biSGGwTs3dcmWh8ivQkfXXh3mxHnpJXaxnfCmgZMGUeFWVMVN T+/OKD2uj9nKchkGTuBuevzcr8ph2nfMCtvB7A0vobMrOVwsEq1qIxfJvpt45TIMu9I8/Vs/HKbeH gb09Y8J9r/CtQcN56LflJToxs3TxQhnYdpUk1/H3POiJ3/BZH2m7oReSWZLRelFIC+Rv3g6d9vbuO o0yR0hgw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:58468) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nl2yF-0005yo-0i; Sun, 01 May 2022 07:22:14 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nl2yC-0003fG-Os; Sun, 01 May 2022 07:22:12 +0100 Date: Sun, 1 May 2022 07:22:12 +0100 From: "Russell King (Oracle)" To: Peter Geis Cc: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Jakub Kicinski , "open list:ARM/Rockchip SoC..." , Linux Kernel Network Developers , Linux Kernel Mailing List Subject: Re: [PATCH v1] net: phy: fix motorcomm module automatic loading Message-ID: References: <20220228233057.1140817-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Sat, Apr 30, 2022 at 12:31:27PM -0400, Peter Geis wrote: > On Sat, Apr 30, 2022 at 11:52 AM Andrew Lunn wrote: > > > > > Good Morning, > > > > > > After testing various configurations I found what is actually > > > happening here. When libphy is built in but the phy drivers are > > > modules and not available in the initrd, the generic phy driver binds > > > here. This allows the phy to come up but it is not functional. > > > > What MAC are you using? > > Specifically Motorcomm, but I've discovered it can happen with any of > the phy drivers with the right kconfig. > > > > > Why is you interface being brought up by the initramfs? Are you using > > NFS root from within the initramfs? > > This was discovered with embedded programming. It's common to have a > small initramfs, or forgo an initramfs altogether. If you're talking about embedded, it makes more sense to have the PHY drivers built-in. They will take up less text and data space that way. Typically, PHY drivers have very small amounts of text and data, and both of these end up being rounded up to a page size when loaded as a module. > Another cause is a > mismatch in kernel config where phylib is built in because of a > dependency, but the rest of the phy drivers are modular. > The key is: > - phylib is built in > - ethernet driver is built in > - the phy driver is a module > - modules aren't available at probe time (for any reason). This is why many ethernet drivers connect with their PHY in their .ndo_open method, rather than at probe time. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!