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

ide: add "noacpi" / "acpigtf" / "acpionboot" parameters

* Rename ide_noacpi{tfs,onboot} to ide_acpi{gtf,onboot} (+ reverse logic).

* Move ide_*acpi* variables to ide-acpi.c and remove unnecessary initializers.

* Add "noacpi" / "acpigtf" / "acpionboot" parameters.

* Obsolete "ide=noacpi" / "ide=acpigtf" / "ide=acpionboot" kernel parameters.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

+21 -16
+13 -5
drivers/ide/ide-acpi.c
··· 60 60 #define DEBPRINT(fmt, args...) do {} while (0) 61 61 #endif /* DEBUGGING */ 62 62 63 - extern int ide_noacpi; 64 - extern int ide_noacpitfs; 65 - extern int ide_noacpionboot; 63 + int ide_noacpi; 64 + module_param_named(noacpi, ide_noacpi, bool, 0); 65 + MODULE_PARM_DESC(noacpi, "disable IDE ACPI support"); 66 + 67 + int ide_acpigtf; 68 + module_param_named(acpigtf, ide_acpigtf, bool, 0); 69 + MODULE_PARM_DESC(acpigtf, "enable IDE ACPI _GTF support"); 70 + 71 + int ide_acpionboot; 72 + module_param_named(acpionboot, ide_acpionboot, bool, 0); 73 + MODULE_PARM_DESC(acpionboot, "call IDE ACPI methods on boot"); 66 74 67 75 static bool ide_noacpi_psx; 68 76 static int no_acpi_psx(const struct dmi_system_id *id) ··· 384 376 memcpy(&args.tf_array[7], &gtf->tfa, 7); 385 377 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; 386 378 387 - if (ide_noacpitfs) { 379 + if (!ide_acpigtf) { 388 380 DEBPRINT("_GTF execution disabled\n"); 389 381 return err; 390 382 } ··· 729 721 drive->name, err); 730 722 } 731 723 732 - if (ide_noacpionboot) { 724 + if (!ide_acpionboot) { 733 725 DEBPRINT("ACPI methods disabled on boot\n"); 734 726 return; 735 727 }
+5 -11
drivers/ide/ide.c
··· 94 94 95 95 int noautodma = 0; 96 96 97 - #ifdef CONFIG_BLK_DEV_IDEACPI 98 - int ide_noacpi = 0; 99 - int ide_noacpitfs = 1; 100 - int ide_noacpionboot = 1; 101 - #endif 102 - 103 97 ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */ 104 98 105 99 static void ide_port_init_devices_data(ide_hwif_t *); ··· 874 880 if (!strcmp(s, "ide=noacpi")) { 875 881 //printk(" : Disable IDE ACPI support.\n"); 876 882 ide_noacpi = 1; 877 - return 1; 883 + goto obsolete_option; 878 884 } 879 885 if (!strcmp(s, "ide=acpigtf")) { 880 886 //printk(" : Enable IDE ACPI _GTF support.\n"); 881 - ide_noacpitfs = 0; 882 - return 1; 887 + ide_acpigtf = 1; 888 + goto obsolete_option; 883 889 } 884 890 if (!strcmp(s, "ide=acpionboot")) { 885 891 //printk(" : Call IDE ACPI methods on boot.\n"); 886 - ide_noacpionboot = 0; 887 - return 1; 892 + ide_acpionboot = 1; 893 + goto obsolete_option; 888 894 } 889 895 #endif /* CONFIG_BLK_DEV_IDEACPI */ 890 896
+3
include/linux/ide.h
··· 798 798 #ifndef _IDE_C 799 799 extern ide_hwif_t ide_hwifs[]; /* master data repository */ 800 800 #endif 801 + extern int ide_noacpi; 802 + extern int ide_acpigtf; 803 + extern int ide_acpionboot; 801 804 extern int noautodma; 802 805 803 806 extern int ide_vlb_clk;