Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82110
b: refs/heads/master
c: 8b67ebf
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent af92aff commit 63aed22
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: 8ee69f5a83660796ffa1d33e67d0064db44cfc23
refs/heads/master: 8b67ebf6dae0b0743bad1641e9691a1205adbf9e
23 changes: 11 additions & 12 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
{
struct request *rq = HWGROUP(drive)->rq;
xfer_func_t *xferfunc = NULL;
int stat, ireason, len, thislen, write;
int stat, ireason, len, thislen, write, update;
u8 lowcyl = 0, highcyl = 0;

/* Check for errors. */
Expand All @@ -1084,14 +1084,8 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
Complain if we still have data left to transfer. */
if ((stat & DRQ_STAT) == 0) {
ide_cd_request_sense_fixup(rq);

if (rq->data_len == 0)
cdrom_end_request(drive, 1);
else {
rq->cmd_flags |= REQ_FAILED;
cdrom_end_request(drive, 0);
}
return ide_stopped;
update = rq->data_len ? 0 : 1;
goto end_request;
}

/* Figure out how much data to transfer. */
Expand Down Expand Up @@ -1130,9 +1124,8 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
"appears confused (ireason = 0x%02x). "
"Trying to recover by ending request.\n",
drive->name, ireason);
rq->cmd_flags |= REQ_FAILED;
cdrom_end_request(drive, 0);
return ide_stopped;
update = 0;
goto end_request;
}
pad:
/*
Expand All @@ -1145,6 +1138,12 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
/* Now we wait for another interrupt. */
ide_set_handler(drive, &cdrom_pc_intr, ATAPI_WAIT_PC, cdrom_timer_expiry);
return ide_started;

end_request:
if (!update)
rq->cmd_flags |= REQ_FAILED;
cdrom_end_request(drive, update);
return ide_stopped;
}

static ide_startstop_t cdrom_do_pc_continuation (ide_drive_t *drive)
Expand Down

0 comments on commit 63aed22

Please sign in to comment.