aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-io.c44
1 files changed, 18 insertions, 26 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index ef806ab88fb4..18557683ed5a 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -184,11 +184,28 @@ static void ide_tf_set_setmult_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
184 tf->command = ATA_CMD_SET_MULTI; 184 tf->command = ATA_CMD_SET_MULTI;
185} 185}
186 186
187static ide_startstop_t ide_disk_special(ide_drive_t *drive) 187/**
188 * do_special - issue some special commands
189 * @drive: drive the command is for
190 *
191 * do_special() is used to issue ATA_CMD_INIT_DEV_PARAMS,
192 * ATA_CMD_RESTORE and ATA_CMD_SET_MULTI commands to a drive.
193 */
194
195static ide_startstop_t do_special(ide_drive_t *drive)
188{ 196{
189 special_t *s = &drive->special; 197 special_t *s = &drive->special;
190 struct ide_cmd cmd; 198 struct ide_cmd cmd;
191 199
200#ifdef DEBUG
201 printk(KERN_DEBUG "%s: %s: 0x%02x\n", drive->name, __func__, s->all);
202#endif
203 if (drive->media != ide_disk) {
204 s->all = 0;
205 drive->mult_req = 0;
206 return ide_stopped;
207 }
208
192 memset(&cmd, 0, sizeof(cmd)); 209 memset(&cmd, 0, sizeof(cmd));
193 cmd.protocol = ATA_PROT_NODATA; 210 cmd.protocol = ATA_PROT_NODATA;
194 211
@@ -213,31 +230,6 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive)
213 return ide_started; 230 return ide_started;
214} 231}
215 232
216/**
217 * do_special - issue some special commands
218 * @drive: drive the command is for
219 *
220 * do_special() is used to issue ATA_CMD_INIT_DEV_PARAMS,
221 * ATA_CMD_RESTORE and ATA_CMD_SET_MULTI commands to a drive.
222 *
223 * It used to do much more, but has been scaled back.
224 */
225
226static ide_startstop_t do_special (ide_drive_t *drive)
227{
228 special_t *s = &drive->special;
229
230#ifdef DEBUG
231 printk("%s: do_special: 0x%02x\n", drive->name, s->all);
232#endif
233 if (drive->media == ide_disk)
234 return ide_disk_special(drive);
235
236 s->all = 0;
237 drive->mult_req = 0;
238 return ide_stopped;
239}
240
241void ide_map_sg(ide_drive_t *drive, struct ide_cmd *cmd) 233void ide_map_sg(ide_drive_t *drive, struct ide_cmd *cmd)
242{ 234{
243 ide_hwif_t *hwif = drive->hwif; 235 ide_hwif_t *hwif = drive->hwif;