net: handle HAS_IOPORT dependencies
authorNiklas Schnelle <schnelle@linux.ibm.com>
Fri, 5 Apr 2024 11:18:31 +0000 (13:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2024 10:56:56 +0000 (11:56 +0100)
In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at
compile time. We thus need to add HAS_IOPORT as dependency for
those drivers requiring them. For the DEFXX driver the use of I/O
ports is optional and we only need to fence specific code paths. It also
turns out that with HAS_IOPORT handled explicitly HAMRADIO does not need
the !S390 dependency and successfully builds the bpqether driver.

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 files changed:
drivers/net/Kconfig
drivers/net/arcnet/Kconfig
drivers/net/can/cc770/Kconfig
drivers/net/can/sja1000/Kconfig
drivers/net/ethernet/3com/Kconfig
drivers/net/ethernet/8390/Kconfig
drivers/net/ethernet/amd/Kconfig
drivers/net/ethernet/fujitsu/Kconfig
drivers/net/ethernet/intel/Kconfig
drivers/net/ethernet/sis/Kconfig
drivers/net/ethernet/smsc/Kconfig
drivers/net/ethernet/ti/Kconfig
drivers/net/ethernet/via/Kconfig
drivers/net/ethernet/xircom/Kconfig
drivers/net/fddi/defxx.c
drivers/net/hamradio/Kconfig
drivers/net/wan/Kconfig
net/ax25/Kconfig

index 172d84e39129fbb9d0f82d94f4b93b80e11f9cb3..f0663cf1f7558c12ac895deb7e0657d091ea4998 100644 (file)
@@ -520,7 +520,7 @@ source "drivers/net/ipa/Kconfig"
 
 config NET_SB1000
        tristate "General Instruments Surfboard 1000"
-       depends on PNP
+       depends on ISA && PNP
        help
          This is a driver for the General Instrument (also known as
          NextLevel) SURFboard 1000 internal
index a51b9dab6d3a144c22e32e2774d01cf8a463cc67..d1d07a1d4fbcc84fb15c51f251a57739eac66b1d 100644 (file)
@@ -4,7 +4,7 @@
 #
 
 menuconfig ARCNET
-       depends on NETDEVICES && (ISA || PCI || PCMCIA)
+       depends on NETDEVICES && (ISA || PCI || PCMCIA) && HAS_IOPORT
        tristate "ARCnet support"
        help
          If you have a network card of this type, say Y and check out the
index 9ef1359319f0d0fc723d167e21aa7eb8b5a5c06f..467ef19de1c18302e30f4d8d71283ff5f6a68f44 100644 (file)
@@ -7,6 +7,7 @@ if CAN_CC770
 
 config CAN_CC770_ISA
        tristate "ISA Bus based legacy CC770 driver"
+       depends on ISA
        help
          This driver adds legacy support for CC770 and AN82527 chips
          connected to the ISA bus using I/O port, memory mapped or
index 4b2f9cb17fc3f8c0a201bf7cbb447a1cef07bd18..01168db4c10653048663fcd6d92b537ba09fdb4c 100644 (file)
@@ -87,6 +87,7 @@ config CAN_PLX_PCI
 
 config CAN_SJA1000_ISA
        tristate "ISA Bus based legacy SJA1000 driver"
+       depends on ISA
        help
          This driver adds legacy support for SJA1000 chips connected to
          the ISA bus using I/O port, memory mapped or indirect access.
index 706bd59bf645b947a9a4f2b8d290f8c5956f6ed4..1fbab79e2be4577139ae3dfd2a5238796aa1b91f 100644 (file)
@@ -44,7 +44,7 @@ config 3C515
 
 config PCMCIA_3C574
        tristate "3Com 3c574 PCMCIA support"
-       depends on PCMCIA
+       depends on PCMCIA && HAS_IOPORT
        help
          Say Y here if you intend to attach a 3Com 3c574 or compatible PCMCIA
          (PC-card) Fast Ethernet card to your computer.
@@ -54,7 +54,7 @@ config PCMCIA_3C574
 
 config PCMCIA_3C589
        tristate "3Com 3c589 PCMCIA support"
-       depends on PCMCIA
+       depends on PCMCIA && HAS_IOPORT
        help
          Say Y here if you intend to attach a 3Com 3c589 or compatible PCMCIA
          (PC-card) Ethernet card to your computer.
index a4130e643342f2a592f10448f6ad98432dcf1033..345f250781c6d9c3c6cbe5445250dc5987803b1a 100644 (file)
@@ -19,7 +19,7 @@ if NET_VENDOR_8390
 
 config PCMCIA_AXNET
        tristate "Asix AX88190 PCMCIA support"
-       depends on PCMCIA
+       depends on PCMCIA && HAS_IOPORT
        help
          Say Y here if you intend to attach an Asix AX88190-based PCMCIA
          (PC-card) Fast Ethernet card to your computer.  These cards are
@@ -117,7 +117,7 @@ config NE2000
 
 config NE2K_PCI
        tristate "PCI NE2000 and clones support (see help)"
-       depends on PCI
+       depends on PCI && HAS_IOPORT
        select CRC32
        help
          This driver is for NE2000 compatible PCI cards. It will not work
@@ -146,7 +146,7 @@ config APNE
 
 config PCMCIA_PCNET
        tristate "NE2000 compatible PCMCIA support"
-       depends on PCMCIA
+       depends on PCMCIA && HAS_IOPORT
        select CRC32
        help
          Say Y here if you intend to attach an NE2000 compatible PCMCIA
index f8cc8925161c8726a93479bb02527a63b44905f4..b39c6f3e1edaadb3b76df3dcc2c20951c10abfec 100644 (file)
@@ -56,7 +56,7 @@ config LANCE
 
 config PCNET32
        tristate "AMD PCnet32 PCI support"
-       depends on PCI
+       depends on PCI && HAS_IOPORT
        select CRC32
        select MII
        help
@@ -122,7 +122,7 @@ config MVME147_NET
 
 config PCMCIA_NMCLAN
        tristate "New Media PCMCIA support"
-       depends on PCMCIA
+       depends on PCMCIA && HAS_IOPORT
        help
          Say Y here if you intend to attach a New Media Ethernet or LiveWire
          PCMCIA (PC-card) Ethernet card to your computer.
index 0a1400cb410a037411c908d0ea942fd688eab37e..06a28bce5d2788693cde42cf8626e5d71b7ce3e3 100644 (file)
@@ -18,7 +18,7 @@ if NET_VENDOR_FUJITSU
 
 config PCMCIA_FMVJ18X
        tristate "Fujitsu FMV-J18x PCMCIA support"
-       depends on PCMCIA
+       depends on PCMCIA && HAS_IOPORT
        select CRC32
        help
          Say Y here if you intend to attach a Fujitsu FMV-J18x or compatible
index 639fbb12bd350c3887981273fbea11b1b85546f0..6e7901e12699721ab3fdaf4443835ba169986170 100644 (file)
@@ -41,7 +41,7 @@ config E100
 
 config E1000
        tristate "Intel(R) PRO/1000 Gigabit Ethernet support"
-       depends on PCI
+       depends on PCI && HAS_IOPORT
        help
          This driver supports Intel(R) PRO/1000 gigabit ethernet family of
          adapters.  For more information on how to identify your adapter, go
index 775d76d9890ec69b5445f45a066cc2a2ff4e6e78..7e498bdbca73b0b3b20e131fe0816459f24d1c1b 100644 (file)
@@ -19,7 +19,7 @@ if NET_VENDOR_SIS
 
 config SIS900
        tristate "SiS 900/7016 PCI Fast Ethernet Adapter support"
-       depends on PCI
+       depends on PCI && HAS_IOPORT
        select CRC32
        select MII
        help
@@ -35,7 +35,7 @@ config SIS900
 
 config SIS190
        tristate "SiS190/SiS191 gigabit ethernet support"
-       depends on PCI
+       depends on PCI && HAS_IOPORT
        select CRC32
        select MII
        help
index 5f22a8a4d27b9722daadf51ea185948ff8acd2cb..13ce9086a9ca626f943f22f17a3b6931864a14ea 100644 (file)
@@ -54,7 +54,7 @@ config SMC91X
 
 config PCMCIA_SMC91C92
        tristate "SMC 91Cxx PCMCIA support"
-       depends on PCMCIA
+       depends on PCMCIA && HAS_IOPORT
        select CRC32
        select MII
        help
index 1530d13984d42606f6e4b4d1d28ca3f8c6461ac0..cfe9bd6b1d625d938ee51ccc016e7e16fab7c7db 100644 (file)
@@ -167,7 +167,7 @@ config TI_KEYSTONE_NETCP_ETHSS
 
 config TLAN
        tristate "TI ThunderLAN support"
-       depends on (PCI || EISA)
+       depends on (PCI || EISA) && HAS_IOPORT
        help
          If you have a PCI Ethernet network card based on the ThunderLAN chip
          which is supported by this driver, say Y here.
index da287ef65be71a017f120cabc3ec612c4ba143c8..00773f5e4d7e7a63467f6e05fff3b8fdf3649209 100644 (file)
@@ -20,6 +20,7 @@ config VIA_RHINE
        tristate "VIA Rhine support"
        depends on PCI || (OF_IRQ && GENERIC_PCI_IOMAP)
        depends on PCI || ARCH_VT8500 || COMPILE_TEST
+       depends on HAS_IOPORT
        depends on HAS_DMA
        select CRC32
        select MII
index 7497b9bea511b1869bdd9cf60219c5e4a65b08e4..bfbdcf758afb5bdf5a805fdfa1579ac25377b59f 100644 (file)
@@ -19,7 +19,7 @@ if NET_VENDOR_XIRCOM
 
 config PCMCIA_XIRC2PS
        tristate "Xircom 16-bit PCMCIA support"
-       depends on PCMCIA
+       depends on PCMCIA && HAS_IOPORT
        help
          Say Y here if you intend to attach a Xircom 16-bit PCMCIA (PC-card)
          Ethernet or Fast Ethernet card to your computer.
index 1fef8a9b1a0fdb3af7220bf495ef6821193de96d..0fbbb7286008d1c813668434db702e2f1d119378 100644 (file)
@@ -254,7 +254,7 @@ static const char version[] =
 #define DFX_BUS_TC(dev) 0
 #endif
 
-#if defined(CONFIG_EISA) || defined(CONFIG_PCI)
+#ifdef CONFIG_HAS_IOPORT
 #define dfx_use_mmio bp->mmio
 #else
 #define dfx_use_mmio true
index 25b1f929c42266db040b98e29d4fa65bdce09d01..36a9aade9f3380bbb25d77a244ec83c1aa5acca8 100644 (file)
@@ -83,7 +83,7 @@ config SCC_TRXECHO
 
 config BAYCOM_SER_FDX
        tristate "BAYCOM ser12 fullduplex driver for AX.25"
-       depends on AX25 && !S390
+       depends on AX25 && HAS_IOPORT
        select CRC_CCITT
        help
          This is one of two drivers for Baycom style simple amateur radio
@@ -103,7 +103,7 @@ config BAYCOM_SER_FDX
 
 config BAYCOM_SER_HDX
        tristate "BAYCOM ser12 halfduplex driver for AX.25"
-       depends on AX25 && !S390
+       depends on AX25 && HAS_IOPORT
        select CRC_CCITT
        help
          This is one of two drivers for Baycom style simple amateur radio
@@ -150,7 +150,7 @@ config BAYCOM_EPP
 
 config YAM
        tristate "YAM driver for AX.25"
-       depends on AX25 && !S390
+       depends on AX25 && HAS_IOPORT
        help
          The YAM is a modem for packet radio which connects to the serial
          port and includes some of the functions of a Terminal Node
index 31ab2136cdf15de105732391e79efadc7370abc0..67be9857c86c97433d4d6414f3051fec8b4830f7 100644 (file)
@@ -180,7 +180,7 @@ config C101
 
 config FARSYNC
        tristate "FarSync T-Series support"
-       depends on HDLC && PCI
+       depends on HDLC && PCI && HAS_IOPORT
        help
          Support for the FarSync T-Series X.21 (and V.35/V.24) cards by
          FarSite Communications Ltd.
index fdb666607f10ac748a59daf46189cd1cba158c43..e23a3dc14b9315aab9a9913d0d2bb4120bbec818 100644 (file)
@@ -4,7 +4,7 @@
 #
 
 menuconfig HAMRADIO
-       depends on NET && !S390
+       depends on NET
        bool "Amateur Radio support"
        help
          If you want to connect your Linux box to an amateur radio, answer Y