🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8663

Re: [PATCH net 06/11] net: au1000: assign a valid MAC address without platform data

#8663
From: Florian Fainelli
Date: Thu, 29 Oct 2026 17:33
71 lines
13923 bytes
On 10/29/26 09:15, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
> 
> Low priority / nit picks for your consideration:
> 
> - [Low] The code change is correct, but the commit message overstates its
>    impact.
> 
> --
> 
> net: au1000: assign a valid MAC address without platform data
> 
> This commit adds a call to eth_hw_addr_random() in the no-platform-data
> branch of au1000_probe(). Without it, dev_addr stays all zeroes and
> eth_validate_addr() refuses to open the device.
> 
>> The supported no-platform-data path leaves dev_addr as all zeroes. The
>> device can register but eth_validate_addr() prevents it from opening.
> 
> [ ... ]
> 
>> Fixes: 7718f2c27dbd ("au1000_eth: use eth_hw_addr_random() instead of random_ether_addr()")
> 
> [Severity: Low]
> The code change itself looks fine. Is "supported" the right word for this
> path, though, and does a Fixes: tag fit here?
> 
> As far as I can tell, no in-tree configuration reaches the !pd branch in
> au1000_probe(). The only "au1000-eth" platform devices in the tree are in
> arch/mips/alchemy/common/platform.c, and both set platform data
> statically:
> 
> au1xxx_eth0_device:
> 	.platform_data          = &au1xxx_eth0_platform_data,
> 
> au1xxx_eth1_device:
> 	.platform_data          = &au1xxx_eth1_platform_data,
> 
> board-mtx1.c only copies replacement pdata into those static structs
> through au1xxx_override_eth_cfg(). au1000_eth_driver has no
> of_match_table either, so device tree can't create an instance without
> pdata.
> 
> On in-tree boards, a missing or invalid PROM MAC leaves pd->mac zeroed.
> That case already takes the existing else branch:
> 
> 		if (is_valid_ether_addr(pd->mac)) {
> 			eth_hw_addr_set(dev, pd->mac);
> 		} else {
> 			/* Set a random MAC since no valid provided by platform_data. */
> 			eth_hw_addr_random(dev);
> 		}
> 
> So it looks like only out-of-tree board code that registers the device
> without platform data can hit the zero MAC failure.
> 
> Could the commit message describe this as a latent fix for users without
> pdata? Without in-tree users, would net-next without the Fixes: tag be a
> better fit than a stable backport?
> 

Agreed that “supported” overstates the in-tree impact. I’ll describe 
this as a latent regression in the no-platform-data fallback.

I’ll retain the Fixes tag because that commit removed the unconditional 
random-address initialization, introducing this behavior.
-- 
Florian
Technical Details
Message-ID: <b3a52e91-170e-464d-b1fa-a545f6abe5a2@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353413-linux-kernel-netdev=dewy.ru
References: <20261027223140.3774570-7-f.fainelli@gmail.com> <179329051563.3134.3476237104312720828@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353413-linux-kernel-netdev=dewy.ru
From: f.fainelli@gmail.com (Florian Fainelli)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 06/11] net: au1000: assign a valid MAC address without
 platform data
Date: Thu, 29 Oct 2026 10:33:32 -0700
Organization: Usenet Network
Message-ID: <b3a52e91-170e-464d-b1fa-a545f6abe5a2@gmail.com>
References: <20261027223140.3774570-7-f.fainelli@gmail.com>
 <179329051563.3134.3476237104312720828@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2060437"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:4fETy83X46AJgxiFnh8Bp+ViThQ= sha256:KHtYgT9d6OgdcM7lypSFO62Gd8w0oU5jBk+zKhlVgUc=
	sha1:7tszvwNk97mjItAs6JxyKJ3uhzo= sha256:F8/YzdCqCUwD4QfcR7itiAOhkNv0LHv9F5aZlSJ1mJI=
Content-Language: en-US, fr-FR
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 4DC53125C6C; Thu, 29 Oct 2026 20:34:01 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Vd2zxoIFF3mE;
	Thu, 29 Oct 2026 20:33:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353413-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id E7F99125C6B; Thu, 29 Oct 2026 20:33:49 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 517F62579F; Thu, 29 Oct 2026 17:33:40 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793295219;
	b=ACio9irbo5iN70sAZPVDD12ZCYANxbJS0JZCUKA4yde6+sMWhYY7V/xHXxC2aUYDFxlB
	 hCIYaHAbkbndpai/indt1zznhd/5AYdQYI7T21jgq8iOxlse2XMfCRYX7pAzm03QX7mrK
	 LXl8GW9A3HKWVROL6f3KYNjs4YYDskZX86Dbw7soi8IlDif4BGC9FNxY+RhWNK7I3J7oN
	 yquwX38ImfnbBXxk2OxxvPlcIJlSoq1AUDmhYCD3tr6rpgE9cf12UPUZe6S1B4w7rM46N
	 hTqBOEnt+VNH+oaFuFTCw4TmO48rcHC4UQ8/5ZHsBdIWFECGHMUhT8Za9MZg9D2+geQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793295219;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=uuZVr2dDD8L7r8hiDqf/9pAQVEjMjpBKtDSDj+H9kVI=;
	b=VisErd8p7eRt7ZX84yighXnGOLzR2HsujsPHkQBqt8GoCEysS7s7w+Hvlvi4w+usZAPK
	 m+A6ZJHLuH2Rt0BIvWaSW3TOO2dwihem3cgay9gWo5eB/c1XOm1ePfUpmk0MbMtYaZfYB
	 N10tg4H+MlefALxrQMmXlv1JtxEHNTNFrBgdGpUEq5URMRVVJ6GdlRvLIpeiqAlVUC95q
	 ux2ow7qNr58Z3FeThgL9SQPqTp/acQSh0yAfQl5ynR6HIqrtApOwk8rbc/qwjOB/MNJdo
	 nVeXmCEnUsZAIr9/tqIaRYyZrdDL3HNl9mJqinz5mZNsLxIqB5agxgFVJILNdo2oCHA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="K9Lg2hR/";
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id C342F606A329;
	Thu, 29 Oct 2026 17:33:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=K9Lg2hR/
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.178
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793295219;
	b=FjcSqoULNf8WwCWbMmOHW5+uhwQ9djE2smjiP0J0RmUyadWmXD45Bv13V41BwDF6A9Dx
	 /I54l+GNLiQSAAUotdwecxp4ncl9LdFNQed7XVQONCcp1tUc4iyhxSLzSG15QHdlmqkqt
	 V40UOsdgWijVoBvJxJWcOXngTnJX7XKSn+ZMwcucNiT+zTpqxFshMgYQcEqe/K3UGBSUV
	 QdK8hU+J6AZ+DZn7yhRLSsV2Y9nkU/anOIxK8mXx6Pb4yo75WWEL8YaHaxQ0kmvKKkVJw
	 cwoZpmdaGljpfDqqnPMOVYDCYSQhA/lWIKu9XEIVs3E6XTj9SKZ1o0BaWorK1BZUOFA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793295219;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date:
	 MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language:
	 From:In-Reply-To:Content-Type:Content-Transfer-Encoding;
	bh=uuZVr2dDD8L7r8hiDqf/9pAQVEjMjpBKtDSDj+H9kVI=;
	b=Txc2iFBzKLztMKwUGLyoA5wcLiZxM7EoeDmES8IXWrWaScJhx5zRE1j4WPBMcfNlaHyI
	 vPHO9HHZi6tgkY1UajrH6z/ePdmZGEwGwQINjpWpx+MN5qZpbhctSn5UM7L7Dxs9VUfOe
	 n5u0amLVyQxfdOHOjJSSa6HNUGkNQ+JwQWfta4Kh+hlW54ycsdVRPG3lu8Yv3unC8Vxc4
	 F4rmoTDh7PWuA0tRgd04lon+J1WsO73LtCoGK3ODPZ4F5/wKWrx3PCXrAjY9zsPN3Ko83
	 YCGH8dcWaOTrk6NIDfcyTuN/s69BtxRSOOcQrl33O94fxzbhSi50q+TEWEa904MtoVA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="K9Lg2hR/";
	arc=none smtp.remote-ip=209.85.214.178
X-Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9567C606A31C
	for <netdev@vger.kernel.org>; Thu, 29 Oct 2026 17:33:38 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9567C606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2e985106c0cso21811965ad.2
        for <netdev@vger.kernel.org>; Thu, 29 Oct 2026 10:33:38 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793295218; x=1793900018; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:in-reply-to:from
         :content-language:references:cc:to:subject:user-agent:mime-version
         :date:message-id:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=uuZVr2dDD8L7r8hiDqf/9pAQVEjMjpBKtDSDj+H9kVI=;
        b=K9Lg2hR/BcJ3lcLhlIPYRwiKpVggLgPBY7jwOhmSKQBwZ8ZUmwigu084YPVxYiPJ39
         W14DEurU0hHITVNzc0ooaUCuTFlJ/A4cB7VLjfO2t8tUk6tawb9Jr61kbcJkJHcG9EYW
         /++a6lcYtlnEhP+e4ChCLdocYZhEpThs6tXBfATq9gZbfH2CVqNrchEzkByYr1tuUEjw
         /EB21+Ztw6Uw4LBCfhivfX0/cQeanJUVc89i5c9EA4L9jQlU3n+Y2ZF8yhxrC5u+fVYj
         gIGWJNkW+UB0pnvXA7lsERKUBGue+2tL6T5YvsI5BPd0PNEA51o/RqYWZIGGmYiVYpt5
         5Jqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793295218; x=1793900018;
        h=content-transfer-encoding:content-type:in-reply-to:from
         :content-language:references:cc:to:subject:user-agent:mime-version
         :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=uuZVr2dDD8L7r8hiDqf/9pAQVEjMjpBKtDSDj+H9kVI=;
        b=KwVrSQ/fxKPfh8buXIBrpSXP8LXUOmpqCSbA38E7ut6iUeOVGbVVVRU/HWBKQk6au8
         uNHsgRKc8yKKYpfGJ23VNTOhyS9N1zn5ok+V+S+CcUk/VlRLVkrYiljejahcJ/ZJ1Gjf
         nu0MHWO5qjgSCrggMOmiykv1muV7/wKHQutTaAM5SK7G/OpRyR3VSRf5B/iStKjolc/N
         bUJHiMePg8uKWup3gCn211M5YL6OijVE4OBmChFsDDltLOtV5NWgg4AnwLt9BFzmxwc4
         LV58m07dszaQzYLEzBx69IZeZlXNNsGlUFCtkSkpj1cMFgtFnnjhyF2BN5JI6monSOdw
         4Q6g==
X-Gm-Message-State: AFq9FYLFftdZYWHxYlhq6vkajh/YJ5gOZSKV5TRbnjUwFOqzN412pfSK
	BU177WEmFjhYthbE8craAzAW56iqQH77qXnQUCSIGubFFRn8sWF6+fJ7
X-Gm-Gg: AYBFou11Sx7Fk2+eG6wG6xcUuCUWcJm2dvCLaNhlNrLmJWbv+6a1v+c3BewpCZfll9x
	bc2X+IO96Y4VIGVeake3yxvThvw61I7xLDcw9j0epEiUDDtwm7yCscws3GEoNS02FyPQzDhzCkw
	KnBDF2ZdXVZnrlmC9tsCmuAAtrYgbFRf8A4AFeLWRs5lJ331Wq4EhKpOxaA1n8gGmrufyIcWRwc
	fEKfE4i/xamoxMu+vBk0JljyPFG17A3VI2QZmnlsPKA25GDKr6uqz5S/HOAWjg3W/qOrneC46fy
	QNcaWksrrGPrHrUZmds1qwfvYVwMmimCv7Kiq4arCDWLX7IxYX3KDjKCvjD7AuC8Yh5LI0Fw7t9
	5r8J1zxY4EUmKi2ASNpyvGJHWZ5NKiumB3IgmqNQqcoVrEgtsnJeq0bCQ2mrrJ98Rozb9lT87d3
	LUOXXkJl0m1sKKbCZ/O5zibc3M/QXF6N89gFmMwaYK0LgaBZh2XKnUPwlhQVoUTesqL4VY/pchm
	o3FS/YtFfRT+DaLhBMYP5pBuFQVxgCHmJlRq1an9e/BQLw7h+58Hzoy00sgaP3zNhrdJ+b6qxHK
	wA1Q4lSHKOdQuuRMTW28SL+33TQgp0ACzdGK+AnPBpeuKJb7+95TejzQ
X-Received: by 2002:a17:903:37c7:b0:2e8:b5b2:a9f9 with SMTP id d9443c01a7336-2eb364e9f75mr553035ad.37.1793295217825;
        Thu, 29 Oct 2026 10:33:37 -0700 (PDT)
X-Received: from [10.67.48.245] ([192.19.223.252])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-2eb3630396asm295325ad.35.2026.10.29.10.33.35
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Thu, 29 Oct 2026 10:33:36 -0700 (PDT)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
 edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
 hkallweit1@gmail.com, linux@armlinux.org.uk, shaojijie@huawei.com,
 horms@kernel.org, runyu.xiao@seu.edu.cn, mmyangfl@gmail.com, hvr@gnu.org,
 jeff@garzik.org, danny.kukawka@bisect.de, mugunthanvnm@ti.com,
 sebastian.hesselbarth@gmail.com, linux-kernel@vger.kernel.org,
 manuel.lauss@gmail.com
X-In-Reply-To: <179329051563.3134.3476237104312720828@kernel.org>