Skip to content

Commit 21a6f37

Browse files
niklas88damien-lemoal
authored andcommitted
ata: add HAS_IOPORT dependencies
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 using them. Co-developed-by: Arnd Bergmann <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Reviewed-by: Niklas Cassel <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent dcf2653 commit 21a6f37

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

drivers/ata/Kconfig

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ comment "PATA SFF controllers with BMDMA"
556556

557557
config PATA_ALI
558558
tristate "ALi PATA support"
559-
depends on PCI
559+
depends on PCI && HAS_IOPORT
560560
select PATA_TIMINGS
561561
help
562562
This option enables support for the ALi ATA interfaces
@@ -566,7 +566,7 @@ config PATA_ALI
566566

567567
config PATA_AMD
568568
tristate "AMD/NVidia PATA support"
569-
depends on PCI
569+
depends on PCI && HAS_IOPORT
570570
select PATA_TIMINGS
571571
help
572572
This option enables support for the AMD and NVidia PATA
@@ -584,7 +584,7 @@ config PATA_ARASAN_CF
584584

585585
config PATA_ARTOP
586586
tristate "ARTOP 6210/6260 PATA support"
587-
depends on PCI
587+
depends on PCI && HAS_IOPORT
588588
help
589589
This option enables support for ARTOP PATA controllers.
590590

@@ -611,7 +611,7 @@ config PATA_ATP867X
611611

612612
config PATA_CMD64X
613613
tristate "CMD64x PATA support"
614-
depends on PCI
614+
depends on PCI && HAS_IOPORT
615615
select PATA_TIMINGS
616616
help
617617
This option enables support for the CMD64x series chips
@@ -658,7 +658,7 @@ config PATA_CS5536
658658

659659
config PATA_CYPRESS
660660
tristate "Cypress CY82C693 PATA support (Very Experimental)"
661-
depends on PCI
661+
depends on PCI && HAS_IOPORT
662662
select PATA_TIMINGS
663663
help
664664
This option enables support for the Cypress/Contaq CY82C693
@@ -706,7 +706,7 @@ config PATA_HPT366
706706

707707
config PATA_HPT37X
708708
tristate "HPT 370/370A/371/372/374/302 PATA support"
709-
depends on PCI
709+
depends on PCI && HAS_IOPORT
710710
help
711711
This option enables support for the majority of the later HPT
712712
PATA controllers via the new ATA layer.
@@ -715,7 +715,7 @@ config PATA_HPT37X
715715

716716
config PATA_HPT3X2N
717717
tristate "HPT 371N/372N/302N PATA support"
718-
depends on PCI
718+
depends on PCI && HAS_IOPORT
719719
help
720720
This option enables support for the N variant HPT PATA
721721
controllers via the new ATA layer.
@@ -818,7 +818,7 @@ config PATA_MPC52xx
818818

819819
config PATA_NETCELL
820820
tristate "NETCELL Revolution RAID support"
821-
depends on PCI
821+
depends on PCI && HAS_IOPORT
822822
help
823823
This option enables support for the Netcell Revolution RAID
824824
PATA controller.
@@ -854,7 +854,7 @@ config PATA_OLDPIIX
854854

855855
config PATA_OPTIDMA
856856
tristate "OPTI FireStar PATA support (Very Experimental)"
857-
depends on PCI
857+
depends on PCI && HAS_IOPORT
858858
help
859859
This option enables DMA/PIO support for the later OPTi
860860
controllers found on some old motherboards and in some
@@ -864,15 +864,15 @@ config PATA_OPTIDMA
864864

865865
config PATA_PDC2027X
866866
tristate "Promise PATA 2027x support"
867-
depends on PCI
867+
depends on PCI && HAS_IOPORT
868868
help
869869
This option enables support for Promise PATA pdc20268 to pdc20277 host adapters.
870870

871871
If unsure, say N.
872872

873873
config PATA_PDC_OLD
874874
tristate "Older Promise PATA controller support"
875-
depends on PCI
875+
depends on PCI && HAS_IOPORT
876876
help
877877
This option enables support for the Promise 20246, 20262, 20263,
878878
20265 and 20267 adapters.
@@ -900,7 +900,7 @@ config PATA_RDC
900900

901901
config PATA_SC1200
902902
tristate "SC1200 PATA support"
903-
depends on PCI && (X86_32 || COMPILE_TEST)
903+
depends on PCI && (X86_32 || COMPILE_TEST) && HAS_IOPORT
904904
help
905905
This option enables support for the NatSemi/AMD SC1200 SoC
906906
companion chip used with the Geode processor family.
@@ -918,7 +918,7 @@ config PATA_SCH
918918

919919
config PATA_SERVERWORKS
920920
tristate "SERVERWORKS OSB4/CSB5/CSB6/HT1000 PATA support"
921-
depends on PCI
921+
depends on PCI && HAS_IOPORT
922922
help
923923
This option enables support for the Serverworks OSB4/CSB5/CSB6 and
924924
HT1000 PATA controllers, via the new ATA layer.
@@ -1182,7 +1182,7 @@ config ATA_GENERIC
11821182

11831183
config PATA_LEGACY
11841184
tristate "Legacy ISA PATA support (Experimental)"
1185-
depends on (ISA || PCI)
1185+
depends on (ISA || PCI) && HAS_IOPORT
11861186
select PATA_TIMINGS
11871187
help
11881188
This option enables support for ISA/VLB/PCI bus legacy PATA

drivers/ata/libata-sff.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3032,6 +3032,7 @@ EXPORT_SYMBOL_GPL(ata_bmdma_port_start32);
30323032
*/
30333033
int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev)
30343034
{
3035+
#ifdef CONFIG_HAS_IOPORT
30353036
unsigned long bmdma = pci_resource_start(pdev, 4);
30363037
u8 simplex;
30373038

@@ -3044,6 +3045,9 @@ int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev)
30443045
if (simplex & 0x80)
30453046
return -EOPNOTSUPP;
30463047
return 0;
3048+
#else
3049+
return -ENOENT;
3050+
#endif /* CONFIG_HAS_IOPORT */
30473051
}
30483052
EXPORT_SYMBOL_GPL(ata_pci_bmdma_clear_simplex);
30493053

0 commit comments

Comments
 (0)