aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-28 17:44:39 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-28 17:44:39 -0400
commit1fc142589e58b20a67582974b8848595a2c7432e (patch)
tree79b2006e761c70876d66a735fb30036cefb3f3e9 /drivers/ide/ide-cd.c
parent3910dde6410e742f8bd3f516ee9b1a7114abbad0 (diff)
ide: add ide_execute_pkt_cmd() helper
Add ide_execute_pkt_cmd() helper for executing PACKET command, then convert ATAPI device drivers to use it. As a nice side-effect this fixes ide-{floppy,tape,scsi} w.r.t. ide_lock taking (ide-cd was OK). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 095e50a93869..0881ddc5831e 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -555,14 +555,7 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
555 ATAPI_WAIT_PC, cdrom_timer_expiry); 555 ATAPI_WAIT_PC, cdrom_timer_expiry);
556 return ide_started; 556 return ide_started;
557 } else { 557 } else {
558 unsigned long flags; 558 ide_execute_pkt_cmd(drive);
559
560 /* packet command */
561 spin_lock_irqsave(&ide_lock, flags);
562 hwif->OUTBSYNC(drive, WIN_PACKETCMD,
563 hwif->io_ports.command_addr);
564 ndelay(400);
565 spin_unlock_irqrestore(&ide_lock, flags);
566 559
567 return (*handler) (drive); 560 return (*handler) (drive);
568 } 561 }