ide-gd.h 932 B

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