ide-gd.h 971 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __IDE_GD_H
  3. #define __IDE_GD_H
  4. #define DRV_NAME "ide-gd"
  5. #define PFX DRV_NAME ": "
  6. /* define to see debug info */
  7. #define IDE_GD_DEBUG_LOG 0
  8. #if IDE_GD_DEBUG_LOG
  9. #define ide_debug_log(lvl, fmt, args...) __ide_debug_log(lvl, fmt, ## args)
  10. #else
  11. #define ide_debug_log(lvl, fmt, args...) do {} while (0)
  12. #endif
  13. struct ide_disk_obj {
  14. ide_drive_t *drive;
  15. struct ide_driver *driver;
  16. struct gendisk *disk;
  17. struct device dev;
  18. unsigned int openers; /* protected by BKL for now */
  19. /* used for blk_{fs,pc}_request() requests */
  20. struct ide_atapi_pc queued_pc;
  21. /* Last error information */
  22. u8 sense_key, asc, ascq;
  23. int progress_indication;
  24. /* Device information */
  25. /* Current format */
  26. int blocks, block_size, bs_factor;
  27. /* Last format capacity descriptor */
  28. u8 cap_desc[8];
  29. /* Copy of the flexible disk page */
  30. u8 flexible_disk_page[32];
  31. };
  32. sector_t ide_gd_capacity(ide_drive_t *);
  33. #endif /* __IDE_GD_H */