From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A398FA04DB; Wed, 14 Oct 2020 22:44:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E8011DA66; Wed, 14 Oct 2020 22:44:55 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id C8DD01BC92; Wed, 14 Oct 2020 22:44:51 +0200 (CEST) IronPort-SDR: QcnTOp2qv2QTF3qiZJ3vQaFX+TAz1OP/MoP2XuHwScw9w39d5mtrI/OOTH5p0BVzpFCOCFPqzR QurK+TCyuFag== X-IronPort-AV: E=McAfee;i="6000,8403,9774"; a="183720968" X-IronPort-AV: E=Sophos;i="5.77,375,1596524400"; d="scan'208";a="183720968" 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/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 13:44:47 -0700 IronPort-SDR: BUb9/nTBInGfY5Wm73ebyp408lgTAimxFOGCBvcEsSj5Ap8KCtW56uJf3P/lb7YJxf+kRNnfqC ocFX60V1BPaQ== X-IronPort-AV: E=Sophos;i="5.77,375,1596524400"; d="scan'208";a="520520663" Received: from rmenon-desk.amr.corp.intel.com (HELO [10.166.30.253]) ([10.166.30.253]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 13:44:46 -0700 To: Tal Shnaiderman , dev@dpdk.org Cc: thomas@monjalon.net, pallavi.kadam@intel.com, dmitry.kozliuk@gmail.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, stable@dpdk.org References: <20201014193001.13820-1-talshn@nvidia.com> From: Ranjit Menon Message-ID: <00e4029d-26cc-db01-3a07-493c8f11c4d0@intel.com> Date: Wed, 14 Oct 2020 13:44:45 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201014193001.13820-1-talshn@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH] bus/pci: clear undefined bits in Windows segment parsing 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/14/2020 12:30 PM, Tal Shnaiderman wrote: > When reading bus and segment values using SPDRP_BUSNUMBER > bits 24-31 are undefined. > > They are cleared to verify we read the segment number correctly. > > Fixes: c3adf8144a1 ("bus/pci: support segment value as address domain on Window") > Cc: stable@dpdk.org > > Signed-off-by: Tal Shnaiderman > --- > drivers/bus/pci/windows/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c > index 2cd010a09b..2b0a7a7c86 100644 > --- a/drivers/bus/pci/windows/pci.c > +++ b/drivers/bus/pci/windows/pci.c > @@ -195,7 +195,7 @@ get_device_pci_address(HDEVINFO dev_info, > return -1; > } > > - addr->domain = bus_num >> 8; > + addr->domain = (bus_num >> 8) & 0xffff; > addr->bus = bus_num & 0xff; > addr->devid = dev_and_func >> 16; > addr->function = dev_and_func & 0xffff; Acked-by: Ranjit Menon