[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <58db6cb1-c62e-bedd-6542-9a0e40e3dd86@deltatee.com>
Date: Wed, 11 Jul 2018 10:52:29 -0600
From: Logan Gunthorpe <logang@...tatee.com>
To: Serge Semin <fancer.lancer@...il.com>, jdmason@...zu.us,
dave.jiang@...el.com, allenbh@...il.com
Cc: Sergey.Semin@...latforms.ru, linux-ntb@...glegroups.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ntb: idt: Set PCIe bus address to BARLIMITx
On 11/07/18 10:32 AM, Serge Semin wrote:
> @@ -1320,7 +1321,9 @@ static int idt_ntb_peer_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx,
> idt_nt_write(ndev, bar->ltbase, (u32)addr);
> idt_nt_write(ndev, bar->utbase, (u32)(addr >> 32));
> /* Set the custom BAR aperture limit */
> - limit = pci_resource_start(ntb->pdev, mw_cfg->bar) + size;
> + pcibios_resource_to_bus(ntb->pdev->bus, ®ion,
> + &ntb->pdev->resource[mw_cfg->bar]);
> + limit = region.start + size;
You should use the pci_bus_address() helper instead. It's much simpler
and you don't need to delve into pci_dev internals to use it.
Logan
Powered by blists - more mailing lists