ide-gd.h 986 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. ide_driver_t *driver;
  15. struct gendisk *disk;
  16. struct kref kref;
  17. unsigned int openers; /* protected by BKL for now */
  18. /* Last failed packet command */
  19. struct ide_atapi_pc *failed_pc;
  20. /* used for blk_{fs,pc}_request() requests */
  21. struct ide_atapi_pc queued_pc;
  22. /* Last error information */
  23. u8 sense_key, asc, ascq;
  24. int progress_indication;
  25. /* Device information */
  26. /* Current format */
  27. int blocks, block_size, bs_factor;
  28. /* Last format capacity descriptor */
  29. u8 cap_desc[8];
  30. /* Copy of the flexible disk page */
  31. u8 flexible_disk_page[32];
  32. };
  33. sector_t ide_gd_capacity(ide_drive_t *);
  34. #endif /* __IDE_GD_H */