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>
This commit is contained in:
@@ -555,14 +555,7 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
|
||||
ATAPI_WAIT_PC, cdrom_timer_expiry);
|
||||
return ide_started;
|
||||
} else {
|
||||
unsigned long flags;
|
||||
|
||||
/* packet command */
|
||||
spin_lock_irqsave(&ide_lock, flags);
|
||||
hwif->OUTBSYNC(drive, WIN_PACKETCMD,
|
||||
hwif->io_ports.command_addr);
|
||||
ndelay(400);
|
||||
spin_unlock_irqrestore(&ide_lock, flags);
|
||||
ide_execute_pkt_cmd(drive);
|
||||
|
||||
return (*handler) (drive);
|
||||
}
|
||||
|
Reference in New Issue
Block a user