Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2990336rwb; Wed, 30 Nov 2022 13:48:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf5VSDC7r4tWw3BTFPikW+VytyKnVhKVqp4K/AFLLPF+7VZmzG+fd8bbX+W11Lfr3JlKi7Cf X-Received: by 2002:a65:6049:0:b0:477:2ac1:9d2c with SMTP id a9-20020a656049000000b004772ac19d2cmr36495949pgp.184.1669844916723; Wed, 30 Nov 2022 13:48:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669844916; cv=none; d=google.com; s=arc-20160816; b=AfKBpLJ1odvFGbyA7xezpGS5Gsqip0e9PAT3tnyjoKEdDqV6gnB7R7oNXPxtqZr5Tx jBPfsvlWGEdrOy9NgYP3Yep/qFddN7Hf4XrvT1jgkNC+NRJpJ6M7yY/R9fIlaAqBlapa Yrj0gFCBi4uhHBt6xap+c6U6LaSgnvhHtySSQevueodcWRcX4VATlSH75hRPx7hmemLA /Zm1AvpAnPljK4KmWvhWlK0iQKC4HfFbVDJqcFl+Tm7cmA+nM7bdKGgapjUNSnysghry Z2g5mlEfjKSciuCuAuPzgraHJusTwZTJCKdtKkLIiVg/jCFoICHA20Wgx+D6dYkvwwyo 5Rlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lbdNefhhgXM7ZaI0RoGL+Vf+j9ov0wu6h8WSdMv2Ff4=; b=JEuh6yiKLt6t8YDPYXGePfi2flAkdA4XchFDUoXP2ssiQravpvpG4laGuWV96eDka9 nDlIEc0KdOyFn7GMjoq+WVi7UC6zhqnso7UReCwgESkxPJWMobuAScbIHK4pWX9TNEBm A6i82wD1P6zZZBkSAuDnDPpD6CVObwk2/sekJvmowJpNvIJYcDnjZ13I0ySrwLg159nJ fYmi0vYNJx+IphUmUbe8ki3FHxwGZoVbRGGDFF528Mnc4WfxDkOKhDxgwT6L2D53j1Bi N3gVV0BzpyV9/Sb2SzYyoSyI1ZDJ5LaGxnKpQGu3T+c1rbu2Blizib5PDDPyvo9IOpDL FEhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Pbt1JYlX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h24-20020a631218000000b00477f939f971si2304050pgl.480.2022.11.30.13.48.06; Wed, 30 Nov 2022 13:48:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Pbt1JYlX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbiK3Vdd (ORCPT + 83 others); Wed, 30 Nov 2022 16:33:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbiK3Vd2 (ORCPT ); Wed, 30 Nov 2022 16:33:28 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF7964E691; Wed, 30 Nov 2022 13:33:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=lbdNefhhgXM7ZaI0RoGL+Vf+j9ov0wu6h8WSdMv2Ff4=; b=Pbt1JYlXAKfCaAMAYKIKJqHAwE B3ujmaiKSDSg1p+rvpwUQSaVq440+VzfZhlIKgv2f2A3GmOX+Y137OjVA956qFMRorszuLZoWZjrw fU3L3BXP/s06KhweF+IzNZ9GVP66u1x+7H2PFs5dButx9GT9nFbyhKEf7rGw0xi+hkfY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p0UhK-00407n-Qa; Wed, 30 Nov 2022 22:32:54 +0100 Date: Wed, 30 Nov 2022 22:32:54 +0100 From: Andrew Lunn To: Brian Masney Cc: irusskikh@marvell.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cth451@gmail.com Subject: Re: [PATCH] net: atlantic: fix check for invalid ethernet addresses Message-ID: References: <20221130174259.1591567-1-bmasney@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 > > > - return !(addr[0] == 0 && addr[1] == 0 && addr[2] == 0); > > > + return !(addr[0] == 0 && addr[1] == 0 && addr[2] == 0) && > > > + !(addr[3] == 0 && addr[4] == 0 && addr[5] == 0); > > > > Hi Brian > > > > is_valid_ether_addr() > > aq_nic_ndev_register() already calls is_valid_ether_addr(): > > if (is_valid_ether_addr(addr) && > aq_nic_is_valid_ether_addr(addr)) { > (self->ndev, addr); > } else { > ... > } > > That won't work for this board since that function only checks that the > MAC "is not 00:00:00:00:00:00, is not a multicast address, and is not > FF:FF:FF:FF:FF:FF." The MAC address that we get on all of our boards is > 00:17:b6:00:00:00. Which is a valid MAC address. So i don't see why the kernel should reject it and use a random one. Maybe you should talk to Marvell about how you can program the e-fuses. You can then use MAC addresses from A8-97-DC etc. Andrew