* [PATCH] ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev
@ 2016-08-24 21:16 Dave Jiang
2016-08-24 22:04 ` Allen Hubbe
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jiang @ 2016-08-24 21:16 UTC (permalink / raw)
To: allen.hubbe, jdmason; +Cc: linux-ntb
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>
---
drivers/ntb/hw/intel/ntb_hw_intel.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
index 40d04ef..3ad1f15 100644
--- a/drivers/ntb/hw/intel/ntb_hw_intel.c
+++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
@@ -1718,6 +1718,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;
@@ -1982,6 +1984,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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev
2016-08-24 21:16 [PATCH] ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev Dave Jiang
@ 2016-08-24 22:04 ` Allen Hubbe
2016-11-01 20:33 ` Jon Mason
0 siblings, 1 reply; 4+ messages in thread
From: Allen Hubbe @ 2016-08-24 22:04 UTC (permalink / raw)
To: 'Dave Jiang', jdmason; +Cc: linux-ntb
From: Dave Jiang
> 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>
> ---
> drivers/ntb/hw/intel/ntb_hw_intel.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
> index 40d04ef..3ad1f15 100644
> --- a/drivers/ntb/hw/intel/ntb_hw_intel.c
> +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
> @@ -1718,6 +1718,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;
> @@ -1982,6 +1984,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;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev
@ 2016-10-27 18:06 Dave Jiang
0 siblings, 0 replies; 4+ messages in thread
From: Dave Jiang @ 2016-10-27 18:06 UTC (permalink / raw)
To: jdmason; +Cc: linux-ntb, allen.hubbe
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>
---
drivers/ntb/hw/intel/ntb_hw_intel.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
index 0d5c29a..d6fe7ab 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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev
2016-08-24 22:04 ` Allen Hubbe
@ 2016-11-01 20:33 ` Jon Mason
0 siblings, 0 replies; 4+ messages in thread
From: Jon Mason @ 2016-11-01 20:33 UTC (permalink / raw)
To: Allen Hubbe; +Cc: 'Dave Jiang', linux-ntb
On Wed, Aug 24, 2016 at 06:04:36PM -0400, Allen Hubbe wrote:
> From: Dave Jiang
> > 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>
Sorry for missing this one. In my tree now.
Thanks,
Jon
>
> > ---
> > drivers/ntb/hw/intel/ntb_hw_intel.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
> > index 40d04ef..3ad1f15 100644
> > --- a/drivers/ntb/hw/intel/ntb_hw_intel.c
> > +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
> > @@ -1718,6 +1718,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;
> > @@ -1982,6 +1984,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;
> >
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-01 20:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24 21:16 [PATCH] ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev Dave Jiang
2016-08-24 22:04 ` Allen Hubbe
2016-11-01 20:33 ` Jon Mason
-- strict thread matches above, loose matches on Subject: below --
2016-10-27 18:06 Dave Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).