diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:28 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:28 -0400 |
commit | c094ea0774d6881598da430ea0916a597162f8df (patch) | |
tree | e54a8037d3db3387c8972a39d3fd6311cfe8ec63 | |
parent | 2787cb8ae5c68a6945eb82ccf96b5f2c4f238323 (diff) |
ide: add IDE_HFLAG_4DRIVES host flag
Add IDE_HFLAG_4DRIVES host flag and use it instead of ide_4drives
chipset type in ide_init_port().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-4drives.c | 3 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 4 | ||||
-rw-r--r-- | include/linux/ide.h | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ide/ide-4drives.c b/drivers/ide/ide-4drives.c index 9e85b1ec9607..78aca75a2c48 100644 --- a/drivers/ide/ide-4drives.c +++ b/drivers/ide/ide-4drives.c | |||
@@ -23,7 +23,8 @@ static const struct ide_port_ops ide_4drives_port_ops = { | |||
23 | 23 | ||
24 | static const struct ide_port_info ide_4drives_port_info = { | 24 | static const struct ide_port_info ide_4drives_port_info = { |
25 | .port_ops = &ide_4drives_port_ops, | 25 | .port_ops = &ide_4drives_port_ops, |
26 | .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_NO_DMA, | 26 | .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_NO_DMA | |
27 | IDE_HFLAG_4DRIVES, | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | static int __init ide_4drives_init(void) | 30 | static int __init ide_4drives_init(void) |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 62270f474681..335322f40c5a 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1381,8 +1381,8 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, | |||
1381 | if (ide_probe_port(hwif) == 0) | 1381 | if (ide_probe_port(hwif) == 0) |
1382 | hwif->present = 1; | 1382 | hwif->present = 1; |
1383 | 1383 | ||
1384 | if (hwif->chipset != ide_4drives || !hwif->mate || | 1384 | if ((hwif->host_flags & IDE_HFLAG_4DRIVES) == 0 || |
1385 | !hwif->mate->present) { | 1385 | hwif->mate == NULL || hwif->mate->present == 0) { |
1386 | if (ide_register_port(hwif)) { | 1386 | if (ide_register_port(hwif)) { |
1387 | ide_disable_port(hwif); | 1387 | ide_disable_port(hwif); |
1388 | continue; | 1388 | continue; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 732a05f3de08..3d4ba8e95d4a 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1327,6 +1327,8 @@ enum { | |||
1327 | IDE_HFLAG_SERIALIZE = (1 << 20), | 1327 | IDE_HFLAG_SERIALIZE = (1 << 20), |
1328 | /* host is DTC2278 */ | 1328 | /* host is DTC2278 */ |
1329 | IDE_HFLAG_DTC2278 = (1 << 21), | 1329 | IDE_HFLAG_DTC2278 = (1 << 21), |
1330 | /* 4 devices on a single set of I/O ports */ | ||
1331 | IDE_HFLAG_4DRIVES = (1 << 22), | ||
1330 | /* host is TRM290 */ | 1332 | /* host is TRM290 */ |
1331 | IDE_HFLAG_TRM290 = (1 << 23), | 1333 | IDE_HFLAG_TRM290 = (1 << 23), |
1332 | /* use 32-bit I/O ops */ | 1334 | /* use 32-bit I/O ops */ |