diff options
Diffstat (limited to 'drivers/ide/ide-generic.c')
-rw-r--r-- | drivers/ide/ide-generic.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c index 9134488ac043..2d92214096ab 100644 --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c | |||
@@ -22,6 +22,10 @@ | |||
22 | 22 | ||
23 | #define DRV_NAME "ide_generic" | 23 | #define DRV_NAME "ide_generic" |
24 | 24 | ||
25 | static int probe_mask = 0x03; | ||
26 | module_param(probe_mask, int, 0); | ||
27 | MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports"); | ||
28 | |||
25 | static ssize_t store_add(struct class *cls, const char *buf, size_t n) | 29 | static ssize_t store_add(struct class *cls, const char *buf, size_t n) |
26 | { | 30 | { |
27 | ide_hwif_t *hwif; | 31 | ide_hwif_t *hwif; |
@@ -89,6 +93,9 @@ static int __init ide_generic_init(void) | |||
89 | u8 idx[MAX_HWIFS]; | 93 | u8 idx[MAX_HWIFS]; |
90 | int i; | 94 | int i; |
91 | 95 | ||
96 | printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module " | ||
97 | "parameter for probing all legacy ISA IDE ports\n"); | ||
98 | |||
92 | for (i = 0; i < MAX_HWIFS; i++) { | 99 | for (i = 0; i < MAX_HWIFS; i++) { |
93 | ide_hwif_t *hwif; | 100 | ide_hwif_t *hwif; |
94 | unsigned long io_addr = ide_default_io_base(i); | 101 | unsigned long io_addr = ide_default_io_base(i); |
@@ -96,7 +103,7 @@ static int __init ide_generic_init(void) | |||
96 | 103 | ||
97 | idx[i] = 0xff; | 104 | idx[i] = 0xff; |
98 | 105 | ||
99 | if (io_addr) { | 106 | if ((probe_mask & (1 << i)) && io_addr) { |
100 | if (!request_region(io_addr, 8, DRV_NAME)) { | 107 | if (!request_region(io_addr, 8, DRV_NAME)) { |
101 | printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX " | 108 | printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX " |
102 | "not free.\n", | 109 | "not free.\n", |