diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-13 13:13:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-13 13:13:27 -0400 |
commit | bcd11eaa222fce31d0b59cdbfdf9b8c47067f15a (patch) | |
tree | aac97cbc4508829740b4b5a186f3f9ed5a24c081 /include | |
parent | c8c55bcb43d790d97790cfa319d80045a71fde39 (diff) | |
parent | 99149a485958ada512eafc34fe36a80cb63fa56c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (27 commits)
alim15x3: remove redundant m5229_revision check
sc1200: fix ->dma_base equal zero handling
cs5520: fix ->dma_base equal zero handling
sgiioc4: add missing ->dma_base check
cs5535: add missing ->dma_base check
ide: remove CONFIG_IDEDMA_IVB config option
ide: change master/slave IDENTIFY order
ide: move ide_config_drive_speed() calls to upper layers (take 2)
pdc202xx_new: check ide_config_drive_speed() return value
cs5535: check ide_config_drive_speed() return value
amd74xx/via82cxxx: check ide_config_drive_speed() return value
au1xxx: fix au1xxx_set_pio_mode()
icside: use ide_tune_dma()
ide-pmac: fix PIO setup and enable autotune
ide-pmac: use ide_tune_dma() (take 2)
ide-pmac: remove pmac_ide_do_setfeature() (take 2)
ide-pmac: remove nIEN clearing from pmac_ide_do_setfeature()
ide-pmac: use __ide_wait_stat()
ide-pmac: remove extra good status wait from pmac_ide_do_setfeature()
ide: add __ide_wait_stat() helper
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ide.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 85d448b4abec..02a27e8cbad2 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -681,7 +681,7 @@ typedef struct hwif_s { | |||
681 | u8 straight8; /* Alan's straight 8 check */ | 681 | u8 straight8; /* Alan's straight 8 check */ |
682 | u8 bus_state; /* power state of the IDE bus */ | 682 | u8 bus_state; /* power state of the IDE bus */ |
683 | 683 | ||
684 | u8 host_flags; | 684 | u16 host_flags; |
685 | 685 | ||
686 | u8 pio_mask; | 686 | u8 pio_mask; |
687 | 687 | ||
@@ -702,10 +702,10 @@ typedef struct hwif_s { | |||
702 | #if 0 | 702 | #if 0 |
703 | ide_hwif_ops_t *hwifops; | 703 | ide_hwif_ops_t *hwifops; |
704 | #else | 704 | #else |
705 | /* routine to set PIO mode for drives */ | 705 | /* routine to program host for PIO mode */ |
706 | void (*set_pio_mode)(ide_drive_t *, const u8); | 706 | void (*set_pio_mode)(ide_drive_t *, const u8); |
707 | /* routine to retune DMA modes for drives */ | 707 | /* routine to program host for DMA mode */ |
708 | int (*speedproc)(ide_drive_t *, const u8); | 708 | void (*set_dma_mode)(ide_drive_t *, const u8); |
709 | /* tweaks hardware to select drive */ | 709 | /* tweaks hardware to select drive */ |
710 | void (*selectproc)(ide_drive_t *); | 710 | void (*selectproc)(ide_drive_t *); |
711 | /* chipset polling based on hba specifics */ | 711 | /* chipset polling based on hba specifics */ |
@@ -1079,16 +1079,7 @@ extern void ide_fix_driveid(struct hd_driveid *); | |||
1079 | */ | 1079 | */ |
1080 | extern void ide_fixstring(u8 *, const int, const int); | 1080 | extern void ide_fixstring(u8 *, const int, const int); |
1081 | 1081 | ||
1082 | /* | 1082 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
1083 | * This routine busy-waits for the drive status to be not "busy". | ||
1084 | * It then checks the status for all of the "good" bits and none | ||
1085 | * of the "bad" bits, and if all is okay it returns 0. All other | ||
1086 | * cases return 1 after doing "*startstop = ide_error()", and the | ||
1087 | * caller should return the updated value of "startstop" in this case. | ||
1088 | * "startstop" is unchanged when the function returns 0; | ||
1089 | * (startstop, drive, good, bad, timeout) | ||
1090 | */ | ||
1091 | extern int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | ||
1092 | 1083 | ||
1093 | /* | 1084 | /* |
1094 | * Start a reset operation for an IDE interface. | 1085 | * Start a reset operation for an IDE interface. |
@@ -1162,7 +1153,6 @@ extern void SELECT_MASK(ide_drive_t *, int); | |||
1162 | extern void QUIRK_LIST(ide_drive_t *); | 1153 | extern void QUIRK_LIST(ide_drive_t *); |
1163 | 1154 | ||
1164 | extern int drive_is_ready(ide_drive_t *); | 1155 | extern int drive_is_ready(ide_drive_t *); |
1165 | extern int wait_for_ready(ide_drive_t *, int /* timeout */); | ||
1166 | 1156 | ||
1167 | /* | 1157 | /* |
1168 | * 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 |
@@ -1262,6 +1252,15 @@ enum { | |||
1262 | IDE_HFLAG_ABUSE_FAST_DEVSEL = (1 << 5), | 1252 | IDE_HFLAG_ABUSE_FAST_DEVSEL = (1 << 5), |
1263 | /* 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 */ |
1264 | 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), | ||
1260 | /* program host for the transfer mode after programming device */ | ||
1261 | IDE_HFLAG_POST_SET_MODE = (1 << 8), | ||
1262 | /* don't program host/device for the transfer mode ("smart" hosts) */ | ||
1263 | IDE_HFLAG_NO_SET_MODE = (1 << 9), | ||
1265 | }; | 1264 | }; |
1266 | 1265 | ||
1267 | typedef struct ide_pci_device_s { | 1266 | typedef struct ide_pci_device_s { |
@@ -1278,7 +1277,7 @@ typedef struct ide_pci_device_s { | |||
1278 | u8 bootable; | 1277 | u8 bootable; |
1279 | unsigned int extra; | 1278 | unsigned int extra; |
1280 | struct ide_pci_device_s *next; | 1279 | struct ide_pci_device_s *next; |
1281 | u8 host_flags; | 1280 | u16 host_flags; |
1282 | u8 pio_mask; | 1281 | u8 pio_mask; |
1283 | u8 udma_mask; | 1282 | u8 udma_mask; |
1284 | } ide_pci_device_t; | 1283 | } ide_pci_device_t; |
@@ -1301,7 +1300,6 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | |||
1301 | 1300 | ||
1302 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1301 | #ifdef CONFIG_BLK_DEV_IDEDMA |
1303 | int __ide_dma_bad_drive(ide_drive_t *); | 1302 | int __ide_dma_bad_drive(ide_drive_t *); |
1304 | int __ide_dma_good_drive(ide_drive_t *); | ||
1305 | 1303 | ||
1306 | u8 ide_find_dma_mode(ide_drive_t *, u8); | 1304 | u8 ide_find_dma_mode(ide_drive_t *, u8); |
1307 | 1305 | ||
@@ -1420,6 +1418,9 @@ unsigned int ide_pio_cycle_time(ide_drive_t *, u8); | |||
1420 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1418 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1421 | extern const ide_pio_timings_t ide_pio_timings[6]; | 1419 | extern const ide_pio_timings_t ide_pio_timings[6]; |
1422 | 1420 | ||
1421 | int ide_set_pio_mode(ide_drive_t *, u8); | ||
1422 | int ide_set_dma_mode(ide_drive_t *, u8); | ||
1423 | |||
1423 | void ide_set_pio(ide_drive_t *, u8); | 1424 | void ide_set_pio(ide_drive_t *, u8); |
1424 | 1425 | ||
1425 | static inline void ide_set_max_pio(ide_drive_t *drive) | 1426 | static inline void ide_set_max_pio(ide_drive_t *drive) |