aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-atapi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index d55784173a79..2e305714c209 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -544,6 +544,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
544{ 544{
545 struct ide_atapi_pc *pc = drive->pc; 545 struct ide_atapi_pc *pc = drive->pc;
546 ide_hwif_t *hwif = drive->hwif; 546 ide_hwif_t *hwif = drive->hwif;
547 u32 tf_flags;
547 u16 bcount; 548 u16 bcount;
548 u8 scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI); 549 u8 scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI);
549 550
@@ -574,8 +575,14 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
574 if (!drive->dma) 575 if (!drive->dma)
575 pc->flags &= ~PC_FLAG_DMA_OK; 576 pc->flags &= ~PC_FLAG_DMA_OK;
576 577
577 ide_pktcmd_tf_load(drive, scsi ? 0 : IDE_TFLAG_OUT_DEVICE, bcount, 578 if (scsi)
578 drive->dma); 579 tf_flags = 0;
580 else if (drive->media == ide_cdrom || drive->media == ide_optical)
581 tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
582 else
583 tf_flags = IDE_TFLAG_OUT_DEVICE;
584
585 ide_pktcmd_tf_load(drive, tf_flags, bcount, drive->dma);
579 586
580 /* Issue the packet command */ 587 /* Issue the packet command */
581 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { 588 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {