aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:03 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:03 -0400
commit984c5e5974227d2d4dba58cdf19af641f89be83f (patch)
tree97fa069a18140416afc1f518bf793ae7e80ca902 /drivers/ide/ide-cd.c
parente0458ccb0668edbecbc1ae1c17ed58a6b1a4ff3e (diff)
ide-cd: move setting REQ_FAILED flag out from 'end_request' exit path
Move setting REQ_FAILED flag out from 'end_request' exit path in cdrom_newpc_intr() and also rename 'end_request' to 'out_end'. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 3e3058cff843..b66da3f1678e 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -776,7 +776,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
776 ide_complete_rq(drive, 0, 512); 776 ide_complete_rq(drive, 0, 512);
777 return ide_stopped; 777 return ide_stopped;
778 } 778 }
779 goto end_request; 779 if (blk_pc_request(rq) == 0 && uptodate == 0)
780 rq->cmd_flags |= REQ_FAILED;
781 goto out_end;
780 } 782 }
781 783
782 ide_read_bcount_and_ireason(drive, &len, &ireason); 784 ide_read_bcount_and_ireason(drive, &len, &ireason);
@@ -811,8 +813,10 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
811 ide_cd_request_sense_fixup(drive, rq); 813 ide_cd_request_sense_fixup(drive, rq);
812 /* complain if we still have data left to transfer */ 814 /* complain if we still have data left to transfer */
813 uptodate = rq->data_len ? 0 : 1; 815 uptodate = rq->data_len ? 0 : 1;
816 if (uptodate == 0)
817 rq->cmd_flags |= REQ_FAILED;
814 } 818 }
815 goto end_request; 819 goto out_end;
816 } 820 }
817 821
818 /* check which way to transfer data */ 822 /* check which way to transfer data */
@@ -939,7 +943,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
939 ide_set_handler(drive, cdrom_newpc_intr, timeout); 943 ide_set_handler(drive, cdrom_newpc_intr, timeout);
940 return ide_started; 944 return ide_started;
941 945
942end_request: 946out_end:
943 if (blk_pc_request(rq)) { 947 if (blk_pc_request(rq)) {
944 unsigned int dlen = rq->data_len; 948 unsigned int dlen = rq->data_len;
945 949
@@ -951,8 +955,6 @@ end_request:
951 955
952 hwif->rq = NULL; 956 hwif->rq = NULL;
953 } else { 957 } else {
954 if (!uptodate)
955 rq->cmd_flags |= REQ_FAILED;
956 cdrom_end_request(drive, uptodate); 958 cdrom_end_request(drive, uptodate);
957 } 959 }
958 return ide_stopped; 960 return ide_stopped;