linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ide: add "ignore_hpa" module parameter
@ 2009-05-25 21:44 Bartlomiej Zolnierkiewicz
  2009-05-25 22:27 ` Frans Pop
  0 siblings, 1 reply; 15+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-05-25 21:44 UTC (permalink / raw)
  To: linux-ide; +Cc: linux-kernel

Add "ignore_hpa" module parameter (modelled after corresponding
libata's parameter) to allow preserving of Host Protected Area.

While at it make some Documentation/kernel-parameters.txt fixes:
- remove stale "idebus=" entry
- s/ide-core/ide_core/g

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
This patchset is for Linus' tree and is destined for 2.6.30-rc8.

 Documentation/kernel-parameters.txt |   10 +++++++---
 drivers/ide/ide-disk.c              |    3 +++
 drivers/ide/ide.c                   |    7 +++++++
 include/linux/ide.h                 |    1 +
 4 files changed, 18 insertions(+), 3 deletions(-)

Index: b/Documentation/kernel-parameters.txt
===================================================================
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -833,14 +833,18 @@ and is between 256 and 4096 characters. 
 	icn=		[HW,ISDN]
 			Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
 
-	ide-core.nodma=	[HW] (E)IDE subsystem
+	ide_core.nodma=	[HW] (E)IDE subsystem
 			Format: =0.0 to prevent dma on hda, =0.1 hdb =1.0 hdc
 			.vlb_clock .pci_clock .noflush .noprobe .nowerr .cdrom
 			.chs .ignore_cable are additional options
 			See Documentation/ide/ide.txt.
 
-	idebus=		[HW] (E)IDE subsystem - VLB/PCI bus speed
-			See Documentation/ide/ide.txt.
+	ide_core.ignore_hpa=
+			[HW] (E)IDE subsystem
+			Ignore HPA limit
+			Format: { "0" | "1" }
+			0 -- keep BIOS limits
+			1 -- ignore limits, using full disk (default)
 
 	ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
 			Claim all unknown PCI IDE storage controllers.
Index: b/drivers/ide/ide-disk.c
===================================================================
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -330,6 +330,9 @@ static void idedisk_check_hpa(ide_drive_
 			 capacity, sectors_to_MB(capacity),
 			 set_max, sectors_to_MB(set_max));
 
+	if (ide_ignore_hpa == 0)
+		return;
+
 	set_max = idedisk_set_max_address(drive, set_max, lba48);
 
 	if (set_max) {
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -166,6 +166,13 @@ struct bus_type ide_bus_type = {
 
 EXPORT_SYMBOL_GPL(ide_bus_type);
 
+int ide_ignore_hpa = 1;
+EXPORT_SYMBOL_GPL(ide_ignore_hpa);
+
+module_param_named(ignore_hpa, ide_ignore_hpa, int, 0);
+MODULE_PARM_DESC(ignore_hpa,
+"Ignore HPA limit (0=keep BIOS limits, 1=ignore limits, using full disk)");
+
 int ide_vlb_clk;
 EXPORT_SYMBOL_GPL(ide_vlb_clk);
 
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1072,6 +1072,7 @@ int ide_setting_ioctl(ide_drive_t *, str
 
 int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned long);
 
+extern int ide_ignore_hpa;
 extern int ide_vlb_clk;
 extern int ide_pci_clk;
 

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

end of thread, other threads:[~2009-05-27 11:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-25 21:44 [PATCH 1/3] ide: add "ignore_hpa" module parameter Bartlomiej Zolnierkiewicz
2009-05-25 22:27 ` Frans Pop
2009-05-25 22:36   ` Alan Cox
2009-05-25 23:06     ` Frans Pop
2009-05-26 12:23       ` Bartlomiej Zolnierkiewicz
2009-05-26 12:53         ` Frans Pop
2009-05-26 13:01           ` Alan Cox
2009-05-26 18:08             ` Andries E. Brouwer
2009-05-27  9:49               ` Alan Cox
2009-05-26 17:32           ` Bartlomiej Zolnierkiewicz
2009-05-26 23:49           ` Robert Hancock
2009-05-26 12:53         ` Alan Cox
2009-05-26 17:15           ` Bartlomiej Zolnierkiewicz
2009-05-27 10:38             ` Alan Cox
2009-05-27 11:41               ` Bartlomiej Zolnierkiewicz

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).