diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-generic.c | 3 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 3 | ||||
-rw-r--r-- | drivers/ide/ide-proc.c | 3 | ||||
-rw-r--r-- | drivers/ide/ide.c | 41 | ||||
-rw-r--r-- | drivers/ide/pci/cmd640.c | 2 | ||||
-rw-r--r-- | drivers/ide/setup-pci.c | 11 |
6 files changed, 15 insertions, 48 deletions
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c index 387574fe4b2b..bae41459192d 100644 --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c | |||
@@ -93,8 +93,7 @@ static int __init ide_generic_init(void) | |||
93 | ide_hwif_t *hwif = &ide_hwifs[i]; | 93 | ide_hwif_t *hwif = &ide_hwifs[i]; |
94 | 94 | ||
95 | if (hwif->io_ports[IDE_DATA_OFFSET] && | 95 | if (hwif->io_ports[IDE_DATA_OFFSET] && |
96 | (hwif->chipset == ide_unknown || | 96 | hwif->chipset == ide_unknown) |
97 | hwif->chipset == ide_forced)) | ||
98 | idx[i] = i; | 97 | idx[i] = i; |
99 | else | 98 | else |
100 | idx[i] = 0xff; | 99 | idx[i] = 0xff; |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 8ef5194f6d47..33cb5e5a249b 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1519,8 +1519,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) | |||
1519 | hwif = &ide_hwifs[idx[i]]; | 1519 | hwif = &ide_hwifs[idx[i]]; |
1520 | 1520 | ||
1521 | if (hwif->present) { | 1521 | if (hwif->present) { |
1522 | if (hwif->chipset == ide_unknown || | 1522 | if (hwif->chipset == ide_unknown) |
1523 | hwif->chipset == ide_forced) | ||
1524 | hwif->chipset = ide_generic; | 1523 | hwif->chipset = ide_generic; |
1525 | hwif_register_devices(hwif); | 1524 | hwif_register_devices(hwif); |
1526 | } | 1525 | } |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 77025d1057b5..edd7f186dc4d 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -46,9 +46,6 @@ static int proc_ide_read_imodel | |||
46 | int len; | 46 | int len; |
47 | const char *name; | 47 | const char *name; |
48 | 48 | ||
49 | /* | ||
50 | * Neither ide_unknown nor ide_forced should be set at this point. | ||
51 | */ | ||
52 | switch (hwif->chipset) { | 49 | switch (hwif->chipset) { |
53 | case ide_generic: name = "generic"; break; | 50 | case ide_generic: name = "generic"; break; |
54 | case ide_pci: name = "pci"; break; | 51 | case ide_pci: name = "pci"; break; |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 96126b3b12e9..7e789c97a8b8 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1170,7 +1170,7 @@ extern int probe_ht6560b; | |||
1170 | extern int probe_qd65xx; | 1170 | extern int probe_qd65xx; |
1171 | extern int cmd640_vlb; | 1171 | extern int cmd640_vlb; |
1172 | 1172 | ||
1173 | static int __initdata is_chipset_set[MAX_HWIFS]; | 1173 | static int __initdata is_chipset_set; |
1174 | 1174 | ||
1175 | /* | 1175 | /* |
1176 | * ide_setup() gets called VERY EARLY during initialization, | 1176 | * ide_setup() gets called VERY EARLY during initialization, |
@@ -1328,8 +1328,6 @@ static int __init ide_setup(char *s) | |||
1328 | "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb", | 1328 | "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb", |
1329 | "dtc2278", "umc8672", "ali14xx", NULL }; | 1329 | "dtc2278", "umc8672", "ali14xx", NULL }; |
1330 | 1330 | ||
1331 | hw_regs_t hwregs; | ||
1332 | |||
1333 | hw = s[3] - '0'; | 1331 | hw = s[3] - '0'; |
1334 | hwif = &ide_hwifs[hw]; | 1332 | hwif = &ide_hwifs[hw]; |
1335 | i = match_parm(&s[4], ide_words, vals, 3); | 1333 | i = match_parm(&s[4], ide_words, vals, 3); |
@@ -1338,19 +1336,14 @@ static int __init ide_setup(char *s) | |||
1338 | * Cryptic check to ensure chipset not already set for hwif. | 1336 | * Cryptic check to ensure chipset not already set for hwif. |
1339 | * Note: we can't depend on hwif->chipset here. | 1337 | * Note: we can't depend on hwif->chipset here. |
1340 | */ | 1338 | */ |
1341 | if ((i >= -18 && i <= -11) || (i > 0 && i <= 3)) { | 1339 | if (i >= -18 && i <= -11) { |
1342 | /* chipset already specified */ | 1340 | /* chipset already specified */ |
1343 | if (is_chipset_set[hw]) | 1341 | if (is_chipset_set) |
1344 | goto bad_option; | 1342 | goto bad_option; |
1345 | if (i > -18 && i <= -11) { | 1343 | /* these drivers are for "ide0=" only */ |
1346 | /* these drivers are for "ide0=" only */ | 1344 | if (hw != 0) |
1347 | if (hw != 0) | 1345 | goto bad_hwif; |
1348 | goto bad_hwif; | 1346 | is_chipset_set = 1; |
1349 | /* chipset already specified for 2nd port */ | ||
1350 | if (is_chipset_set[hw+1]) | ||
1351 | goto bad_option; | ||
1352 | } | ||
1353 | is_chipset_set[hw] = 1; | ||
1354 | printk("\n"); | 1347 | printk("\n"); |
1355 | } | 1348 | } |
1356 | 1349 | ||
@@ -1430,21 +1423,11 @@ static int __init ide_setup(char *s) | |||
1430 | case -1: /* "noprobe" */ | 1423 | case -1: /* "noprobe" */ |
1431 | hwif->noprobe = 1; | 1424 | hwif->noprobe = 1; |
1432 | goto obsolete_option; | 1425 | goto obsolete_option; |
1433 | 1426 | case 0: | |
1434 | case 1: /* base */ | 1427 | case 1: |
1435 | vals[1] = vals[0] + 0x206; /* default ctl */ | 1428 | case 2: |
1436 | case 2: /* base,ctl */ | 1429 | case 3: |
1437 | vals[2] = 0; /* default irq = probe for it */ | 1430 | goto bad_option; |
1438 | case 3: /* base,ctl,irq */ | ||
1439 | memset(&hwregs, 0, sizeof(hwregs)); | ||
1440 | ide_init_hwif_ports(&hwregs, vals[0], vals[1], &hwif->irq); | ||
1441 | memcpy(hwif->io_ports, hwregs.io_ports, sizeof(hwif->io_ports)); | ||
1442 | hwif->irq = vals[2]; | ||
1443 | hwif->noprobe = 0; | ||
1444 | hwif->chipset = ide_forced; | ||
1445 | goto obsolete_option; | ||
1446 | |||
1447 | case 0: goto bad_option; | ||
1448 | default: | 1431 | default: |
1449 | printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n"); | 1432 | printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n"); |
1450 | return 1; | 1433 | return 1; |
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index 29fbc5ead03b..58a95f62e383 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c | |||
@@ -415,7 +415,7 @@ static void __init setup_device_ptrs (void) | |||
415 | cmd_hwif1 = &ide_hwifs[1]; /* default, if not found below */ | 415 | cmd_hwif1 = &ide_hwifs[1]; /* default, if not found below */ |
416 | for (i = 0; i < MAX_HWIFS; i++) { | 416 | for (i = 0; i < MAX_HWIFS; i++) { |
417 | ide_hwif_t *hwif = &ide_hwifs[i]; | 417 | ide_hwif_t *hwif = &ide_hwifs[i]; |
418 | if (hwif->chipset == ide_unknown || hwif->chipset == ide_forced) { | 418 | if (hwif->chipset == ide_unknown) { |
419 | if (hwif->io_ports[IDE_DATA_OFFSET] == 0x1f0) | 419 | if (hwif->io_ports[IDE_DATA_OFFSET] == 0x1f0) |
420 | cmd_hwif0 = hwif; | 420 | cmd_hwif0 = hwif; |
421 | else if (hwif->io_ports[IDE_DATA_OFFSET] == 0x170) | 421 | else if (hwif->io_ports[IDE_DATA_OFFSET] == 0x170) |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 634e3f6a9608..ea66c996e4ec 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -41,17 +41,6 @@ static ide_hwif_t *ide_match_hwif(unsigned long io_base, u8 bootable, const char | |||
41 | ide_hwif_t *hwif; | 41 | ide_hwif_t *hwif; |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * Look for a hwif with matching io_base specified using | ||
45 | * parameters to ide_setup(). | ||
46 | */ | ||
47 | for (h = 0; h < MAX_HWIFS; ++h) { | ||
48 | hwif = &ide_hwifs[h]; | ||
49 | if (hwif->io_ports[IDE_DATA_OFFSET] == io_base) { | ||
50 | if (hwif->chipset == ide_forced) | ||
51 | return hwif; /* a perfect match */ | ||
52 | } | ||
53 | } | ||
54 | /* | ||
55 | * Look for a hwif with matching io_base default value. | 44 | * Look for a hwif with matching io_base default value. |
56 | * If chipset is "ide_unknown", then claim that hwif slot. | 45 | * If chipset is "ide_unknown", then claim that hwif slot. |
57 | * Otherwise, some other chipset has already claimed it.. :( | 46 | * Otherwise, some other chipset has already claimed it.. :( |