Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Daniel Palmer <daniel@thingy.jp>
Link: https://patch.msgid.link/20250907064349.3427600-1-daniel@thingy.jp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Daniel Palmer and committed by
Jakub Kicinski
43adad38 2f186dd5

+1 -1
+1 -1
drivers/net/ethernet/realtek/Kconfig
··· 58 58 config 8139TOO_PIO 59 59 bool "Use PIO instead of MMIO" 60 60 default y 61 - depends on 8139TOO 61 + depends on 8139TOO && !NO_IOPORT_MAP 62 62 help 63 63 This instructs the driver to use programmed I/O ports (PIO) instead 64 64 of PCI shared memory (MMIO). This can possibly solve some problems