diff options
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r-- | drivers/ide/ide-atapi.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index f7fe1decb59d..2fb5d28a9be5 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -493,6 +493,7 @@ static void ide_init_packet_cmd(struct ide_cmd *cmd, u32 tf_flags, | |||
493 | cmd->protocol = dma ? ATAPI_PROT_DMA : ATAPI_PROT_PIO; | 493 | cmd->protocol = dma ? ATAPI_PROT_DMA : ATAPI_PROT_PIO; |
494 | cmd->tf_flags |= IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM | | 494 | cmd->tf_flags |= IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM | |
495 | IDE_TFLAG_OUT_FEATURE | tf_flags; | 495 | IDE_TFLAG_OUT_FEATURE | tf_flags; |
496 | cmd->tf.command = ATA_CMD_PACKET; | ||
496 | cmd->tf.feature = dma; /* Use PIO/DMA */ | 497 | cmd->tf.feature = dma; /* Use PIO/DMA */ |
497 | cmd->tf.lbam = bcount & 0xff; | 498 | cmd->tf.lbam = bcount & 0xff; |
498 | cmd->tf.lbah = (bcount >> 8) & 0xff; | 499 | cmd->tf.lbah = (bcount >> 8) & 0xff; |
@@ -638,6 +639,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd) | |||
638 | unsigned int timeout; | 639 | unsigned int timeout; |
639 | u32 tf_flags; | 640 | u32 tf_flags; |
640 | u16 bcount; | 641 | u16 bcount; |
642 | u8 drq_int = !!(drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT); | ||
641 | 643 | ||
642 | if (dev_is_idecd(drive)) { | 644 | if (dev_is_idecd(drive)) { |
643 | tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL; | 645 | tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL; |
@@ -687,17 +689,14 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd) | |||
687 | 689 | ||
688 | (void)do_rw_taskfile(drive, cmd); | 690 | (void)do_rw_taskfile(drive, cmd); |
689 | 691 | ||
690 | /* Issue the packet command */ | 692 | if (drq_int) { |
691 | if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { | ||
692 | if (drive->dma) | 693 | if (drive->dma) |
693 | drive->waiting_for_dma = 0; | 694 | drive->waiting_for_dma = 0; |
694 | hwif->expiry = expiry; | 695 | hwif->expiry = expiry; |
695 | ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc, | ||
696 | timeout); | ||
697 | return ide_started; | ||
698 | } else { | ||
699 | ide_execute_pkt_cmd(drive); | ||
700 | return ide_transfer_pc(drive); | ||
701 | } | 696 | } |
697 | |||
698 | ide_execute_command(drive, cmd, ide_transfer_pc, timeout); | ||
699 | |||
700 | return drq_int ? ide_started : ide_transfer_pc(drive); | ||
702 | } | 701 | } |
703 | EXPORT_SYMBOL_GPL(ide_issue_pc); | 702 | EXPORT_SYMBOL_GPL(ide_issue_pc); |