[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4cf0d7710a74095a14bedc68ba73612943683db4.camel@redhat.com>
Date: Wed, 27 Mar 2024 14:20:06 +0100
From: Philipp Stanner <pstanner@...hat.com>
To: Heiner Kallweit <hkallweit1@...il.com>, Bjorn Helgaas
<bhelgaas@...gle.com>, Realtek linux nic maintainers
<nic_swsd@...ltek.com>, Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski
<kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, David Miller
<davem@...emloft.net>
Cc: "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"netdev@...r.kernel.org"
<netdev@...r.kernel.org>
Subject: Re: [PATCH 0/2] PCI: Add and use pcim_iomap_region()
On Wed, 2024-03-27 at 12:52 +0100, Heiner Kallweit wrote:
> Several drivers use the following sequence for a single BAR:
> rc = pcim_iomap_regions(pdev, BIT(bar), name);
> if (rc)
> error;
> addr = pcim_iomap_table(pdev)[bar];
>
> Let's create a simpler (from implementation and usage perspective)
> pcim_iomap_region() for this use case.
I like that idea – in fact, I liked it so much that I wrote that
myself, although it didn't make it vor v6.9 ^^
You can look at the code here [1]
Since my series cleans up the PCI devres API as much as possible, I'd
argue that prefering it would be better.
But maybe you could do a review, since you're now also familiar with
the code?
Greetings,
P.
[1] https://lore.kernel.org/all/20240301112959.21947-1-pstanner@redhat.com/
>
> Note: The check for !pci_resource_len() is included in
> pcim_iomap(), so we don't have to duplicate it.
>
> Make r8169 the first user of the new function.
>
> I'd prefer to handle this via the PCI tree.
>
> Heiner Kallweit (2):
> PCI: Add pcim_iomap_region
> r8169: use new function pcim_iomap_region()
>
> drivers/net/ethernet/realtek/r8169_main.c | 8 +++----
> drivers/pci/devres.c | 28
> +++++++++++++++++++++++
> include/linux/pci.h | 2 ++
> 3 files changed, 33 insertions(+), 5 deletions(-)
>
Powered by blists - more mailing lists