X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fe1000%2Figb_pf.c;h=67da3c24c4ece184a8f6176b79cb99ec284bc6de;hb=39dc49db37b9539cda685c7922fe9258a36613a8;hp=7f45a44da029bc8e93a239fd28995b2cfa5ea8bd;hpb=2f5c0a4bc4f95c29231eea29f5407b1f84d6b4c3;p=dpdk.git diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c index 7f45a44da0..67da3c24c4 100644 --- a/drivers/net/e1000/igb_pf.c +++ b/drivers/net/e1000/igb_pf.c @@ -57,7 +57,9 @@ static inline uint16_t dev_num_vf(struct rte_eth_dev *eth_dev) { - return eth_dev->pci_dev->max_vfs; + struct rte_pci_device *pci_dev = E1000_DEV_TO_PCI(eth_dev); + + return pci_dev->max_vfs; } static inline @@ -172,8 +174,8 @@ int igb_pf_host_configure(struct rte_eth_dev *eth_dev) E1000_WRITE_REG(hw, E1000_VT_CTL, vtctl); /* Enable pools reserved to PF only */ - E1000_WRITE_REG(hw, E1000_VFRE, (~0) << vf_num); - E1000_WRITE_REG(hw, E1000_VFTE, (~0) << vf_num); + E1000_WRITE_REG(hw, E1000_VFRE, (~0U) << vf_num); + E1000_WRITE_REG(hw, E1000_VFTE, (~0U) << vf_num); /* PFDMA Tx General Switch Control Enables VMDQ loopback */ if (hw->mac.type == e1000_i350)