From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id C67675F72 for ; Fri, 16 Mar 2018 18:43:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2018 10:43:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,316,1517904000"; d="scan'208";a="212009979" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.62]) ([10.237.221.62]) by fmsmga006.fm.intel.com with ESMTP; 16 Mar 2018 10:43:33 -0700 To: Ravi Kumar , dev@dpdk.org References: <1515145938-97474-1-git-send-email-Ravi1.kumar@amd.com> <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> <1520584954-130575-4-git-send-email-Ravi1.kumar@amd.com> From: Ferruh Yigit Message-ID: <58b8cdb2-5822-b580-0b32-d65c068b5eb4@intel.com> Date: Fri, 16 Mar 2018 17:43:32 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1520584954-130575-4-git-send-email-Ravi1.kumar@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 04/18] net/axgbe: add structures for MAC initialization and reset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 17:43:35 -0000 On 3/9/2018 8:42 AM, Ravi Kumar wrote: > Signed-off-by: Ravi Kumar <...> > @@ -167,6 +358,106 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) > pci_dev = RTE_DEV_TO_PCI(eth_dev->device); > pdata->pci_dev = pci_dev; > > + pdata->xgmac_regs = > + (uint64_t)pci_dev->mem_resource[AXGBE_AXGMAC_BAR].addr; > + pdata->xprop_regs = pdata->xgmac_regs + AXGBE_MAC_PROP_OFFSET; > + pdata->xi2c_regs = pdata->xgmac_regs + AXGBE_I2C_CTRL_OFFSET; > + pdata->xpcs_regs = (uint64_t)pci_dev->mem_resource[AXGBE_XPCS_BAR].addr; > + > + /* version specific driver data*/ > + if (pci_dev->id.device_id == 0x1458) > + pdata->vdata = &axgbe_v2a; > + else > + pdata->vdata = &axgbe_v2b; Can replace hardcoded value 0x1458 with define. <...>