patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 1/2] eal/bsd: fix ioport write operation
Date: Sun,  7 May 2017 13:33:33 +0000	[thread overview]
Message-ID: <20170507133334.16219-2-tiwei.bie@intel.com> (raw)
In-Reply-To: <20170507133334.16219-1-tiwei.bie@intel.com>

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 <tiwei.bie@intel.com>
---
 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

       reply	other threads:[~2017-05-07 13:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170507133334.16219-1-tiwei.bie@intel.com>
2017-05-07 13:33 ` Tiwei Bie [this message]
2017-05-08  8:55   ` Bruce Richardson
2017-05-08  9:07     ` Tiwei Bie
2017-05-08  9:46       ` Bruce Richardson
2017-05-07 13:33 ` [dpdk-stable] [PATCH 2/2] eal/bsd: fix the read operation on PCI configuration space Tiwei Bie
2017-05-08  9:47   ` Bruce Richardson
     [not found] <20170507132611.14016-1-tiwei.bie@intel.com>
2017-05-07 13:26 ` [dpdk-stable] [PATCH 1/2] eal/bsd: fix ioport write operation Tiwei Bie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170507133334.16219-2-tiwei.bie@intel.com \
    --to=tiwei.bie@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).