pci: introduce library and driver
[dpdk.git] / drivers / net / bnx2x / bnx2x.h
index b3cd5fc..497bc69 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_spinlock.h>
+#include <rte_bus_pci.h>
 #include <rte_io.h>
 
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
@@ -1525,12 +1526,12 @@ bnx2x_reg_read32(struct bnx2x_softc *sc, size_t offset)
 #define REG_RD_DMAE(sc, offset, valp, len32)               \
     do {                                                   \
        (void)bnx2x_read_dmae(sc, offset, len32);                  \
-       (void)rte_memcpy(valp, BNX2X_SP(sc, wb_data[0]), (len32) * 4); \
+       rte_memcpy(valp, BNX2X_SP(sc, wb_data[0]), (len32) * 4); \
     } while (0)
 
 #define REG_WR_DMAE(sc, offset, valp, len32)                            \
     do {                                                                \
-       (void)rte_memcpy(BNX2X_SP(sc, wb_data[0]), valp, (len32) * 4);              \
+       rte_memcpy(BNX2X_SP(sc, wb_data[0]), valp, (len32) * 4);              \
        (void)bnx2x_write_dmae(sc, BNX2X_SP_MAPPING(sc, wb_data), offset, len32); \
     } while (0)
 
@@ -1977,7 +1978,7 @@ bnx2x_set_rx_mode(struct bnx2x_softc *sc)
 static inline int pci_read(struct bnx2x_softc *sc, size_t addr,
                           void *val, uint8_t size)
 {
-       if (rte_eal_pci_read_config(sc->pci_dev, val, size, addr) <= 0) {
+       if (rte_pci_read_config(sc->pci_dev, val, size, addr) <= 0) {
                PMD_DRV_LOG(ERR, "Can't read from PCI config space");
                return ENXIO;
        }
@@ -1989,7 +1990,7 @@ static inline int pci_write_word(struct bnx2x_softc *sc, size_t addr, off_t val)
 {
        uint16_t val16 = val;
 
-       if (rte_eal_pci_write_config(sc->pci_dev, &val16,
+       if (rte_pci_write_config(sc->pci_dev, &val16,
                                     sizeof(val16), addr) <= 0) {
                PMD_DRV_LOG(ERR, "Can't write to PCI config space");
                return ENXIO;
@@ -2001,7 +2002,7 @@ static inline int pci_write_word(struct bnx2x_softc *sc, size_t addr, off_t val)
 static inline int pci_write_long(struct bnx2x_softc *sc, size_t addr, off_t val)
 {
        uint32_t val32 = val;
-       if (rte_eal_pci_write_config(sc->pci_dev, &val32,
+       if (rte_pci_write_config(sc->pci_dev, &val32,
                                     sizeof(val32), addr) <= 0) {
                PMD_DRV_LOG(ERR, "Can't write to PCI config space");
                return ENXIO;