]> err.no Git - linux-2.6/commitdiff
edd: add default mode CONFIG_EDD_OFF=n, override with edd={on,off}
authorTim Gardner <tim.gardner@canonical.com>
Tue, 29 Apr 2008 08:02:45 +0000 (01:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:06:23 +0000 (08:06 -0700)
Add a kernel parameter option to 'edd' to enable/disable BIOS Enhanced Disk
Drive Services.  CONFIG_EDD_OFF disables EDD while still compiling EDD into
the kernel.  Default behavior can be forced using 'edd=on' or 'edd=off' as
a kernel parameter.

[akpm@linux-foundation.org: fix kernel-parameters.txt]
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/kernel-parameters.txt
arch/x86/boot/edd.c
drivers/firmware/Kconfig

index 5afc21b20a92c69302ddd1bce78e5fc87edc458f..3ce193f8656514519d9d9f1db03f24a5722c3011 100644 (file)
@@ -627,8 +627,7 @@ and is between 256 and 4096 characters. It is defined in the file
        eata=           [HW,SCSI]
 
        edd=            [EDD]
-                       Format: {"of[f]" | "sk[ipmbr]"}
-                       See comment in arch/i386/boot/edd.S
+                       Format: {"off" | "on" | "skip[mbr]"}
 
        eisa_irq_edge=  [PARISC,HW]
                        See header of drivers/parisc/eisa.c.
index d84a48ece78503b10e8429981e44397b6755a454..03399d64013b21459f63942c06bc6c33b803f425 100644 (file)
@@ -126,17 +126,25 @@ void query_edd(void)
 {
        char eddarg[8];
        int do_mbr = 1;
+#ifdef CONFIG_EDD_OFF
+       int do_edd = 0;
+#else
        int do_edd = 1;
+#endif
        int be_quiet;
        int devno;
        struct edd_info ei, *edp;
        u32 *mbrptr;
 
        if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) {
-               if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip"))
+               if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) {
+                       do_edd = 1;
                        do_mbr = 0;
+               }
                else if (!strcmp(eddarg, "off"))
                        do_edd = 0;
+               else if (!strcmp(eddarg, "on"))
+                       do_edd = 1;
        }
 
        be_quiet = cmdline_find_option_bool("quiet");
index 40ffd767647d623baa1259618b8912ef8ecc863d..dc2cec6127d1816982558de72a2ee9e4c1b884a5 100644 (file)
@@ -17,6 +17,15 @@ config EDD
           obscure configurations. Most disk controller BIOS vendors do
           not yet implement this feature.
 
+config EDD_OFF
+       bool "Sets default behavior for EDD detection to off"
+       depends on EDD
+       default n
+       help
+         Say Y if you want EDD disabled by default, even though it is compiled into the
+         kernel. Say N if you want EDD enabled by default. EDD can be dynamically set
+         using the kernel parameter 'edd={on|skipmbr|off}'.
+
 config EFI_VARS
        tristate "EFI Variable Support via sysfs"
        depends on EFI