netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
@ 2025-09-07  6:43 Daniel Palmer
  2025-09-10  1:13 ` Jakub Kicinski
  2025-09-12  2:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Palmer @ 2025-09-07  6:43 UTC (permalink / raw)
  To: andrew+netdev, davem, edumazet, kuba, pabeni, netdev
  Cc: linux-kernel, Daniel Palmer

When 8139too is probing and 8139TOO_PIO=y it will call pci_iomap_range()
and from there __pci_ioport_map() for the PCI IO space.
If HAS_IOPORT_MAP=n and NO_GENERIC_PCI_IOPORT_MAP=n, like it is on my
m68k config, __pci_ioport_map() becomes NULL, pci_iomap_range() will
always fail and the driver will complain it couldn't map the PIO space
and return an error.

NO_IOPORT_MAP seems to cover the case where what 8139too is trying
to do cannot ever work so make 8139TOO_PIO depend on being it false
and avoid creating an unusable driver.

Signed-off-by: Daniel Palmer <daniel@thingy.jp>
---
 drivers/net/ethernet/realtek/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/Kconfig b/drivers/net/ethernet/realtek/Kconfig
index fe136f61586f..272c83bfdc6c 100644
--- a/drivers/net/ethernet/realtek/Kconfig
+++ b/drivers/net/ethernet/realtek/Kconfig
@@ -58,7 +58,7 @@ config 8139TOO
 config 8139TOO_PIO
 	bool "Use PIO instead of MMIO"
 	default y
-	depends on 8139TOO
+	depends on 8139TOO && !NO_IOPORT_MAP
 	help
 	  This instructs the driver to use programmed I/O ports (PIO) instead
 	  of PCI shared memory (MMIO).  This can possibly solve some problems
-- 
2.50.1


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

* Re: [PATCH] eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
  2025-09-07  6:43 [PATCH] eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP Daniel Palmer
@ 2025-09-10  1:13 ` Jakub Kicinski
  2025-09-11 13:20   ` Daniel Palmer
  2025-09-12  2:00 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2025-09-10  1:13 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: andrew+netdev, davem, edumazet, pabeni, netdev, linux-kernel

On Sun,  7 Sep 2025 15:43:49 +0900 Daniel Palmer wrote:
> When 8139too is probing and 8139TOO_PIO=y it will call pci_iomap_range()
> and from there __pci_ioport_map() for the PCI IO space.
> If HAS_IOPORT_MAP=n and NO_GENERIC_PCI_IOPORT_MAP=n, like it is on my
> m68k config, __pci_ioport_map() becomes NULL, pci_iomap_range() will
> always fail and the driver will complain it couldn't map the PIO space
> and return an error.
> 
> NO_IOPORT_MAP seems to cover the case where what 8139too is trying
> to do cannot ever work so make 8139TOO_PIO depend on being it false
> and avoid creating an unusable driver.

Any idea if this is a regression, or the driver would have never worked
on your platform / config?

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

* Re: [PATCH] eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
  2025-09-10  1:13 ` Jakub Kicinski
@ 2025-09-11 13:20   ` Daniel Palmer
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Palmer @ 2025-09-11 13:20 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: andrew+netdev, davem, edumazet, pabeni, netdev, linux-kernel

Hi,

On Wed, 10 Sept 2025 at 10:13, Jakub Kicinski <kuba@kernel.org> wrote:
> Any idea if this is a regression, or the driver would have never worked
> on your platform / config?

I don't think this is a regression. I think the PIO mode would have
never worked.
Without that option the driver probes correctly.

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

* Re: [PATCH] eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
  2025-09-07  6:43 [PATCH] eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP Daniel Palmer
  2025-09-10  1:13 ` Jakub Kicinski
@ 2025-09-12  2:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-12  2:00 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sun,  7 Sep 2025 15:43:49 +0900 you wrote:
> When 8139too is probing and 8139TOO_PIO=y it will call pci_iomap_range()
> and from there __pci_ioport_map() for the PCI IO space.
> If HAS_IOPORT_MAP=n and NO_GENERIC_PCI_IOPORT_MAP=n, like it is on my
> m68k config, __pci_ioport_map() becomes NULL, pci_iomap_range() will
> always fail and the driver will complain it couldn't map the PIO space
> and return an error.
> 
> [...]

Here is the summary with links:
  - eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
    https://git.kernel.org/netdev/net-next/c/43adad382e1f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-09-12  2:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-07  6:43 [PATCH] eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP Daniel Palmer
2025-09-10  1:13 ` Jakub Kicinski
2025-09-11 13:20   ` Daniel Palmer
2025-09-12  2:00 ` patchwork-bot+netdevbpf

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