aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-iops.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-iops.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-iops.c')
-rw-r--r--drivers/ide/ide-iops.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 7f2b4edc6369..dfe47d5eb157 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -801,9 +801,19 @@ void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler,
801 ndelay(400); 801 ndelay(400);
802 spin_unlock_irqrestore(&ide_lock, flags); 802 spin_unlock_irqrestore(&ide_lock, flags);
803} 803}
804
805EXPORT_SYMBOL(ide_execute_command); 804EXPORT_SYMBOL(ide_execute_command);
806 805
806void ide_execute_pkt_cmd(ide_drive_t *drive)
807{
808 ide_hwif_t *hwif = drive->hwif;
809 unsigned long flags;
810
811 spin_lock_irqsave(&ide_lock, flags);
812 hwif->OUTBSYNC(drive, WIN_PACKETCMD, hwif->io_ports.command_addr);
813 ndelay(400);
814 spin_unlock_irqrestore(&ide_lock, flags);
815}
816EXPORT_SYMBOL_GPL(ide_execute_pkt_cmd);
807 817
808/* needed below */ 818/* needed below */
809static ide_startstop_t do_reset1 (ide_drive_t *, int); 819static ide_startstop_t do_reset1 (ide_drive_t *, int);