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 CD537C433FE for ; Tue, 23 Nov 2021 02:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232757AbhKWCZX (ORCPT ); Mon, 22 Nov 2021 21:25:23 -0500 Received: from mail.loongson.cn ([114.242.206.163]:38164 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232613AbhKWCZW (ORCPT ); Mon, 22 Nov 2021 21:25:22 -0500 Received: from [10.180.13.93] (unknown [10.180.13.93]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Axp+hCUJxhcHQAAA--.2721S2; Tue, 23 Nov 2021 10:21:55 +0800 (CST) Subject: Re: [PATCH v1 1/2] modpost: file2alias: fixup mdio alias garbled code in modules.alias To: Andrew Lunn Cc: Heiner Kallweit , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, zhuyinbo@loongson.cn, "David S. Miller" , Jakub Kicinski , Masahiro Yamada , Michal Marek , Nick Desaulniers , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org References: <1637583298-20321-1-git-send-email-zhuyinbo@loongson.cn> From: zhuyinbo Message-ID: Date: Tue, 23 Nov 2021 10:21:54 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: AQAAf9Axp+hCUJxhcHQAAA--.2721S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Aw17AFy3Ww48JFW7CrW8tFb_yoW8Cr17pF WxtryrGrWkXrn3CFs3JryUCFWUA392kw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Mailing-List: linux-kernel@vger.kernel.org 在 2021/11/22 下午10:07, Andrew Lunn 写道: > On Mon, Nov 22, 2021 at 08:14:57PM +0800, Yinbo Zhu wrote: >> After module compilation, module alias mechanism will generate a ugly >> mdio modules alias configure if ethernet phy was selected, this patch >> is to fixup mdio alias garbled code. >> >> In addition, that ugly alias configure will cause ethernet phy module >> doens't match udev, phy module auto-load is fail, but add this patch >> that it is well mdio driver alias configure match phy device uevent. > What PHY do you have problems with? What is the PHY id and which > driver should be loaded.     about that phy id,  phy dev read it from  PHY Identifier 1 and Identifier 2 register, phy driver will call MODULE_DEVICE_TABLE to configure     phy id to mdio_device_id, phy id was used to do a match phy driver with phy device.  that phy problems is phy driver was select 'M' then it     doesn't be auto load. > This code has existed a long time, so suddenly saying it is wrong and > changing it needs a good explanation why it is wrong. Being ugly is > not a good reason. > > Andrew Hi Andrew,     Use default mdio configure, After module compilation, mdio alias configure is "alias mdio:0000000101000001000011111001???? marvell"     and it doesn't match  the match phy dev(mdio dev)  uevent, because the mdio alias configure "0000000101000001000011111001????"    include "?" and  "binary number",   as general, uevent it include one string or some string that string consist of one character and one hexadecimal digit ,     which uevent is reported by mdio when mdio register a device for ethernet phy device, only uevent from phy dev match alias configure from     phy driver that phy driver will can be auto-load when phy driver was selected  'M'. BRs Yinbo Zhu.