Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp518080imb; Fri, 1 Mar 2019 06:55:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzJPWtOSwxyOU6ZFtQ6NbxdO5tZhc5KovBYTHwrqxx/7C+FMDd3FjOu02BabvaLFP2PTlYR X-Received: by 2002:a65:6283:: with SMTP id f3mr5221832pgv.125.1551452113300; Fri, 01 Mar 2019 06:55:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551452113; cv=none; d=google.com; s=arc-20160816; b=I65ZeFc6g3tK4i9JBsEA+tUh2of0hyRKXjctNG/YKqN/1vOB59Un4PKvgUCMVhVQ0B p81Y4Iw8kw8LCQAhIDq/eBWCr0vC8Hym0znVfRijuMAVtu7goGv5bVLwg3MkcfJxHJ5v enD1KluWjsS3GoTaxmKKbifMxdHuOzGB/zMn53Alwse3nPvlHjwEwYCQFQ7KBPZCr8/k g/qw5PmtV6lXG0q0BHHi7VGTrvcAX1OMl3alwHpzncnARvg1+uxaLC4maEWXmQ5zqVwU u8mLsR9jONRF5H5aVz+2nf5tZTqJ9sRtNSnxUv4TRpU/2yRTyzcsUA7QiaXoClTBZkk6 AW8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from; bh=5jGZEK67sXPfbSBwyz6vuJgb0aFVBbcHKd20kz2mF7o=; b=vUPsaisOn107/wwVxqbY9ryIkjBH2INulzWAjbpGK9Ihko830ofiJ9KleQ2UzUhA5K l7+ysnyrz//A/ryfuWF+gYlnBZgMNdUs3RUa7VgKAS7zCW8G/Ut3036Bd4iNrUnJeaBy PgvWUkrp++dgpzuNWGlqFSYoty7MRdQfVuoP7nV9ck8u+lq/9sHrORquZTrre1tGhsO0 pdZgAoqtqfBTMC5GgYk5n5z/JSRCxZ6dby4Hd66gtwFUPvvU9nUWcsy+7NfeMl/YlRpT TOVLXxZgar9sbgXYKxnpQiB9LGqvIfaDAXALdZ1LUZ2p8uAuHv/04fj2qsuhf62aIl37 r89Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si21032978plq.266.2019.03.01.06.54.58; Fri, 01 Mar 2019 06:55:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388606AbfCAOwr convert rfc822-to-8bit (ORCPT + 99 others); Fri, 1 Mar 2019 09:52:47 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:54588 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728300AbfCAOwr (ORCPT ); Fri, 1 Mar 2019 09:52:47 -0500 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 95D4115632; Fri, 1 Mar 2019 14:52:45 +0000 (GMT) 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, 01 Mar 2019 14:52:45 +0000 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/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org 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 What happened to this patch? -- M?ns Rullg?rd