aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:39 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:39 -0400
commit0c8a6c7aead1d3be85ce53e3aaacd52e38ede03e (patch)
tree2d43e9303f10c0f06b45bc97e661f0156aaf57da /drivers/ide/ide-atapi.c
parent0578042db3191e1ac76b53d213f2a691c3e1eaed (diff)
ide: add ide_do_start_stop() helper
* Add ide_do_start_stop() helper and convert ide-{floppy,tape}.c to use it. * Remove no longer used idefloppy_create_start_stop_cmd() and idetape_create_load_unload_cmd(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index c647a40c0d33..58411591edf3 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -162,6 +162,21 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
162} 162}
163EXPORT_SYMBOL_GPL(ide_queue_pc_tail); 163EXPORT_SYMBOL_GPL(ide_queue_pc_tail);
164 164
165int ide_do_start_stop(ide_drive_t *drive, struct gendisk *disk, int start)
166{
167 struct ide_atapi_pc pc;
168
169 ide_init_pc(&pc);
170 pc.c[0] = START_STOP;
171 pc.c[4] = start;
172
173 if (drive->media == ide_tape)
174 pc.flags |= PC_FLAG_WAIT_FOR_DSC;
175
176 return ide_queue_pc_tail(drive, disk, &pc);
177}
178EXPORT_SYMBOL_GPL(ide_do_start_stop);
179
165int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on) 180int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on)
166{ 181{
167 struct ide_atapi_pc pc; 182 struct ide_atapi_pc pc;