Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125151
b: refs/heads/master
c: ed48554
h: refs/heads/master
i:
  125149: 4573604
  125147: 7effb4e
  125143: df1adab
  125135: 871db53
  125119: 437cb9f
v: v3
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Jan 2, 2009
1 parent 66f04a3 commit 00be6a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 991cb26a6ad287c3bc6555c41e830590a23910c4
refs/heads/master: ed48554fad7091b9613b967462f082bf1a9cb035
23 changes: 11 additions & 12 deletions trunk/drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,18 +551,24 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
struct ide_atapi_pc *pc = drive->pc;
ide_hwif_t *hwif = drive->hwif;
u32 tf_flags;
u16 bcount;
u16 bcount = 0;
u8 scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI);

/* We haven't transferred any data yet */
pc->xferred = 0;
pc->cur_pos = pc->buf;

/* Request to transfer the entire buffer at once */
if (drive->media == ide_tape && scsi == 0)
bcount = pc->req_xfer;
else
if (dev_is_idecd(drive)) {
tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
} else if (scsi) {
tf_flags = 0;
bcount = min(pc->req_xfer, 63 * 1024);
} else {
tf_flags = IDE_TFLAG_OUT_DEVICE;
bcount = ((drive->media == ide_tape) ?
pc->req_xfer :
min(pc->req_xfer, 63 * 1024));
}

if (pc->flags & PC_FLAG_DMA_ERROR) {
pc->flags &= ~PC_FLAG_DMA_ERROR;
Expand All @@ -581,13 +587,6 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
if (!drive->dma)
pc->flags &= ~PC_FLAG_DMA_OK;

if (scsi)
tf_flags = 0;
else if (dev_is_idecd(drive))
tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
else
tf_flags = IDE_TFLAG_OUT_DEVICE;

ide_pktcmd_tf_load(drive, tf_flags, bcount, drive->dma);

/* Issue the packet command */
Expand Down

0 comments on commit 00be6a8

Please sign in to comment.