All of lore.kernel.org
 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: [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:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07 13:33 [PATCH 0/2] various fixes for eal/bsd Tiwei Bie
2017-05-07 13:33 ` Tiwei Bie [this message]
2017-05-08  8:55   ` [PATCH 1/2] eal/bsd: fix ioport write operation Bruce Richardson
2017-05-08  9:07     ` Tiwei Bie
2017-05-08  9:46       ` Bruce Richardson
2017-05-07 13:33 ` [PATCH 2/2] eal/bsd: fix the read operation on PCI configuration space Tiwei Bie
2017-05-08  9:47   ` Bruce Richardson
2017-05-10 13:58 ` [PATCH 0/2] various fixes for eal/bsd Thomas Monjalon

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.