diff options
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index c47e371554c1..89e53cfbc787 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -461,12 +461,26 @@ struct ide_acpi_drive_link; | |||
461 | struct ide_acpi_hwif_link; | 461 | struct ide_acpi_hwif_link; |
462 | #endif | 462 | #endif |
463 | 463 | ||
464 | struct ide_drive_s; | ||
465 | |||
466 | struct ide_disk_ops { | ||
467 | int (*check)(struct ide_drive_s *, const char *); | ||
468 | int (*get_capacity)(struct ide_drive_s *); | ||
469 | void (*setup)(struct ide_drive_s *); | ||
470 | void (*flush)(struct ide_drive_s *); | ||
471 | int (*init_media)(struct ide_drive_s *, struct gendisk *); | ||
472 | int (*set_doorlock)(struct ide_drive_s *, struct gendisk *, | ||
473 | int); | ||
474 | ide_startstop_t (*do_request)(struct ide_drive_s *, struct request *, | ||
475 | sector_t); | ||
476 | int (*end_request)(struct ide_drive_s *, int, int); | ||
477 | int (*ioctl)(struct ide_drive_s *, struct inode *, | ||
478 | struct file *, unsigned int, unsigned long); | ||
479 | }; | ||
480 | |||
464 | /* ATAPI device flags */ | 481 | /* ATAPI device flags */ |
465 | enum { | 482 | enum { |
466 | IDE_AFLAG_DRQ_INTERRUPT = (1 << 0), | 483 | IDE_AFLAG_DRQ_INTERRUPT = (1 << 0), |
467 | IDE_AFLAG_MEDIA_CHANGED = (1 << 1), | ||
468 | /* Drive cannot lock the door. */ | ||
469 | IDE_AFLAG_NO_DOORLOCK = (1 << 2), | ||
470 | 484 | ||
471 | /* ide-cd */ | 485 | /* ide-cd */ |
472 | /* Drive cannot eject the disc. */ | 486 | /* Drive cannot eject the disc. */ |
@@ -498,14 +512,10 @@ enum { | |||
498 | IDE_AFLAG_LE_SPEED_FIELDS = (1 << 17), | 512 | IDE_AFLAG_LE_SPEED_FIELDS = (1 << 17), |
499 | 513 | ||
500 | /* ide-floppy */ | 514 | /* ide-floppy */ |
501 | /* Format in progress */ | ||
502 | IDE_AFLAG_FORMAT_IN_PROGRESS = (1 << 18), | ||
503 | /* Avoid commands not supported in Clik drive */ | 515 | /* Avoid commands not supported in Clik drive */ |
504 | IDE_AFLAG_CLIK_DRIVE = (1 << 19), | 516 | IDE_AFLAG_CLIK_DRIVE = (1 << 19), |
505 | /* Requires BH algorithm for packets */ | 517 | /* Requires BH algorithm for packets */ |
506 | IDE_AFLAG_ZIP_DRIVE = (1 << 20), | 518 | IDE_AFLAG_ZIP_DRIVE = (1 << 20), |
507 | /* Write protect */ | ||
508 | IDE_AFLAG_WP = (1 << 21), | ||
509 | /* Supports format progress report */ | 519 | /* Supports format progress report */ |
510 | IDE_AFLAG_SRFP = (1 << 22), | 520 | IDE_AFLAG_SRFP = (1 << 22), |
511 | 521 | ||
@@ -578,7 +588,11 @@ enum { | |||
578 | /* don't unload heads */ | 588 | /* don't unload heads */ |
579 | IDE_DFLAG_NO_UNLOAD = (1 << 27), | 589 | IDE_DFLAG_NO_UNLOAD = (1 << 27), |
580 | /* heads unloaded, please don't reset port */ | 590 | /* heads unloaded, please don't reset port */ |
581 | IDE_DFLAG_PARKED = (1 << 28) | 591 | IDE_DFLAG_PARKED = (1 << 28), |
592 | IDE_DFLAG_MEDIA_CHANGED = (1 << 29), | ||
593 | /* write protect */ | ||
594 | IDE_DFLAG_WP = (1 << 30), | ||
595 | IDE_DFLAG_FORMAT_IN_PROGRESS = (1 << 31), | ||
582 | }; | 596 | }; |
583 | 597 | ||
584 | struct ide_drive_s { | 598 | struct ide_drive_s { |
@@ -597,6 +611,8 @@ struct ide_drive_s { | |||
597 | #endif | 611 | #endif |
598 | struct hwif_s *hwif; /* actually (ide_hwif_t *) */ | 612 | struct hwif_s *hwif; /* actually (ide_hwif_t *) */ |
599 | 613 | ||
614 | const struct ide_disk_ops *disk_ops; | ||
615 | |||
600 | unsigned long dev_flags; | 616 | unsigned long dev_flags; |
601 | 617 | ||
602 | unsigned long sleep; /* sleep until this time */ | 618 | unsigned long sleep; /* sleep until this time */ |
@@ -1123,8 +1139,8 @@ struct ide_driver_s { | |||
1123 | void (*resume)(ide_drive_t *); | 1139 | void (*resume)(ide_drive_t *); |
1124 | void (*shutdown)(ide_drive_t *); | 1140 | void (*shutdown)(ide_drive_t *); |
1125 | #ifdef CONFIG_IDE_PROC_FS | 1141 | #ifdef CONFIG_IDE_PROC_FS |
1126 | ide_proc_entry_t *proc; | 1142 | ide_proc_entry_t * (*proc_entries)(ide_drive_t *); |
1127 | const struct ide_proc_devset *settings; | 1143 | const struct ide_proc_devset * (*proc_devsets)(ide_drive_t *); |
1128 | #endif | 1144 | #endif |
1129 | }; | 1145 | }; |
1130 | 1146 | ||