diff options
author | Dave Jiang <dave.jiang@intel.com> | 2016-10-27 20:06:44 +0200 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2016-11-13 22:48:29 +0100 |
commit | 25ea9f2bf5f76082da919f2a91ea8d920932c1da (patch) | |
tree | e011001648928005b421e63ed8587d06b4facf5a /drivers | |
parent | ntb: make DMA_OUT_RESOURCE_TO HZ independent (diff) | |
download | linux-25ea9f2bf5f76082da919f2a91ea8d920932c1da.tar.xz linux-25ea9f2bf5f76082da919f2a91ea8d920932c1da.zip |
ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev
The peer_addr member of intel_ntb_dev is not set, therefore when
acquiring ntb_peer_db and ntb_peer_spad we only get the offset rather
than the actual physical address. Adding fix to correct that.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Acked-by: Allen Hubbe <Allen.Hubbe@emc.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ntb/hw/intel/ntb_hw_intel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c index 1ee61d92c54b..7310a261c858 100644 --- a/drivers/ntb/hw/intel/ntb_hw_intel.c +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c @@ -1755,6 +1755,8 @@ static int xeon_setup_b2b_mw(struct intel_ntb_dev *ndev, XEON_B2B_MIN_SIZE); if (!ndev->peer_mmio) return -EIO; + + ndev->peer_addr = pci_resource_start(pdev, b2b_bar); } return 0; @@ -2019,6 +2021,7 @@ static int intel_ntb_init_pci(struct intel_ntb_dev *ndev, struct pci_dev *pdev) goto err_mmio; } ndev->peer_mmio = ndev->self_mmio; + ndev->peer_addr = pci_resource_start(pdev, 0); return 0; |