Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12627569rwd; Fri, 23 Jun 2023 08:31:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/Pk4gjKN4kjo2XfPdqb1FRcSIUzlL2YozkNsibr3SkCJFGwv8VragZPSj9Pu5IPSi0LBW X-Received: by 2002:a17:902:f547:b0:1b6:7172:62ec with SMTP id h7-20020a170902f54700b001b6717262ecmr14926484plf.66.1687534266597; Fri, 23 Jun 2023 08:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687534266; cv=none; d=google.com; s=arc-20160816; b=gkTSBI811hGPYgfBAQy87H/0uPre/QjpOsCPlKgZ/ue8y273RfOuMnozZC/Qhev/be YJkpORfhuSNS/h6+VMx7vmnORuHP/aRoBVHsq225FiALPmxzTYjZucswX2FMmD0wlDM3 an9I2QwJ0x14tQW6iANz302YMmtwG2hU9dgxGWdXrJzYhFdUmM5CwU8ZY7VbVE38k7MQ WDXnXwG9Fn1V4GAigpqdlmhBRtNBH2jcUpdFyirGkcLZL8ea3xh12dwU21HnDksMXwEe k8V2XasZmJHYmX5mMh+0wLaSPLiVUzTN3FvQEwvEXWhTB3UFMRs84jc3PHDNJ9h88Ntv fItw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from; bh=kLZn5NV6HkoCLZh9iYBaPkj4Gr5Cv6IoRu7kNb9miUU=; b=MPBMnHVml2IaXEaWKZV2URmJHmONlEcUlnL39Po7e9gX+qmlM3qzMlJJntqpSdfzQe FXo5bjgaoC7ZB/VZw2zLrmsQMCqSCV7+m7bbUKrS56vrWO9XcPbbF5OXmK6ar9YVPX5Q Lk73oi7h8uVk8iEWpZKTLAUOnLmBZvbUBu2gLQWKQkIPiqvgFntlU4ZULpOvm+DLFIHq BXIKfoKj87S1wcgI3qbrJwS9JTnb72/Z1O03vUj8vnIKEJ6/9khTlmOHac2Kx5Tj0f0O gC6NSvoUhOHv7zqnoL+PQPdgTTuy1nCVlHvA1a4iqo+701rt5wrFDj5KUkuxEGsuLq8x SydQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a170902ecc700b001b67e138562si6932830plh.44.2023.06.23.08.30.53; Fri, 23 Jun 2023 08:31:06 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232420AbjFWPIT convert rfc822-to-8bit (ORCPT + 99 others); Fri, 23 Jun 2023 11:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231271AbjFWPIO (ORCPT ); Fri, 23 Jun 2023 11:08:14 -0400 Received: from unicorn.mansr.com (unicorn.mansr.com [81.2.72.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 892772139 for ; Fri, 23 Jun 2023 08:08:08 -0700 (PDT) Received: from raven.mansr.com (raven.mansr.com [IPv6:2001:8b0:ca0d:1::3]) by unicorn.mansr.com (Postfix) with ESMTPS id 62CB315360; Fri, 23 Jun 2023 15:58:03 +0100 (BST) Received: by raven.mansr.com (Postfix, from userid 51770) id 5590D219FD4; Fri, 23 Jun 2023 15:58:03 +0100 (BST) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Tony Lindgren Cc: Jeroen Hofstee , netdev@vger.kernel.org, Mugunthan V N , Grygorii Strashko , "open list:TI ETHERNET SWITCH DRIVER (CPSW)" , open list Subject: Re: [PATCH v2] net: cpsw: fix obtaining mac address for am3517 References: <1477668756-2651-1-git-send-email-jhofstee@victronenergy.com> <20161028155213.2t3nwwe3lqaynaer@atomide.com> <20161028181914.mskebckucukzhxhz@atomide.com> Date: Fri, 23 Jun 2023 15:58:03 +0100 In-Reply-To: <20161028181914.mskebckucukzhxhz@atomide.com> (Tony Lindgren's message of "Fri, 28 Oct 2016 11:19:14 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tony Lindgren writes: > * Jeroen Hofstee [161028 11:19]: >> Hello Tony, >> >> On 28-10-16 17:52, Tony Lindgren wrote: >> > * Jeroen Hofstee [161028 08:33]: >> > > Commit b6745f6e4e63 ("drivers: net: cpsw: davinci_emac: move reading mac >> > > id to common file") did not only move the code for an am3517, it also >> > > added the slave parameter, resulting in an invalid (all zero) mac address >> > > being returned for an am3517, since it only has a single emac and the slave >> > > parameter is pointing to the second. So simply always read the first and >> > > valid mac-address for a ti,am3517-emac. >> > And others davinci_emac.c users can have more than one. So is the >> > reason the slave parameter points to the second instance because >> > of the location in the hardware? >> >> Sort of, the slave parameter gets determined by the fact if there is one >> or two register range(s) associated with the davinci_emac. In davinci_emac.c >> >> res_ctrl = platform_get_resource(pdev, IORESOURCE_MEM, 1); >> ... >> rc = davinci_emac_try_get_mac(pdev, res_ctrl ? 0 : 1, >> priv->mac_addr); >> >> So it there are two ranges, the slave param becomes 0. It there is only one, >> it >> will be 1. Since the am3517 only has a single regs entry it ends up with >> slave 1, >> while there is only a single davinci_emac. > > OK thanks for clarifying it: > > Acked-by: Tony Lindgren Is there some reason this patch was never picked up, or was it simply forgotten? -- M?ns Rullg?rd