diff options
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 19ab25804056..5f5daad8bc54 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -681,6 +681,10 @@ 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; | ||
685 | |||
686 | u8 pio_mask; | ||
687 | |||
684 | u8 atapi_dma; /* host supports atapi_dma */ | 688 | u8 atapi_dma; /* host supports atapi_dma */ |
685 | u8 ultra_mask; | 689 | u8 ultra_mask; |
686 | u8 mwdma_mask; | 690 | u8 mwdma_mask; |
@@ -1244,7 +1248,13 @@ typedef struct ide_pci_enablebit_s { | |||
1244 | 1248 | ||
1245 | enum { | 1249 | enum { |
1246 | /* Uses ISA control ports not PCI ones. */ | 1250 | /* Uses ISA control ports not PCI ones. */ |
1247 | IDEPCI_FLAG_ISA_PORTS = (1 << 0), | 1251 | IDE_HFLAG_ISA_PORTS = (1 << 0), |
1252 | /* single port device */ | ||
1253 | IDE_HFLAG_SINGLE = (1 << 1), | ||
1254 | /* don't use legacy PIO blacklist */ | ||
1255 | IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2), | ||
1256 | /* don't use conservative PIO "downgrade" */ | ||
1257 | IDE_HFLAG_PIO_NO_DOWNGRADE = (1 << 3), | ||
1248 | }; | 1258 | }; |
1249 | 1259 | ||
1250 | typedef struct ide_pci_device_s { | 1260 | typedef struct ide_pci_device_s { |
@@ -1256,13 +1266,13 @@ typedef struct ide_pci_device_s { | |||
1256 | void (*init_hwif)(ide_hwif_t *); | 1266 | void (*init_hwif)(ide_hwif_t *); |
1257 | void (*init_dma)(ide_hwif_t *, unsigned long); | 1267 | void (*init_dma)(ide_hwif_t *, unsigned long); |
1258 | void (*fixup)(ide_hwif_t *); | 1268 | void (*fixup)(ide_hwif_t *); |
1259 | u8 channels; | ||
1260 | u8 autodma; | 1269 | u8 autodma; |
1261 | ide_pci_enablebit_t enablebits[2]; | 1270 | ide_pci_enablebit_t enablebits[2]; |
1262 | u8 bootable; | 1271 | u8 bootable; |
1263 | unsigned int extra; | 1272 | unsigned int extra; |
1264 | struct ide_pci_device_s *next; | 1273 | struct ide_pci_device_s *next; |
1265 | u8 flags; | 1274 | u8 host_flags; |
1275 | u8 pio_mask; | ||
1266 | u8 udma_mask; | 1276 | u8 udma_mask; |
1267 | } ide_pci_device_t; | 1277 | } ide_pci_device_t; |
1268 | 1278 | ||
@@ -1363,6 +1373,11 @@ extern void ide_toggle_bounce(ide_drive_t *drive, int on); | |||
1363 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | 1373 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); |
1364 | int ide_use_fast_pio(ide_drive_t *); | 1374 | int ide_use_fast_pio(ide_drive_t *); |
1365 | 1375 | ||
1376 | static inline int ide_dev_has_iordy(struct hd_driveid *id) | ||
1377 | { | ||
1378 | return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; | ||
1379 | } | ||
1380 | |||
1366 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1381 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
1367 | 1382 | ||
1368 | typedef struct ide_pio_timings_s { | 1383 | typedef struct ide_pio_timings_s { |
@@ -1372,14 +1387,8 @@ typedef struct ide_pio_timings_s { | |||
1372 | /* active + recovery (+ setup for some chips) */ | 1387 | /* active + recovery (+ setup for some chips) */ |
1373 | } ide_pio_timings_t; | 1388 | } ide_pio_timings_t; |
1374 | 1389 | ||
1375 | typedef struct ide_pio_data_s { | 1390 | unsigned int ide_pio_cycle_time(ide_drive_t *, u8); |
1376 | u8 pio_mode; | 1391 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1377 | u8 use_iordy; | ||
1378 | u8 overridden; | ||
1379 | unsigned int cycle_time; | ||
1380 | } ide_pio_data_t; | ||
1381 | |||
1382 | extern u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d); | ||
1383 | extern const ide_pio_timings_t ide_pio_timings[6]; | 1392 | extern const ide_pio_timings_t ide_pio_timings[6]; |
1384 | 1393 | ||
1385 | 1394 | ||