stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 1/4] stmmac: loongson: Pass correct arg to PCI function
       [not found] <20250226085208.97891-1-phasta@kernel.org>
@ 2025-02-26  8:52 ` Philipp Stanner
  2025-02-28  2:35   ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Stanner @ 2025-02-26  8:52 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Huacai Chen,
	Yanteng Si, Yinggang Gu, Feiyang Chen, Philipp Stanner,
	Jiaxun Yang, Qing Zhang
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Philipp Stanner, stable, Andrew Lunn, Henry Chen

pcim_iomap_regions() should receive the driver's name as its third
parameter, not the PCI device's name.

Define the driver name with a macro and use it at the appropriate
places, including pcim_iomap_regions().

Cc: stable@vger.kernel.org # v5.14+
Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson")
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
Tested-by: Henry Chen <chenx97@aosc.io>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
index bfe6e2d631bd..73a6715a93e6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
@@ -11,6 +11,8 @@
 #include "dwmac_dma.h"
 #include "dwmac1000.h"
 
+#define DRIVER_NAME "dwmac-loongson-pci"
+
 /* Normal Loongson Tx Summary */
 #define DMA_INTR_ENA_NIE_TX_LOONGSON	0x00040000
 /* Normal Loongson Rx Summary */
@@ -555,7 +557,7 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id
 	for (i = 0; i < PCI_STD_NUM_BARS; i++) {
 		if (pci_resource_len(pdev, i) == 0)
 			continue;
-		ret = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev));
+		ret = pcim_iomap_regions(pdev, BIT(0), DRIVER_NAME);
 		if (ret)
 			goto err_disable_device;
 		break;
@@ -673,7 +675,7 @@ static const struct pci_device_id loongson_dwmac_id_table[] = {
 MODULE_DEVICE_TABLE(pci, loongson_dwmac_id_table);
 
 static struct pci_driver loongson_dwmac_driver = {
-	.name = "dwmac-loongson-pci",
+	.name = DRIVER_NAME,
 	.id_table = loongson_dwmac_id_table,
 	.probe = loongson_dwmac_probe,
 	.remove = loongson_dwmac_remove,
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v4 1/4] stmmac: loongson: Pass correct arg to PCI function
  2025-02-26  8:52 ` [PATCH net-next v4 1/4] stmmac: loongson: Pass correct arg to PCI function Philipp Stanner
@ 2025-02-28  2:35   ` Jakub Kicinski
  2025-02-28  9:26     ` Philipp Stanner
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2025-02-28  2:35 UTC (permalink / raw)
  To: Philipp Stanner
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni,
	Maxime Coquelin, Alexandre Torgue, Huacai Chen, Yanteng Si,
	Yinggang Gu, Feiyang Chen, Philipp Stanner, Jiaxun Yang,
	Qing Zhang, netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	stable, Andrew Lunn, Henry Chen

On Wed, 26 Feb 2025 09:52:05 +0100 Philipp Stanner wrote:
> pcim_iomap_regions() should receive the driver's name as its third
> parameter, not the PCI device's name.
> 
> Define the driver name with a macro and use it at the appropriate
> places, including pcim_iomap_regions().
> 
> Cc: stable@vger.kernel.org # v5.14+
> Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson")

Since you sent this as a fix (which.. yea.. I guess.. why not..)
I'll apply it to the fixes tree. But then the other patches have 
to wait and be reposted next Thu. The fixes are merged with net-next
every Thu, but since this series was tagged as net-next I missed
it in today's cross merge :(

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v4 1/4] stmmac: loongson: Pass correct arg to PCI function
  2025-02-28  2:35   ` Jakub Kicinski
@ 2025-02-28  9:26     ` Philipp Stanner
  2025-02-28 22:03       ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Stanner @ 2025-02-28  9:26 UTC (permalink / raw)
  To: Jakub Kicinski, Philipp Stanner
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni,
	Maxime Coquelin, Alexandre Torgue, Huacai Chen, Yanteng Si,
	Yinggang Gu, Feiyang Chen, Jiaxun Yang, Qing Zhang, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, stable, Andrew Lunn,
	Henry Chen

On Thu, 2025-02-27 at 18:35 -0800, Jakub Kicinski wrote:
> On Wed, 26 Feb 2025 09:52:05 +0100 Philipp Stanner wrote:
> > pcim_iomap_regions() should receive the driver's name as its third
> > parameter, not the PCI device's name.
> > 
> > Define the driver name with a macro and use it at the appropriate
> > places, including pcim_iomap_regions().
> > 
> > Cc: stable@vger.kernel.org # v5.14+
> > Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson")
> 
> Since you sent this as a fix (which.. yea.. I guess.. why not..)
> I'll apply it to the fixes tree. But then the other patches have 
> to wait and be reposted next Thu. The fixes are merged with net-next
> every Thu, but since this series was tagged as net-next I missed
> it in today's cross merge :(
> 

Oh OK, I see – I'm not very familiar with the net subsystem process. So
far I always had it like this: fire everything into Linus's master and
Greg & Sasha then pick those with Fixes tags into the stable trees
automatically :)

Anyways, I interpret your message so that this series is done and I
don't have to do anything about it anymore. Correct me if I'm wrong.


Thanks
P.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v4 1/4] stmmac: loongson: Pass correct arg to PCI function
  2025-02-28  9:26     ` Philipp Stanner
@ 2025-02-28 22:03       ` Jakub Kicinski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2025-02-28 22:03 UTC (permalink / raw)
  To: Philipp Stanner
  Cc: Philipp Stanner, Andrew Lunn, David S. Miller, Eric Dumazet,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Huacai Chen,
	Yanteng Si, Yinggang Gu, Feiyang Chen, Jiaxun Yang, Qing Zhang,
	netdev, linux-stm32, linux-arm-kernel, linux-kernel, stable,
	Andrew Lunn, Henry Chen

On Fri, 28 Feb 2025 10:26:24 +0100 Philipp Stanner wrote:
> > Since you sent this as a fix (which.. yea.. I guess.. why not..)
> > I'll apply it to the fixes tree. But then the other patches have 
> > to wait and be reposted next Thu. The fixes are merged with net-next
> > every Thu, but since this series was tagged as net-next I missed
> > it in today's cross merge :(
> 
> Oh OK, I see – I'm not very familiar with the net subsystem process. So
> far I always had it like this: fire everything into Linus's master and
> Greg & Sasha then pick those with Fixes tags into the stable trees
> automatically :)

Admittedly the fixes vs linux-next material routing is a little tricky.

> Anyways, I interpret your message so that this series is done and I
> don't have to do anything about it anymore. Correct me if I'm wrong.

You need to repost patches 2,3,4 once the first patch appears in:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-28 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250226085208.97891-1-phasta@kernel.org>
2025-02-26  8:52 ` [PATCH net-next v4 1/4] stmmac: loongson: Pass correct arg to PCI function Philipp Stanner
2025-02-28  2:35   ` Jakub Kicinski
2025-02-28  9:26     ` Philipp Stanner
2025-02-28 22:03       ` Jakub Kicinski

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).