pci: fix config space access on FreeBSD
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Fri, 6 May 2016 07:43:15 +0000 (13:13 +0530)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 15 Jun 2016 15:13:55 +0000 (17:13 +0200)
commitd9d4b291bad1bf7ef9823ff467ac70688820bf91
tree4aaa42e3cdcca8db0aa64a12994ea1347cfe21eb
parent0e51f9dc486075f38c33f59fb8ffbacffcafaa9d
pci: fix config space access on FreeBSD

PCIOCREAD and PCIOCWRITE ioctls to read/write PCI config space fail
with EPERM due to missing write permission.  Fix by opening /dev/pci/
with O_RDWR instead.

Fixes: 632b2d1deeed ("eal: provide functions to access PCI config")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
lib/librte_eal/bsdapp/eal/eal_pci.c