diff options
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index f20410dd4482..b594f04a67f4 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -387,6 +387,32 @@ typedef struct ide_drive_s { | |||
387 | 387 | ||
388 | struct ide_port_info; | 388 | struct ide_port_info; |
389 | 389 | ||
390 | struct ide_port_ops { | ||
391 | /* host specific initialization of devices on a port */ | ||
392 | void (*port_init_devs)(struct hwif_s *); | ||
393 | /* routine to program host for PIO mode */ | ||
394 | void (*set_pio_mode)(ide_drive_t *, const u8); | ||
395 | /* routine to program host for DMA mode */ | ||
396 | void (*set_dma_mode)(ide_drive_t *, const u8); | ||
397 | /* tweaks hardware to select drive */ | ||
398 | void (*selectproc)(ide_drive_t *); | ||
399 | /* chipset polling based on hba specifics */ | ||
400 | int (*reset_poll)(ide_drive_t *); | ||
401 | /* chipset specific changes to default for device-hba resets */ | ||
402 | void (*pre_reset)(ide_drive_t *); | ||
403 | /* routine to reset controller after a disk reset */ | ||
404 | void (*resetproc)(ide_drive_t *); | ||
405 | /* special host masking for drive selection */ | ||
406 | void (*maskproc)(ide_drive_t *, int); | ||
407 | /* check host's drive quirk list */ | ||
408 | void (*quirkproc)(ide_drive_t *); | ||
409 | |||
410 | u8 (*mdma_filter)(ide_drive_t *); | ||
411 | u8 (*udma_filter)(ide_drive_t *); | ||
412 | |||
413 | u8 (*cable_detect)(struct hwif_s *); | ||
414 | }; | ||
415 | |||
390 | typedef struct hwif_s { | 416 | typedef struct hwif_s { |
391 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 417 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
392 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 418 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
@@ -426,32 +452,7 @@ typedef struct hwif_s { | |||
426 | 452 | ||
427 | void (*rw_disk)(ide_drive_t *, struct request *); | 453 | void (*rw_disk)(ide_drive_t *, struct request *); |
428 | 454 | ||
429 | #if 0 | 455 | const struct ide_port_ops *port_ops; |
430 | ide_hwif_ops_t *hwifops; | ||
431 | #else | ||
432 | /* host specific initialization of devices on a port */ | ||
433 | void (*port_init_devs)(struct hwif_s *); | ||
434 | /* routine to program host for PIO mode */ | ||
435 | void (*set_pio_mode)(ide_drive_t *, const u8); | ||
436 | /* routine to program host for DMA mode */ | ||
437 | void (*set_dma_mode)(ide_drive_t *, const u8); | ||
438 | /* tweaks hardware to select drive */ | ||
439 | void (*selectproc)(ide_drive_t *); | ||
440 | /* chipset polling based on hba specifics */ | ||
441 | int (*reset_poll)(ide_drive_t *); | ||
442 | /* chipset specific changes to default for device-hba resets */ | ||
443 | void (*pre_reset)(ide_drive_t *); | ||
444 | /* routine to reset controller after a disk reset */ | ||
445 | void (*resetproc)(ide_drive_t *); | ||
446 | /* special host masking for drive selection */ | ||
447 | void (*maskproc)(ide_drive_t *, int); | ||
448 | /* check host's drive quirk list */ | ||
449 | void (*quirkproc)(ide_drive_t *); | ||
450 | #endif | ||
451 | u8 (*mdma_filter)(ide_drive_t *); | ||
452 | u8 (*udma_filter)(ide_drive_t *); | ||
453 | |||
454 | u8 (*cable_detect)(struct hwif_s *); | ||
455 | 456 | ||
456 | void (*ata_input_data)(ide_drive_t *, void *, u32); | 457 | void (*ata_input_data)(ide_drive_t *, void *, u32); |
457 | void (*ata_output_data)(ide_drive_t *, void *, u32); | 458 | void (*ata_output_data)(ide_drive_t *, void *, u32); |
@@ -1106,6 +1107,9 @@ struct ide_port_info { | |||
1106 | void (*init_iops)(ide_hwif_t *); | 1107 | void (*init_iops)(ide_hwif_t *); |
1107 | void (*init_hwif)(ide_hwif_t *); | 1108 | void (*init_hwif)(ide_hwif_t *); |
1108 | void (*init_dma)(ide_hwif_t *, unsigned long); | 1109 | void (*init_dma)(ide_hwif_t *, unsigned long); |
1110 | |||
1111 | const struct ide_port_ops *port_ops; | ||
1112 | |||
1109 | ide_pci_enablebit_t enablebits[2]; | 1113 | ide_pci_enablebit_t enablebits[2]; |
1110 | hwif_chipset_t chipset; | 1114 | hwif_chipset_t chipset; |
1111 | u8 extra; | 1115 | u8 extra; |