diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-13 11:47:50 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-13 11:47:50 -0400 |
commit | aedea5910ce44fea79e2c517bb22e0006372156f (patch) | |
tree | 5e9c84f0c045058594a80a2bc67b358f80d1d884 /include | |
parent | 3b2d0093b8eb2b0b4adc86138edee9f6d376cafb (diff) |
ide-pmac: remove pmac_ide_do_setfeature() (take 2)
Use ide_config_drive_speed() instead of pmac_ide_do_setfeature() and remove
the latter, also ide-iops.c::__ide_wait_stat() could be static again.
Since for IDE PMAC host driver IDE_CONTROL_REG is always true, device's
->quirk_list is always zero and ->ide_dma_host_{on,off} are nops than
the only changes in behavior are:
* if PIO mode is set then ->dma_off_queitly is called to disable DMA
* if setting transfer mode fails ide_dump_status() is called to dump status
v2:
* IDE PMAC controllers allow separate PIO and DMA timings and PPC userland
depends on this fact, and calls "hdparm -p" without calling "hdparm -d".
Therefore to compensate for DMA being disabled by ide_config_drive_speed()
for PIO modes:
- add IDE_HFLAG_SET_PIO_MODE_KEEP_DMA flag and set it in PMAC host driver
- add handling of the new flag to ide-io.c::do_special()
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ide.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index d86115e9aa2c..6bb621203f30 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1153,7 +1153,6 @@ extern void SELECT_MASK(ide_drive_t *, int); | |||
1153 | extern void QUIRK_LIST(ide_drive_t *); | 1153 | extern void QUIRK_LIST(ide_drive_t *); |
1154 | 1154 | ||
1155 | extern int drive_is_ready(ide_drive_t *); | 1155 | extern int drive_is_ready(ide_drive_t *); |
1156 | int __ide_wait_stat(ide_drive_t *, u8, u8, unsigned long); | ||
1157 | 1156 | ||
1158 | /* | 1157 | /* |
1159 | * taskfile io for disks for now...and builds request from ide_ioctl | 1158 | * taskfile io for disks for now...and builds request from ide_ioctl |
@@ -1253,6 +1252,11 @@ enum { | |||
1253 | IDE_HFLAG_ABUSE_FAST_DEVSEL = (1 << 5), | 1252 | IDE_HFLAG_ABUSE_FAST_DEVSEL = (1 << 5), |
1254 | /* use 100-102 and 200-202 PIO values to set DMA modes */ | 1253 | /* use 100-102 and 200-202 PIO values to set DMA modes */ |
1255 | IDE_HFLAG_ABUSE_DMA_MODES = (1 << 6), | 1254 | IDE_HFLAG_ABUSE_DMA_MODES = (1 << 6), |
1255 | /* | ||
1256 | * keep DMA setting when programming PIO mode, may be used only | ||
1257 | * for hosts which have separate PIO and DMA timings (ie. PMAC) | ||
1258 | */ | ||
1259 | IDE_HFLAG_SET_PIO_MODE_KEEP_DMA = (1 << 7), | ||
1256 | }; | 1260 | }; |
1257 | 1261 | ||
1258 | typedef struct ide_pci_device_s { | 1262 | typedef struct ide_pci_device_s { |