Loading drivers/ide/ide-cd.c +24 −26 Original line number Original line Diff line number Diff line Loading @@ -332,7 +332,6 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) } else if (blk_pc_request(rq) || rq->cmd_type == REQ_TYPE_ATA_PC) { } else if (blk_pc_request(rq) || rq->cmd_type == REQ_TYPE_ATA_PC) { /* All other functions, except for READ. */ /* All other functions, except for READ. */ unsigned long flags; /* /* * if we have an error, pass back CHECK_CONDITION as the * if we have an error, pass back CHECK_CONDITION as the Loading Loading @@ -370,15 +369,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) * remove failed request completely and end it when the * remove failed request completely and end it when the * request sense has completed * request sense has completed */ */ if (stat & ERR_STAT) { goto end_request; spin_lock_irqsave(&ide_lock, flags); blkdev_dequeue_request(rq); HWGROUP(drive)->rq = NULL; spin_unlock_irqrestore(&ide_lock, flags); cdrom_queue_request_sense(drive, rq->sense, rq); } else cdrom_end_request(drive, 0); } else if (blk_fs_request(rq)) { } else if (blk_fs_request(rq)) { int do_end_request = 0; int do_end_request = 0; Loading Loading @@ -458,9 +449,27 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) sense data. We need this in order to perform end of media sense data. We need this in order to perform end of media processing */ processing */ if (do_end_request) { if (do_end_request) goto end_request; /* * If we got a CHECK_CONDITION status, * queue a request sense command. */ if (stat & ERR_STAT) cdrom_queue_request_sense(drive, NULL, NULL); } else { blk_dump_rq_flags(rq, "ide-cd: bad rq"); cdrom_end_request(drive, 0); } /* Retry, or handle the next request. */ return 1; end_request: if (stat & ERR_STAT) { if (stat & ERR_STAT) { unsigned long flags; unsigned long flags; spin_lock_irqsave(&ide_lock, flags); spin_lock_irqsave(&ide_lock, flags); blkdev_dequeue_request(rq); blkdev_dequeue_request(rq); HWGROUP(drive)->rq = NULL; HWGROUP(drive)->rq = NULL; Loading @@ -469,18 +478,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) cdrom_queue_request_sense(drive, rq->sense, rq); cdrom_queue_request_sense(drive, rq->sense, rq); } else } else cdrom_end_request(drive, 0); cdrom_end_request(drive, 0); } else { /* If we got a CHECK_CONDITION status, queue a request sense command. */ if (stat & ERR_STAT) cdrom_queue_request_sense(drive, NULL, NULL); } } else { blk_dump_rq_flags(rq, "ide-cd: bad rq"); cdrom_end_request(drive, 0); } /* Retry, or handle the next request. */ return 1; return 1; } } Loading Loading
drivers/ide/ide-cd.c +24 −26 Original line number Original line Diff line number Diff line Loading @@ -332,7 +332,6 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) } else if (blk_pc_request(rq) || rq->cmd_type == REQ_TYPE_ATA_PC) { } else if (blk_pc_request(rq) || rq->cmd_type == REQ_TYPE_ATA_PC) { /* All other functions, except for READ. */ /* All other functions, except for READ. */ unsigned long flags; /* /* * if we have an error, pass back CHECK_CONDITION as the * if we have an error, pass back CHECK_CONDITION as the Loading Loading @@ -370,15 +369,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) * remove failed request completely and end it when the * remove failed request completely and end it when the * request sense has completed * request sense has completed */ */ if (stat & ERR_STAT) { goto end_request; spin_lock_irqsave(&ide_lock, flags); blkdev_dequeue_request(rq); HWGROUP(drive)->rq = NULL; spin_unlock_irqrestore(&ide_lock, flags); cdrom_queue_request_sense(drive, rq->sense, rq); } else cdrom_end_request(drive, 0); } else if (blk_fs_request(rq)) { } else if (blk_fs_request(rq)) { int do_end_request = 0; int do_end_request = 0; Loading Loading @@ -458,9 +449,27 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) sense data. We need this in order to perform end of media sense data. We need this in order to perform end of media processing */ processing */ if (do_end_request) { if (do_end_request) goto end_request; /* * If we got a CHECK_CONDITION status, * queue a request sense command. */ if (stat & ERR_STAT) cdrom_queue_request_sense(drive, NULL, NULL); } else { blk_dump_rq_flags(rq, "ide-cd: bad rq"); cdrom_end_request(drive, 0); } /* Retry, or handle the next request. */ return 1; end_request: if (stat & ERR_STAT) { if (stat & ERR_STAT) { unsigned long flags; unsigned long flags; spin_lock_irqsave(&ide_lock, flags); spin_lock_irqsave(&ide_lock, flags); blkdev_dequeue_request(rq); blkdev_dequeue_request(rq); HWGROUP(drive)->rq = NULL; HWGROUP(drive)->rq = NULL; Loading @@ -469,18 +478,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) cdrom_queue_request_sense(drive, rq->sense, rq); cdrom_queue_request_sense(drive, rq->sense, rq); } else } else cdrom_end_request(drive, 0); cdrom_end_request(drive, 0); } else { /* If we got a CHECK_CONDITION status, queue a request sense command. */ if (stat & ERR_STAT) cdrom_queue_request_sense(drive, NULL, NULL); } } else { blk_dump_rq_flags(rq, "ide-cd: bad rq"); cdrom_end_request(drive, 0); } /* Retry, or handle the next request. */ return 1; return 1; } } Loading