[PATCH] nvme: Use pci_iomap instead of ioremap
Pankaj Raghav
p.raghav at samsung.com
Thu Jan 27 05:16:29 PST 2022
On 2022-01-26 22:52, Keith Busch wrote:
> On Wed, Jan 26, 2022 at 05:33:06PM +0100, Christoph Hellwig wrote:
> The one problem I see with this, though, is that pci_iomap() will
> automatically clamp the mapped length to the resource's length, which
> may be shorter than the potential doorbell registers that the driver
> thinks it's getting.
The current implementation disallow the size to be greater than
the pci_resource_len(pdev, 0).
if (size > pci_resource_len(pdev, 0))
return -ENOMEM;
So, clamping shouldn't be an issue when we use pci_iomap.
--
Regards,
Pankaj
More information about the Linux-nvme
mailing list