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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham 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 EE68DC282C0 for ; Wed, 23 Jan 2019 06:08:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA5F2217F5 for ; Wed, 23 Jan 2019 06:08:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="o7A+FMbR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726168AbfAWGIe (ORCPT ); Wed, 23 Jan 2019 01:08:34 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40780 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725972AbfAWGIe (ORCPT ); Wed, 23 Jan 2019 01:08:34 -0500 Received: by mail-wr1-f66.google.com with SMTP id p4so931944wrt.7 for ; Tue, 22 Jan 2019 22:08:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RrrCmsHN9Pn6XX0b0GWe3YsJT3i+cQfNruJxD2J2iHY=; b=o7A+FMbRMC24jPVf6LzuDW59d0lMYAukZQ68QFzQ/3gtZHrtVwGjr/WVIEcHHCXYta CROXdp6gfM3WeU6u9mKfNMOUyH1+vAYSJoUED53pxQN60j/qd/1KcZaF/Nulfx3kBCpP qyDDmjWrSfsTsY1q0ksFwDlsS3Rih4z3rEQrmNGwOS++KCdgEnkUmpSM6yT+rqL19xFY eAw34EhhSYKGSpJNwt8bdXcvBdjgUcKxEDXXUg+34WPFVwELuXnBKsey9jV+9fydLm0q lwzl5Neguve8XJxAGCb+rSBJQM4PjADBAIwH/8nN4D36dtXlJVvrqTdtd736Yf0O38P5 rHyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RrrCmsHN9Pn6XX0b0GWe3YsJT3i+cQfNruJxD2J2iHY=; b=N8utJ/NUPsi21h54TZcnIG9bfIxkfh3Q8dbhM7FhgEQxz+mCYG103Vj13Z64ShlqTn cDzwp/W/UcglXo35XffDQj7niH7Q0X0yu+YvstVidsCOHY6FMgfwsQPyhcj8E1MuMcq6 4J3X4gn1uZWr+QV2gSqZCDRaAe0ApC8BI2UgeevyyKW2R04YfnFYDonO4OmN+46agafg 4+txY43gYLyY1pRh/4dzao2CTs7uoBzn6SJRjyPPg3gS5ulyUa9CfPza6uOx3eCmQElB sms5we9wf165vfXM5DeLYLtdJQKS5E26eGPImbQwQtsj1Rh835eZLrSSKX4e6liNZbVE K5VQ== X-Gm-Message-State: AJcUukfPqtuJfkHnUX9eW7GrcIu8U+eg1Y1uRv/YupkgiMbzLKWnEAME DgMJeGqqbD1WPQ+ApW8xjV/Amh2a X-Google-Smtp-Source: ALg8bN5zRRI90taHHoc3GOwVyrXJRV+X4W/ieTyLmt+WHFvh/0GuKgBzs5hKgn/mrEQ6InlXeGCYuw== X-Received: by 2002:adf:e9d1:: with SMTP id l17mr943655wrn.73.1548223712138; Tue, 22 Jan 2019 22:08:32 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:341c:e0b9:6ec:c590? (p200300EA8BF1E200341CE0B906ECC590.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:341c:e0b9:6ec:c590]) by smtp.googlemail.com with ESMTPSA id j14sm81215270wrv.96.2019.01.22.22.08.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 22:08:31 -0800 (PST) Subject: Re: [PATCH net-next] net: phy: fix issue with loading PHY driver w/o initramfs To: David Miller Cc: krzk@kernel.org, andrew@lunn.ch, f.fainelli@gmail.com, netdev@vger.kernel.org References: <8699eccc-4a12-09d2-5322-4e2533215258@gmail.com> <20190122.144514.1376079275051498197.davem@davemloft.net> From: Heiner Kallweit Message-ID: Date: Wed, 23 Jan 2019 07:08:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190122.144514.1376079275051498197.davem@davemloft.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 22.01.2019 23:45, David Miller wrote: > From: Heiner Kallweit > Date: Sat, 19 Jan 2019 10:30:21 +0100 > >> It was reported that on a system with nfsboot and w/o initramfs network >> fails because trying to load the PHY driver returns -ENOENT. Reason was >> that due to missing initramfs the modprobe binary isn't available. >> So we have to ignore error code -ENOENT. >> >> Fixes: 13d0ab6750b2 ("net: phy: check return code when requesting PHY driver module") >> Reported-by: Krzysztof Kozlowski >> Signed-off-by: Heiner Kallweit > > Applied. > > However, I agree with Geert that we should adopt the: > > if (module_not_present) > request_module(); > if (module_not_present) > goto failed_to_load; > > pattern. > I know this is the standard pattern for request_module(). Unfortunately the situation is a little bit tricky with PHY drivers. We don't know whether there's a module matching the PHY ID and it's a valid use case that there's no such module. In such a case we bind the genphy driver later, and a lot of PHY's are totally happy with the genphy driver and therefore no dedicated PHY drivers exist.