linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] ide: preserve HPA by default
@ 2009-05-25 21:44 Bartlomiej Zolnierkiewicz
  2009-05-25 23:10 ` Frans Pop
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-05-25 21:44 UTC (permalink / raw)
  To: linux-ide; +Cc: linux-kernel, Alan Cox

Add CONFIG_IDE_PRESERVE_HPA config option (enabled by default)
to streamline the transition.

The config option help text is heavily based on Alan's
feedback about the issue.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 Documentation/kernel-parameters.txt |    4 ++--
 drivers/ide/Kconfig                 |   22 ++++++++++++++++++++++
 drivers/ide/ide.c                   |    4 ++++
 3 files changed, 28 insertions(+), 2 deletions(-)

Index: b/Documentation/kernel-parameters.txt
===================================================================
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -843,8 +843,8 @@ and is between 256 and 4096 characters. 
 			[HW] (E)IDE subsystem
 			Ignore HPA limit
 			Format: { "0" | "1" }
-			0 -- keep BIOS limits
-			1 -- ignore limits, using full disk (default)
+			0 -- keep BIOS limits (default)
+			1 -- ignore limits, using full disk
 
 	ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
 			Claim all unknown PCI IDE storage controllers.
Index: b/drivers/ide/Kconfig
===================================================================
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -91,6 +91,28 @@ config BLK_DEV_IDE_SATA
 
 	  If unsure, say N.
 
+config IDE_PRESERVE_HPA
+	bool "Preserve Host Protected Area (please read help)"
+	default y
+	help
+	  From the majority of modern users perspectives ignoring the HPA
+	  breaks vendor RAID formats, GPT partitions or risks corrupting
+	  firmware.
+
+	  Unfortunately the original (kernel versions < 2.6.30) behavior
+	  (ignoring HPA, using full disk capacity) was introduced at the
+	  time when the main HPA use was with the jumper (or software)
+	  to make the drive look small enough for the BIOS to allow boot
+	  with big drives.
+
+	  To allow the maximum compatibility with the existing setups
+	  (using HPA and partitioned with HPA disabled) the default HPA
+	  behavior can be also later adjusted using "ignore_hpa" module
+	  parameter (i.e. "ide_core.ignore_hpa=1").
+
+	  Say Y unless you have such setup and for some reason cannot
+	  use "ignore_hpa" module parameter.
+
 config IDE_GD
 	tristate "generic ATA/ATAPI disk support"
 	default y
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -166,7 +166,11 @@ struct bus_type ide_bus_type = {
 
 EXPORT_SYMBOL_GPL(ide_bus_type);
 
+#ifdef CONFIG_IDE_PRESERVE_HPA
+int ide_ignore_hpa = 0;
+#else
 int ide_ignore_hpa = 1;
+#endif
 EXPORT_SYMBOL_GPL(ide_ignore_hpa);
 
 module_param_named(ignore_hpa, ide_ignore_hpa, int, 0);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/3] ide: preserve HPA by default
  2009-05-25 21:44 [PATCH 2/3] ide: preserve HPA by default Bartlomiej Zolnierkiewicz
@ 2009-05-25 23:10 ` Frans Pop
  0 siblings, 0 replies; 2+ messages in thread
From: Frans Pop @ 2009-05-25 23:10 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel, alan

Bartlomiej Zolnierkiewicz wrote:
> --- a/drivers/ide/Kconfig
> +++ b/drivers/ide/Kconfig
> @@ -91,6 +91,28 @@ config BLK_DEV_IDE_SATA
[...]
> +config IDE_PRESERVE_HPA
> +       bool "Preserve Host Protected Area (please read help)"
> +       default y
> +       help
> +         From the majority of modern users perspectives ignoring the HPA
> +         breaks vendor RAID formats, GPT partitions or risks corrupting
> +         firmware.

First sentence would IMO read better as:
"From the perspective of most users of recent systems, ignoring the
 HPA can break ..."

Maybe add "risks overwriting vendor system recovery tools"?

> +         Unfortunately the original (kernel versions < 2.6.30) behavior
> +         (ignoring HPA, using full disk capacity) was introduced at the
> +         time when the main HPA use was with the jumper (or software)
> +         to make the drive look small enough for the BIOS to allow boot
> +         with big drives.

"... the main use of HPA was to make the drive look small enough for the
 BIOS to allow the system to boot with large capacity drives."

I've dropped the "with the jumper (or software)" as it's confusing and
IMHO does not really add anything for the user (but see suggestion below).

> +         To allow the maximum compatibility with the existing setups
> +         (using HPA and partitioned with HPA disabled) the default HPA
> +         behavior can be also later adjusted using "ignore_hpa" module
> +         parameter (i.e. "ide_core.ignore_hpa=1").

"... can also be adjusted later using the "ignore_hpa" ..."

Maybe add a para here that explains what "Preserve Host Protected Area"
actually does, something like:
"If you say Y, the driver will respect the Host Protected Area if one is
 defined in the BIOS or (for older drives) through a jumper setting on
 the drive."

> +         Say Y unless you have such setup and for some reason cannot
> +         use "ignore_hpa" module parameter.

"... use the "ignore_hpa" module parameter."

Cheers,
FJP

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-25 23:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-25 21:44 [PATCH 2/3] ide: preserve HPA by default Bartlomiej Zolnierkiewicz
2009-05-25 23:10 ` Frans Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).