Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Bartlomiej Zolnierkiewicz | 806f80a | 2008-10-17 18:09:14 +0200 | [diff] [blame] | 2 | #ifndef __IDE_GD_H |
| 3 | #define __IDE_GD_H |
| 4 | |
| 5 | #define DRV_NAME "ide-gd" |
| 6 | #define PFX DRV_NAME ": " |
| 7 | |
| 8 | /* define to see debug info */ |
| 9 | #define IDE_GD_DEBUG_LOG 0 |
| 10 | |
| 11 | #if IDE_GD_DEBUG_LOG |
Borislav Petkov | 088b1b8 | 2009-01-02 13:34:47 +0100 | [diff] [blame] | 12 | #define ide_debug_log(lvl, fmt, args...) __ide_debug_log(lvl, fmt, ## args) |
Bartlomiej Zolnierkiewicz | 806f80a | 2008-10-17 18:09:14 +0200 | [diff] [blame] | 13 | #else |
| 14 | #define ide_debug_log(lvl, fmt, args...) do {} while (0) |
| 15 | #endif |
| 16 | |
| 17 | struct ide_disk_obj { |
Bartlomiej Zolnierkiewicz | 7f3c868 | 2009-01-06 17:20:53 +0100 | [diff] [blame] | 18 | ide_drive_t *drive; |
| 19 | struct ide_driver *driver; |
| 20 | struct gendisk *disk; |
Bartlomiej Zolnierkiewicz | 8fed436 | 2009-02-25 20:28:24 +0100 | [diff] [blame] | 21 | struct device dev; |
Bartlomiej Zolnierkiewicz | 7f3c868 | 2009-01-06 17:20:53 +0100 | [diff] [blame] | 22 | unsigned int openers; /* protected by BKL for now */ |
Bartlomiej Zolnierkiewicz | 806f80a | 2008-10-17 18:09:14 +0200 | [diff] [blame] | 23 | |
Bartlomiej Zolnierkiewicz | 806f80a | 2008-10-17 18:09:14 +0200 | [diff] [blame] | 24 | /* used for blk_{fs,pc}_request() requests */ |
| 25 | struct ide_atapi_pc queued_pc; |
| 26 | |
| 27 | /* Last error information */ |
| 28 | u8 sense_key, asc, ascq; |
| 29 | |
| 30 | int progress_indication; |
| 31 | |
| 32 | /* Device information */ |
| 33 | /* Current format */ |
| 34 | int blocks, block_size, bs_factor; |
| 35 | /* Last format capacity descriptor */ |
| 36 | u8 cap_desc[8]; |
| 37 | /* Copy of the flexible disk page */ |
| 38 | u8 flexible_disk_page[32]; |
| 39 | }; |
| 40 | |
| 41 | sector_t ide_gd_capacity(ide_drive_t *); |
| 42 | |
| 43 | #endif /* __IDE_GD_H */ |