Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp792970rdg; Wed, 11 Oct 2023 05:54:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/YXZPljbR6DCdXzXJJgiGQV+tKLZIt3/xmG3yKCRedWZTOMLf56HE9bGuZd8lVU6sIisC X-Received: by 2002:a92:c503:0:b0:352:a1ed:133a with SMTP id r3-20020a92c503000000b00352a1ed133amr21368432ilg.13.1697028859816; Wed, 11 Oct 2023 05:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697028859; cv=none; d=google.com; s=arc-20160816; b=Nxl8qwBdB1Gd38VFIUV2v0g92gltCamxiyyCU48bqd+m6PpDUfwh8FmlR56fhP3u7H VJ/nNxgdVG8nlv6jePuMGXatA6cz7Cuhu2XAd+ftE+F9aXpvMlJtzcdBqdddTFJt6RxS xd6x2KVYNxZ0StnAFCeJVGKK0Er0Cbv/C/5MbDJ05ZqUKWDrXVGsWe/sh8TVJ04gqh8k lpDRpUpVIyMDnVgCwmoSCp5iws9CEuVXPBFhes4CPa8cjEK9rw/kdmmbZG0fNzgGucO+ U4b5LqWzzFFQunGyUVCN1IvrjvTDD7iJihYmh1wJm1OnOQ3PnJE0Tv1zep4sgkqF8xoc gCHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ugSH8FJbysw/333UJfT2fX6aDJrXjkX7MBOTQ6zLQaY=; fh=8fseCZw4Zxmkmqmx6Hav3TSLCdzS1GvBj/V/pZ9QJ7A=; b=nrcpZYhp1irrieWzjAxwsjAkfXN7zkuVfGWg3LF7X3HGuN8m8BBkMxkG1b2LkDBQJx PWOYsDFXSD0HCXQkif9J+FkXdnl2CDORLHhfNksyZDMeFSlihrga4vrWPblGMEkUUnEc aSJwoeGw3CugWSR7SlpP2KLsEY2hdwKnxhKQFZBArFfRWeC0oI+jVzhj5Ru0X3FDvt6J tHn1XiPMaTf5WP37WL9hz90O+ZJ5ljs0iSo7LOfSR7WuVbHbNHED+SrwTz8PhSIlt0ga aJezMFtKilWUHMIV+k+cZpgTR/rTfM4QiJF82cbGzGSuUNw3aniPN80GfZF6mjlrmx1k Fw9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b1Z0nuFn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id k4-20020a6555c4000000b00578c914490bsi14831235pgs.494.2023.10.11.05.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:54:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b1Z0nuFn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6D1E481829E4; Wed, 11 Oct 2023 05:54:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346697AbjJKMyJ (ORCPT + 99 others); Wed, 11 Oct 2023 08:54:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231758AbjJKMyI (ORCPT ); Wed, 11 Oct 2023 08:54:08 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76C4892; Wed, 11 Oct 2023 05:54:07 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2792d70ae25so4602928a91.0; Wed, 11 Oct 2023 05:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697028847; x=1697633647; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ugSH8FJbysw/333UJfT2fX6aDJrXjkX7MBOTQ6zLQaY=; b=b1Z0nuFnUakxVeSaHlcTOsMoEysbLsq2/IhbUql1diY530QI3J0Ta0ASll3AGmwphR 1FZSriAftxPE+z4ChLQoMeGkdVm+2NEmYLMiSienDffn5t7AOaJU8yv7DxAOMWKWROjK sinZet94juIkl+U7IuPUWwA9O7IfMrXdWd4F7PYCw6JszW44NTRvMvcprMupIOdtPBI/ pNDKKhGHqPXscVJWvINILuh3DB5k72VBnAOVdjN3IURl+YczPOA9oeJ1mpZCG9RiiWkM haj/NQNcG6guijirxhl7YHeoqUzTzffD9ir8UaWHXobFBWPjsVoCecW0DKC2Isl1Ia3p Ydow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697028847; x=1697633647; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ugSH8FJbysw/333UJfT2fX6aDJrXjkX7MBOTQ6zLQaY=; b=geRkanNfc5UCpchVO7msiSs0Y9Acfw9gkGbixn175fv2DEBhWg0bJoTw/EFyZpyFLt w/vnxA2ysJ/BgHOZVYLU1hZf4oJyElmrmr83U+qHQReg2Qkga5mTCuxK/XKVioSNEFrO hrcJX9Y8dVBTAzGuBDV1RbBN1/WL+ykJdw5pfd2KO/qyeLwkFXHD7JRdo5lCOGfuhV4H hmOVdRGJZwOl4Tmc7l8qyR3TzS7H66Gv+kBeb4k3C65ofKBttu2mMkwOT/QPs5hI4+qv hgnT/QrP4joi+VCoDjCiqElDwGuOAQ8+y/mB2w49oti84TKZEkZ8tyAvNLFO75hlv5Es T+9Q== X-Gm-Message-State: AOJu0YzFFJnTBbfwp2+MGqXC8ZTXWWnnfR093gOOO+HDpHjk08kHf028 X1Ojh73jHI+xf4ptijerwXbSVQ7vHrRPmZcQ1oOW3zZd X-Received: by 2002:a17:90a:a393:b0:278:fa86:13d8 with SMTP id x19-20020a17090aa39300b00278fa8613d8mr17431628pjp.41.1697028846773; Wed, 11 Oct 2023 05:54:06 -0700 (PDT) MIME-Version: 1.0 References: <20230906095143.99806-1-aford173@gmail.com> <8cf5b8d1-5f03-438a-94bb-5691dee8cc86@lunn.ch> In-Reply-To: <8cf5b8d1-5f03-438a-94bb-5691dee8cc86@lunn.ch> From: Adam Ford Date: Wed, 11 Oct 2023 07:53:55 -0500 Message-ID: Subject: Re: [PATCH 1/2] net: ethernet: davinci_emac: Use MAC Address from Device Tree To: Andrew Lunn Cc: linux-omap@vger.kernel.org, aford@beaconembedded.com, =?UTF-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Grygorii Strashko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:54:17 -0700 (PDT) X-Spam-Level: ** On Wed, Sep 6, 2023 at 7:39=E2=80=AFAM Andrew Lunn wrote: > > On Wed, Sep 06, 2023 at 04:51:42AM -0500, Adam Ford wrote: > > Currently there is a device tree entry called "local-mac-address" > > which can be filled by the bootloader or manually set.This is > > useful when the user does not want to use the MAC address > > programmed into the SoC. > > > > Currently, the davinci_emac reads the MAC from the DT, copies > > it from pdata->mac_addr to priv->mac_addr, then blindly overwrites > > it by reading from registers in the SoC, and falls back to a > > random MAC if it's still not valid. This completely ignores any > > MAC address in the device tree. > > > > In order to use the local-mac-address, check to see if the contents > > of priv->mac_addr are valid before falling back to reading from the > > SoC when the MAC address is not valid. > > > > Signed-off-by: Adam Ford > > There is the potential for regressions here, since behaviour is being > changed. But i do think what you are doing make sense. > > Reviewed-by: Andrew Lunn I don't know who the right person is to ask, but is there any chance this can be accepted? adam > > Andrew