ide-floppy.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __IDE_FLOPPY_H
  3. #define __IDE_FLOPPY_H
  4. #include "ide-gd.h"
  5. #ifdef CONFIG_IDE_GD_ATAPI
  6. /*
  7. * Pages of the SELECT SENSE / MODE SENSE packet commands.
  8. * See SFF-8070i spec.
  9. */
  10. #define IDEFLOPPY_CAPABILITIES_PAGE 0x1b
  11. #define IDEFLOPPY_FLEXIBLE_DISK_PAGE 0x05
  12. /* IOCTLs used in low-level formatting. */
  13. #define IDEFLOPPY_IOCTL_FORMAT_SUPPORTED 0x4600
  14. #define IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY 0x4601
  15. #define IDEFLOPPY_IOCTL_FORMAT_START 0x4602
  16. #define IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS 0x4603
  17. /* ide-floppy.c */
  18. extern const struct ide_disk_ops ide_atapi_disk_ops;
  19. void ide_floppy_create_mode_sense_cmd(struct ide_atapi_pc *, u8);
  20. void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *);
  21. /* ide-floppy_ioctl.c */
  22. int ide_floppy_ioctl(ide_drive_t *, struct block_device *, fmode_t,
  23. unsigned int, unsigned long);
  24. int ide_floppy_compat_ioctl(ide_drive_t *, struct block_device *, fmode_t,
  25. unsigned int, unsigned long);
  26. #ifdef CONFIG_IDE_PROC_FS
  27. /* ide-floppy_proc.c */
  28. extern ide_proc_entry_t ide_floppy_proc[];
  29. extern const struct ide_proc_devset ide_floppy_settings[];
  30. #endif
  31. #else
  32. #define ide_floppy_proc NULL
  33. #define ide_floppy_settings NULL
  34. #endif
  35. #endif /*__IDE_FLOPPY_H */