diff options
Diffstat (limited to 'drivers/ide/ide-floppy.h')
-rw-r--r-- | drivers/ide/ide-floppy.h | 41 |
1 files changed, 9 insertions, 32 deletions
diff --git a/drivers/ide/ide-floppy.h b/drivers/ide/ide-floppy.h index 17cf865e583d..c17124dd6079 100644 --- a/drivers/ide/ide-floppy.h +++ b/drivers/ide/ide-floppy.h | |||
@@ -1,37 +1,9 @@ | |||
1 | #ifndef __IDE_FLOPPY_H | 1 | #ifndef __IDE_FLOPPY_H |
2 | #define __IDE_FLOPPY_H | 2 | #define __IDE_FLOPPY_H |
3 | 3 | ||
4 | /* | 4 | #include "ide-gd.h" |
5 | * Most of our global data which we need to save even as we leave the driver | ||
6 | * due to an interrupt or a timer event is stored in a variable of type | ||
7 | * idefloppy_floppy_t, defined below. | ||
8 | */ | ||
9 | typedef struct ide_floppy_obj { | ||
10 | ide_drive_t *drive; | ||
11 | ide_driver_t *driver; | ||
12 | struct gendisk *disk; | ||
13 | struct kref kref; | ||
14 | unsigned int openers; /* protected by BKL for now */ | ||
15 | |||
16 | /* Last failed packet command */ | ||
17 | struct ide_atapi_pc *failed_pc; | ||
18 | /* used for blk_{fs,pc}_request() requests */ | ||
19 | struct ide_atapi_pc queued_pc; | ||
20 | |||
21 | /* Last error information */ | ||
22 | u8 sense_key, asc, ascq; | ||
23 | |||
24 | int progress_indication; | ||
25 | |||
26 | /* Device information */ | ||
27 | /* Current format */ | ||
28 | int blocks, block_size, bs_factor; | ||
29 | /* Last format capacity descriptor */ | ||
30 | u8 cap_desc[8]; | ||
31 | /* Copy of the flexible disk page */ | ||
32 | u8 flexible_disk_page[32]; | ||
33 | } idefloppy_floppy_t; | ||
34 | 5 | ||
6 | #ifdef CONFIG_IDE_GD_ATAPI | ||
35 | /* | 7 | /* |
36 | * Pages of the SELECT SENSE / MODE SENSE packet commands. | 8 | * Pages of the SELECT SENSE / MODE SENSE packet commands. |
37 | * See SFF-8070i spec. | 9 | * See SFF-8070i spec. |
@@ -46,17 +18,22 @@ typedef struct ide_floppy_obj { | |||
46 | #define IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS 0x4603 | 18 | #define IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS 0x4603 |
47 | 19 | ||
48 | /* ide-floppy.c */ | 20 | /* ide-floppy.c */ |
21 | extern const struct ide_disk_ops ide_atapi_disk_ops; | ||
49 | void ide_floppy_create_mode_sense_cmd(struct ide_atapi_pc *, u8); | 22 | void ide_floppy_create_mode_sense_cmd(struct ide_atapi_pc *, u8); |
50 | void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *); | 23 | void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *); |
51 | sector_t ide_floppy_capacity(ide_drive_t *); | ||
52 | 24 | ||
53 | /* ide-floppy_ioctl.c */ | 25 | /* ide-floppy_ioctl.c */ |
54 | int ide_floppy_ioctl(struct inode *, struct file *, unsigned, unsigned long); | 26 | int ide_floppy_ioctl(ide_drive_t *, struct inode *, struct file *, unsigned int, |
27 | unsigned long); | ||
55 | 28 | ||
56 | #ifdef CONFIG_IDE_PROC_FS | 29 | #ifdef CONFIG_IDE_PROC_FS |
57 | /* ide-floppy_proc.c */ | 30 | /* ide-floppy_proc.c */ |
58 | extern ide_proc_entry_t ide_floppy_proc[]; | 31 | extern ide_proc_entry_t ide_floppy_proc[]; |
59 | extern const struct ide_proc_devset ide_floppy_settings[]; | 32 | extern const struct ide_proc_devset ide_floppy_settings[]; |
60 | #endif | 33 | #endif |
34 | #else | ||
35 | #define ide_floppy_proc NULL | ||
36 | #define ide_floppy_settings NULL | ||
37 | #endif | ||
61 | 38 | ||
62 | #endif /*__IDE_FLOPPY_H */ | 39 | #endif /*__IDE_FLOPPY_H */ |