diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 22:20:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 22:20:44 -0400 |
commit | 19f71153b9be219756c6b2757921433a69b7975c (patch) | |
tree | cc2c5c290a88d61df16848f733aed8708e82c119 /include | |
parent | e6005a85acb9609326512ecc784859831cfb24a3 (diff) | |
parent | 8f4dd2e42637fd61a6366d2cace69091926eaa15 (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: (24 commits)
ide: use only ->set_pio_mode method for programming PIO modes (take 2)
sis5513: don't change UDMA settings when programming PIO
it8213/piix/slc90e66: don't change DMA settings when programming PIO
alim15x3: PIO mode setup fixes
siimage: fix ->set_pio_mode method to select PIO data transfer
cs5520: don't enable VDMA in ->speedproc
sc1200: remove redundant warning message from sc1200_tune_chipset()
ide-pmac: PIO mode setup fixes (take 3)
icside: fix ->speedproc to return on unsupported modes (take 5)
sgiioc4: use ide_tune_dma()
amd74xx/via82cxxx: use ide_tune_dma()
ide: add ide_set{_max}_pio() (take 4)
ide: Kconfig face-lift
ide: move ide_rate_filter() calls to the upper layer (take 2)
sis5513: add ->udma_filter method for chipset_family >= ATA_133
ide: mode limiting fixes for user requested speed changes
ide: add missing ide_rate_filter() calls to ->speedproc()-s
ide: call udma_filter() before resorting to the UltraDMA mask
ide: make jmicron match vendor and device class
pdc202xx_new: switch to using pci_get_slot() (take 2)
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ide.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index b9f66c10caa0..85d448b4abec 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -634,7 +634,7 @@ typedef struct ide_drive_s { | |||
634 | 634 | ||
635 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ | 635 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ |
636 | unsigned int cyl; /* "real" number of cyls */ | 636 | unsigned int cyl; /* "real" number of cyls */ |
637 | unsigned int drive_data; /* use by tuneproc/selectproc */ | 637 | unsigned int drive_data; /* used by set_pio_mode/selectproc */ |
638 | unsigned int failures; /* current failure count */ | 638 | unsigned int failures; /* current failure count */ |
639 | unsigned int max_failures; /* maximum allowed failure count */ | 639 | unsigned int max_failures; /* maximum allowed failure count */ |
640 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ | 640 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ |
@@ -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 tune PIO mode for drives */ | 705 | /* routine to set PIO mode for drives */ |
706 | void (*tuneproc)(ide_drive_t *, u8); | 706 | void (*set_pio_mode)(ide_drive_t *, const u8); |
707 | /* routine to retune DMA modes for drives */ | 707 | /* routine to retune DMA modes for drives */ |
708 | int (*speedproc)(ide_drive_t *, u8); | 708 | int (*speedproc)(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 */ |
@@ -723,6 +723,7 @@ typedef struct hwif_s { | |||
723 | /* driver soft-power interface */ | 723 | /* driver soft-power interface */ |
724 | int (*busproc)(ide_drive_t *, int); | 724 | int (*busproc)(ide_drive_t *, int); |
725 | #endif | 725 | #endif |
726 | u8 (*mdma_filter)(ide_drive_t *); | ||
726 | u8 (*udma_filter)(ide_drive_t *); | 727 | u8 (*udma_filter)(ide_drive_t *); |
727 | 728 | ||
728 | void (*ata_input_data)(ide_drive_t *, void *, u32); | 729 | void (*ata_input_data)(ide_drive_t *, void *, u32); |
@@ -1255,6 +1256,12 @@ enum { | |||
1255 | IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2), | 1256 | IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2), |
1256 | /* don't use conservative PIO "downgrade" */ | 1257 | /* don't use conservative PIO "downgrade" */ |
1257 | IDE_HFLAG_PIO_NO_DOWNGRADE = (1 << 3), | 1258 | IDE_HFLAG_PIO_NO_DOWNGRADE = (1 << 3), |
1259 | /* use PIO8/9 for prefetch off/on */ | ||
1260 | IDE_HFLAG_ABUSE_PREFETCH = (1 << 4), | ||
1261 | /* use PIO6/7 for fast-devsel off/on */ | ||
1262 | IDE_HFLAG_ABUSE_FAST_DEVSEL = (1 << 5), | ||
1263 | /* use 100-102 and 200-202 PIO values to set DMA modes */ | ||
1264 | IDE_HFLAG_ABUSE_DMA_MODES = (1 << 6), | ||
1258 | }; | 1265 | }; |
1259 | 1266 | ||
1260 | typedef struct ide_pci_device_s { | 1267 | typedef struct ide_pci_device_s { |
@@ -1295,7 +1302,14 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | |||
1295 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1302 | #ifdef CONFIG_BLK_DEV_IDEDMA |
1296 | int __ide_dma_bad_drive(ide_drive_t *); | 1303 | int __ide_dma_bad_drive(ide_drive_t *); |
1297 | int __ide_dma_good_drive(ide_drive_t *); | 1304 | int __ide_dma_good_drive(ide_drive_t *); |
1298 | u8 ide_max_dma_mode(ide_drive_t *); | 1305 | |
1306 | u8 ide_find_dma_mode(ide_drive_t *, u8); | ||
1307 | |||
1308 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) | ||
1309 | { | ||
1310 | return ide_find_dma_mode(drive, XFER_UDMA_6); | ||
1311 | } | ||
1312 | |||
1299 | int ide_tune_dma(ide_drive_t *); | 1313 | int ide_tune_dma(ide_drive_t *); |
1300 | void ide_dma_off(ide_drive_t *); | 1314 | void ide_dma_off(ide_drive_t *); |
1301 | void ide_dma_verbose(ide_drive_t *); | 1315 | void ide_dma_verbose(ide_drive_t *); |
@@ -1321,6 +1335,7 @@ extern void ide_dma_timeout(ide_drive_t *); | |||
1321 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 1335 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ |
1322 | 1336 | ||
1323 | #else | 1337 | #else |
1338 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } | ||
1324 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } | 1339 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } |
1325 | static inline int ide_tune_dma(ide_drive_t *drive) { return 0; } | 1340 | static inline int ide_tune_dma(ide_drive_t *drive) { return 0; } |
1326 | static inline void ide_dma_off(ide_drive_t *drive) { ; } | 1341 | static inline void ide_dma_off(ide_drive_t *drive) { ; } |
@@ -1337,11 +1352,13 @@ extern int ide_acpi_exec_tfs(ide_drive_t *drive); | |||
1337 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1352 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
1338 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1353 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
1339 | extern void ide_acpi_init(ide_hwif_t *hwif); | 1354 | extern void ide_acpi_init(ide_hwif_t *hwif); |
1355 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | ||
1340 | #else | 1356 | #else |
1341 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1357 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
1342 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1358 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
1343 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1359 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
1344 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | 1360 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } |
1361 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | ||
1345 | #endif | 1362 | #endif |
1346 | 1363 | ||
1347 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); | 1364 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); |
@@ -1367,7 +1384,6 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
1367 | } | 1384 | } |
1368 | 1385 | ||
1369 | /* ide-lib.c */ | 1386 | /* ide-lib.c */ |
1370 | u8 ide_rate_filter(ide_drive_t *, u8); | ||
1371 | extern char *ide_xfer_verbose(u8 xfer_rate); | 1387 | extern char *ide_xfer_verbose(u8 xfer_rate); |
1372 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1388 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1373 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | 1389 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); |
@@ -1404,6 +1420,12 @@ unsigned int ide_pio_cycle_time(ide_drive_t *, u8); | |||
1404 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1420 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1405 | extern const ide_pio_timings_t ide_pio_timings[6]; | 1421 | extern const ide_pio_timings_t ide_pio_timings[6]; |
1406 | 1422 | ||
1423 | void ide_set_pio(ide_drive_t *, u8); | ||
1424 | |||
1425 | static inline void ide_set_max_pio(ide_drive_t *drive) | ||
1426 | { | ||
1427 | ide_set_pio(drive, 255); | ||
1428 | } | ||
1407 | 1429 | ||
1408 | extern spinlock_t ide_lock; | 1430 | extern spinlock_t ide_lock; |
1409 | extern struct mutex ide_cfg_mtx; | 1431 | extern struct mutex ide_cfg_mtx; |