]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
authorDaniel Palmer <daniel@thingy.jp>
Sun, 7 Sep 2025 06:43:49 +0000 (15:43 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:20 +0000 (15:37 -0500)
[ Upstream commit 43adad382e1fdecabd2c4cd2bea777ef4ce4109e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/realtek/Kconfig

index fe136f61586feb6f88d27388b3b6a52ba8ad15ec..272c83bfdc6ce20c44c90e437447baca15178683 100644 (file)
@@ -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