From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] ide: add "ignore_hpa" module parameter
Date: Mon, 25 May 2009 23:44:11 +0200 [thread overview]
Message-ID: <200905252344.11826.bzolnier@gmail.com> (raw)
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;
next reply other threads:[~2009-05-25 21:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 21:44 Bartlomiej Zolnierkiewicz [this message]
2009-05-25 22:27 ` [PATCH 1/3] ide: add "ignore_hpa" module parameter 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200905252344.11826.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).