diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-01 17:09:22 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-01 17:09:22 -0500 |
commit | 2bc4cf2d826cb497063f6a84ab444cff13537e5f (patch) | |
tree | 116b546ed0144349ba462ad80456e8887539ce07 /drivers/ide/ide-cd.h | |
parent | 455d80a9553915251b6392e31c39aeb8f8a94d68 (diff) |
ide-cd: remove struct ide_cd_{config,state}_flags
* Remove unused ->{writing,reserved} fields from struct ide_cd_config_flags.
* Move ->max_speed from struct ide_cd_config_flags to struct cdrom_info.
* Move ->current_speed from struct ide_cd_state_flags to struct cdrom_info.
* Add defines for config and state flags.
* Add 'unsigned int cd_flags' to struct cdrom_info and use ->cd_flags
instead of ->{config,state}_flags.
* Remove no longer needed struct ide_cd_{config,state}_flags.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.h')
-rw-r--r-- | drivers/ide/ide-cd.h | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h index 9d88b1a7ffe5..c19aa23255d1 100644 --- a/drivers/ide/ide-cd.h +++ b/drivers/ide/ide-cd.h | |||
@@ -54,34 +54,34 @@ | |||
54 | #define ATAPI_CAPABILITIES_PAGE_SIZE (8 + 20) | 54 | #define ATAPI_CAPABILITIES_PAGE_SIZE (8 + 20) |
55 | #define ATAPI_CAPABILITIES_PAGE_PAD_SIZE 4 | 55 | #define ATAPI_CAPABILITIES_PAGE_PAD_SIZE 4 |
56 | 56 | ||
57 | /* Configuration flags. These describe the capabilities of the drive. | 57 | enum { |
58 | They generally do not change after initialization, unless we learn | 58 | /* Device sends an interrupt when ready for a packet command. */ |
59 | more about the drive from stuff failing. */ | 59 | IDE_CD_FLAG_DRQ_INTERRUPT = (1 << 0), |
60 | struct ide_cd_config_flags { | 60 | /* Drive cannot lock the door. */ |
61 | __u8 drq_interrupt : 1; /* Device sends an interrupt when ready | 61 | IDE_CD_FLAG_NO_DOORLOCK = (1 << 1), |
62 | for a packet command. */ | 62 | /* Drive cannot eject the disc. */ |
63 | __u8 no_doorlock : 1; /* Drive cannot lock the door. */ | 63 | IDE_CD_FLAG_NO_EJECT = (1 << 2), |
64 | __u8 no_eject : 1; /* Drive cannot eject the disc. */ | 64 | /* Drive is a pre-1.2 NEC 260 drive. */ |
65 | __u8 nec260 : 1; /* Drive is a pre-1.2 NEC 260 drive. */ | 65 | IDE_CD_FLAG_NEC260 = (1 << 3), |
66 | __u8 tocaddr_as_bcd : 1; /* TOC addresses are in BCD. */ | 66 | /* TOC addresses are in BCD. */ |
67 | __u8 toctracks_as_bcd : 1; /* TOC track numbers are in BCD. */ | 67 | IDE_CD_FLAG_TOCADDR_AS_BCD = (1 << 4), |
68 | __u8 limit_nframes : 1; /* Drive does not provide data in | 68 | /* TOC track numbers are in BCD. */ |
69 | multiples of SECTOR_SIZE when more | 69 | IDE_CD_FLAG_TOCTRACKS_AS_BCD = (1 << 5), |
70 | than one interrupt is needed. */ | 70 | /* |
71 | __u8 seeking : 1; /* Seeking in progress */ | 71 | * Drive does not provide data in multiples of SECTOR_SIZE |
72 | __u8 no_speed_select : 1; /* SET_CD_SPEED command is unsupported. */ | 72 | * when more than one interrupt is needed. |
73 | byte max_speed; /* Max speed of the drive */ | 73 | */ |
74 | }; | 74 | IDE_CD_FLAG_LIMIT_NFRAMES = (1 << 6), |
75 | 75 | /* Seeking in progress. */ | |
76 | /* State flags. These give information about the current state of the | 76 | IDE_CD_FLAG_SEEKING = (1 << 7), |
77 | drive, and will change during normal operation. */ | 77 | /* Driver has noticed a media change. */ |
78 | struct ide_cd_state_flags { | 78 | IDE_CD_FLAG_MEDIA_CHANGED = (1 << 8), |
79 | __u8 media_changed : 1; /* Driver has noticed a media change. */ | 79 | /* Saved TOC information is current. */ |
80 | __u8 toc_valid : 1; /* Saved TOC information is current. */ | 80 | IDE_CD_FLAG_TOC_VALID = (1 << 9), |
81 | __u8 door_locked : 1; /* We think that the drive door is locked. */ | 81 | /* We think that the drive door is locked. */ |
82 | __u8 writing : 1; /* the drive is currently writing */ | 82 | IDE_CD_FLAG_DOOR_LOCKED = (1 << 10), |
83 | __u8 reserved : 4; | 83 | /* SET_CD_SPEED command is unsupported. */ |
84 | byte current_speed; /* Current speed of the drive */ | 84 | IDE_CD_FLAG_NO_SPEED_SELECT = (1 << 11), |
85 | }; | 85 | }; |
86 | 86 | ||
87 | /* Structure of a MSF cdrom address. */ | 87 | /* Structure of a MSF cdrom address. */ |
@@ -153,8 +153,10 @@ struct cdrom_info { | |||
153 | unsigned long last_block; | 153 | unsigned long last_block; |
154 | unsigned long start_seek; | 154 | unsigned long start_seek; |
155 | 155 | ||
156 | struct ide_cd_config_flags config_flags; | 156 | unsigned int cd_flags; |
157 | struct ide_cd_state_flags state_flags; | 157 | |
158 | u8 max_speed; /* Max speed of the drive. */ | ||
159 | u8 current_speed; /* Current speed of the drive. */ | ||
158 | 160 | ||
159 | /* Per-device info needed by cdrom.c generic driver. */ | 161 | /* Per-device info needed by cdrom.c generic driver. */ |
160 | struct cdrom_device_info devinfo; | 162 | struct cdrom_device_info devinfo; |