diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:38 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:38 -0400 |
commit | 0127854d7c96612a454bed6de242e28f8021fa7f (patch) | |
tree | 32aef08c4908b511c732d32f50a688ef14a4d0a2 /drivers/ide/ide-floppy.h | |
parent | 49cac39e71bd6bbcf934c6ba837e21503902c088 (diff) |
ide-floppy: move floppy ioctls handling to ide-floppy_ioctl.c
While at it:
- idefloppy_create_read_capacity_cmd() -> ide_floppy_create_read_capacity_cmd()
- idefloppy_create_mode_sense_cmd() -> ide_floppy_create_mode_sense_cmd()
- idefloppy_create_request_sense_cmd() -> ide_floppy_create_request_sense_cmd()
- idefloppy_create_format_unit_cmd() -> ide_floppy_create_format_unit_cmd()
- idefloppy_get_sfrp_bit() -> ide_floppy_get_sfrp_bit()
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.h')
-rw-r--r-- | drivers/ide/ide-floppy.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/drivers/ide/ide-floppy.h b/drivers/ide/ide-floppy.h new file mode 100644 index 000000000000..ecadc2bc322d --- /dev/null +++ b/drivers/ide/ide-floppy.h | |||
@@ -0,0 +1,63 @@ | |||
1 | #ifndef __IDE_FLOPPY_H | ||
2 | #define __IDE_FLOPPY_H | ||
3 | |||
4 | /* | ||
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 | /* Current packet command */ | ||
17 | struct ide_atapi_pc *pc; | ||
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 | |||
23 | struct ide_atapi_pc request_sense_pc; | ||
24 | struct request request_sense_rq; | ||
25 | |||
26 | /* Last error information */ | ||
27 | u8 sense_key, asc, ascq; | ||
28 | /* delay this long before sending packet command */ | ||
29 | u8 ticks; | ||
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 | } idefloppy_floppy_t; | ||
40 | |||
41 | /* | ||
42 | * Pages of the SELECT SENSE / MODE SENSE packet commands. | ||
43 | * See SFF-8070i spec. | ||
44 | */ | ||
45 | #define IDEFLOPPY_CAPABILITIES_PAGE 0x1b | ||
46 | #define IDEFLOPPY_FLEXIBLE_DISK_PAGE 0x05 | ||
47 | |||
48 | /* IOCTLs used in low-level formatting. */ | ||
49 | #define IDEFLOPPY_IOCTL_FORMAT_SUPPORTED 0x4600 | ||
50 | #define IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY 0x4601 | ||
51 | #define IDEFLOPPY_IOCTL_FORMAT_START 0x4602 | ||
52 | #define IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS 0x4603 | ||
53 | |||
54 | /* ide-floppy.c */ | ||
55 | void ide_floppy_create_mode_sense_cmd(struct ide_atapi_pc *, u8); | ||
56 | void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *); | ||
57 | void ide_floppy_create_request_sense_cmd(struct ide_atapi_pc *); | ||
58 | |||
59 | /* ide-floppy_ioctl.c */ | ||
60 | int ide_floppy_format_ioctl(ide_drive_t *, struct file *, unsigned int, | ||
61 | void __user *); | ||
62 | |||
63 | #endif /*__IDE_FLOPPY_H */ | ||