Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139410
b: refs/heads/master
c: 984c5e5
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 31, 2009
1 parent 88e56fa commit 1b212f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: e0458ccb0668edbecbc1ae1c17ed58a6b1a4ff3e
refs/heads/master: 984c5e5974227d2d4dba58cdf19af641f89be83f
12 changes: 7 additions & 5 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
ide_complete_rq(drive, 0, 512);
return ide_stopped;
}
goto end_request;
if (blk_pc_request(rq) == 0 && uptodate == 0)
rq->cmd_flags |= REQ_FAILED;
goto out_end;
}

ide_read_bcount_and_ireason(drive, &len, &ireason);
Expand Down Expand Up @@ -811,8 +813,10 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
ide_cd_request_sense_fixup(drive, rq);
/* complain if we still have data left to transfer */
uptodate = rq->data_len ? 0 : 1;
if (uptodate == 0)
rq->cmd_flags |= REQ_FAILED;
}
goto end_request;
goto out_end;
}

/* check which way to transfer data */
Expand Down Expand Up @@ -939,7 +943,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
ide_set_handler(drive, cdrom_newpc_intr, timeout);
return ide_started;

end_request:
out_end:
if (blk_pc_request(rq)) {
unsigned int dlen = rq->data_len;

Expand All @@ -951,8 +955,6 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)

hwif->rq = NULL;
} else {
if (!uptodate)
rq->cmd_flags |= REQ_FAILED;
cdrom_end_request(drive, uptodate);
}
return ide_stopped;
Expand Down

0 comments on commit 1b212f8

Please sign in to comment.