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 4D79F23D; Thu, 28 Dec 2017 07:12:15 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Dec 2017 22:12:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,469,1508828400"; d="scan'208";a="15656387" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.198]) by orsmga003.jf.intel.com with ESMTP; 27 Dec 2017 22:12:13 -0800 From: Zhiyong Yang To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, stable@dpdk.org, Zhiyong Yang Date: Thu, 28 Dec 2017 14:12:10 +0800 Message-Id: <20171228061210.64767-1-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-stable] [PATCH] bus/pci: fix wrong intr_handle.type with uio_pci_generic X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2017 06:12:16 -0000 In the function rte_pci_ioport_map, if uio_pci_generic is used on X86 platform, pci_ioport_map() is invoked, the operation ev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; is execused directly, it causes the wrong assignment for uio_pci_generic, the patch fixes it. Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API") Cc: stable@dpdk.org Signed-off-by: Zhiyong Yang --- drivers/bus/pci/linux/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c index 5da6728fb..8ff7dbfd7 100644 --- a/drivers/bus/pci/linux/pci.c +++ b/drivers/bus/pci/linux/pci.c @@ -723,7 +723,9 @@ pci_ioport_map(struct rte_pci_device *dev, int bar __rte_unused, if (!found) return -1; - dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; + if (dev->kdrv == RTE_KDRV_NONE) + dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; + p->base = start; RTE_LOG(DEBUG, EAL, "PCI Port IO found start=0x%x\n", start); -- 2.13.3