From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C507E1E34; Sun, 7 May 2017 15:34:56 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 May 2017 06:34:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,304,1491289200"; d="scan'208";a="83702957" Received: from unknown (HELO localhost.localdomain) ([10.239.129.160]) by orsmga002.jf.intel.com with ESMTP; 07 May 2017 06:34:54 -0700 From: Tiwei Bie To: dev@dpdk.org Cc: bruce.richardson@intel.com, stable@dpdk.org Date: Sun, 7 May 2017 13:33:33 +0000 Message-Id: <20170507133334.16219-2-tiwei.bie@intel.com> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170507133334.16219-1-tiwei.bie@intel.com> References: <20170507133334.16219-1-tiwei.bie@intel.com> Subject: [dpdk-dev] [PATCH 1/2] eal/bsd: fix ioport write operation 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: Sun, 07 May 2017 13:34:57 -0000 The first param of out*() on FreeBSD is port, and the second one is data. But they are reversed in DPDK. This patch fixes it. Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie --- lib/librte_eal/bsdapp/eal/eal_pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 6294b7eab..59ceb7665 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -618,13 +618,13 @@ pci_uio_ioport_write(struct rte_pci_ioport *p, for (s = data; len > 0; s += size, reg += size, len -= size) { if (len >= 4) { size = 4; - outl(*(const uint32_t *)s, reg); + outl(reg, *(const uint32_t *)s); } else if (len >= 2) { size = 2; - outw(*(const uint16_t *)s, reg); + outw(reg, *(const uint16_t *)s); } else { size = 1; - outb(*s, reg); + outb(reg, *s); } } #else -- 2.12.1