aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2008-10-13 15:39:50 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:50 -0400
commitf9476b96b5c19a843d6256b8d228ebf1edabb1b6 (patch)
tree6b460514cda34875b62ef2a876f64a418258c75a /drivers
parent12469ac0c1eed579f1b4a87e472471f14eaa5da3 (diff)
ide-atapi: assign taskfile flags per device type
There should be no functional change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-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) {