blob: 55970772bd04cc3e9f83681740ba5de2b2ee0635 [file] [log] [blame]
Bartlomiej Zolnierkiewicz806f80a2008-10-17 18:09:14 +02001#ifndef __IDE_GD_H
2#define __IDE_GD_H
3
4#define DRV_NAME "ide-gd"
5#define PFX DRV_NAME ": "
6
7/* define to see debug info */
8#define IDE_GD_DEBUG_LOG 0
9
10#if IDE_GD_DEBUG_LOG
Borislav Petkov088b1b82009-01-02 13:34:47 +010011#define ide_debug_log(lvl, fmt, args...) __ide_debug_log(lvl, fmt, ## args)
Bartlomiej Zolnierkiewicz806f80a2008-10-17 18:09:14 +020012#else
13#define ide_debug_log(lvl, fmt, args...) do {} while (0)
14#endif
15
16struct ide_disk_obj {
Bartlomiej Zolnierkiewicz7f3c8682009-01-06 17:20:53 +010017 ide_drive_t *drive;
18 struct ide_driver *driver;
19 struct gendisk *disk;
Bartlomiej Zolnierkiewicz8fed4362009-02-25 20:28:24 +010020 struct device dev;
Bartlomiej Zolnierkiewicz7f3c8682009-01-06 17:20:53 +010021 unsigned int openers; /* protected by BKL for now */
Bartlomiej Zolnierkiewicz806f80a2008-10-17 18:09:14 +020022
Bartlomiej Zolnierkiewicz806f80a2008-10-17 18:09:14 +020023 /* used for blk_{fs,pc}_request() requests */
24 struct ide_atapi_pc queued_pc;
25
26 /* Last error information */
27 u8 sense_key, asc, ascq;
28
29 int progress_indication;
30
31 /* Device information */
32 /* Current format */
33 int blocks, block_size, bs_factor;
34 /* Last format capacity descriptor */
35 u8 cap_desc[8];
36 /* Copy of the flexible disk page */
37 u8 flexible_disk_page[32];
38};
39
40sector_t ide_gd_capacity(ide_drive_t *);
41
42#endif /* __IDE_GD_H */