eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
Subsystems (2)
PATCH 1/1 eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
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.
--- drivers/net/ethernet/realtek/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/realtek/Kconfig +1 -1
@@ -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
Signature · 1 line
2.50.1
Jakub Kicinski
maintainerQuoted 10 lines · 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_MAPseems 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?
Hi,
Quoted 2 lines · Jakub Kicinski
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.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html