From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E52BC43441 for ; Thu, 15 Nov 2018 20:00:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA14320858 for ; Thu, 15 Nov 2018 20:00:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="Z5X5pB1/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA14320858 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388944AbeKPGJi (ORCPT ); Fri, 16 Nov 2018 01:09:38 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:36458 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbeKPGJi (ORCPT ); Fri, 16 Nov 2018 01:09:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=RFVaex0J5cVLVJaLe+VxyvJo3nA63HCzkrb3FqfhCKE=; b=Z5X5pB1/yABTI/baihjFdS7RjOCd4fKH/4TGwTZKHjTxaaazmBsgDK+Wvsw6O29XwRPfHAVE2Nc2fA0KTu9UtFiEdZrIcPDPmCMLli7kiZyTAF4VHN7zGw+fQfohJGBKAuEjzcAYgJQK60IWkjqaHgh5vbdiLuZ0ETJGNQKIqEI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gNNoI-0000Cb-5C; Thu, 15 Nov 2018 21:00:18 +0100 Date: Thu, 15 Nov 2018 21:00:18 +0100 From: Andrew Lunn To: thesven73@gmail.com Cc: svendev@arcx.com, siva.kallam@broadcom.com, prashant@broadcom.com, mchan@broadcom.com, davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, arnd@arndb.de Subject: Re: [PATCH v2] tg3: optionally get mac address from devicetree Message-ID: <20181115200018.GC32274@lunn.ch> References: <20181114135202.27104-1-TheSven73@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181114135202.27104-1-TheSven73@googlemail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 14, 2018 at 08:52:01AM -0500, thesven73@gmail.com wrote: > If the tg3 has a device node, and that node contains a valid > mac address property, use that as the tg3's mac address. > > This behaviour was previously only present on SPARC, using a > conditional compile (#ifdef CONFIG_SPARC), presumably because > at the time, devicetree nodes for pci devices only worked on > SPARC. However, this has recently been made universal, see > commit 98d9f30c820d ("pci/of: Match PCI devices to OF nodes dynamically") > > Devicetree example: > (see Documentation/devicetree/bindings/pci/pci.txt) > > &pcie { > host@0 { > #address-cells = <3>; > #size-cells = <2>; > reg = <0 0 0 0 0>; > bcm5778: bcm5778@0 { > reg = <0 0 0 0 0>; > mac-address = [CA 11 AB 1E 10 01]; > }; > }; > }; > > Signed-off-by: Sven Van Asbroeck Reviewed-by: Andrew Lunn Andrew