diff options
-rw-r--r-- | drivers/ide/ide-atapi.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index afe5a4323879..fbcb8513a4c8 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -258,7 +258,7 @@ void ide_retry_pc(ide_drive_t *drive) | |||
258 | pc->req_xfer = sense_rq->data_len; | 258 | pc->req_xfer = sense_rq->data_len; |
259 | 259 | ||
260 | if (drive->media == ide_tape) | 260 | if (drive->media == ide_tape) |
261 | set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags); | 261 | drive->atapi_flags |= IDE_AFLAG_IGNORE_DSC; |
262 | 262 | ||
263 | if (ide_queue_sense_rq(drive, pc)) | 263 | if (ide_queue_sense_rq(drive, pc)) |
264 | ide_complete_rq(drive, -EIO, blk_rq_bytes(drive->hwif->rq)); | 264 | ide_complete_rq(drive, -EIO, blk_rq_bytes(drive->hwif->rq)); |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 203bbeac182f..f1d3c7b2a2b5 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -656,15 +656,15 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, | |||
656 | 656 | ||
657 | if ((drive->dev_flags & IDE_DFLAG_DSC_OVERLAP) == 0 && | 657 | if ((drive->dev_flags & IDE_DFLAG_DSC_OVERLAP) == 0 && |
658 | (rq->cmd[13] & REQ_IDETAPE_PC2) == 0) | 658 | (rq->cmd[13] & REQ_IDETAPE_PC2) == 0) |
659 | set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags); | 659 | drive->atapi_flags |= IDE_AFLAG_IGNORE_DSC; |
660 | 660 | ||
661 | if (drive->dev_flags & IDE_DFLAG_POST_RESET) { | 661 | if (drive->dev_flags & IDE_DFLAG_POST_RESET) { |
662 | set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags); | 662 | drive->atapi_flags |= IDE_AFLAG_IGNORE_DSC; |
663 | drive->dev_flags &= ~IDE_DFLAG_POST_RESET; | 663 | drive->dev_flags &= ~IDE_DFLAG_POST_RESET; |
664 | } | 664 | } |
665 | 665 | ||
666 | if (!test_and_clear_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags) && | 666 | if (!(drive->atapi_flags & IDE_AFLAG_IGNORE_DSC) && |
667 | (stat & ATA_DSC) == 0) { | 667 | !(stat & ATA_DSC)) { |
668 | if (postponed_rq == NULL) { | 668 | if (postponed_rq == NULL) { |
669 | tape->dsc_polling_start = jiffies; | 669 | tape->dsc_polling_start = jiffies; |
670 | tape->dsc_poll_freq = tape->best_dsc_rw_freq; | 670 | tape->dsc_poll_freq = tape->best_dsc_rw_freq; |
@@ -684,7 +684,9 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, | |||
684 | tape->dsc_poll_freq = IDETAPE_DSC_MA_SLOW; | 684 | tape->dsc_poll_freq = IDETAPE_DSC_MA_SLOW; |
685 | idetape_postpone_request(drive); | 685 | idetape_postpone_request(drive); |
686 | return ide_stopped; | 686 | return ide_stopped; |
687 | } | 687 | } else |
688 | drive->atapi_flags &= ~IDE_AFLAG_IGNORE_DSC; | ||
689 | |||
688 | if (rq->cmd[13] & REQ_IDETAPE_READ) { | 690 | if (rq->cmd[13] & REQ_IDETAPE_READ) { |
689 | pc = &tape->queued_pc; | 691 | pc = &tape->queued_pc; |
690 | ide_tape_create_rw_cmd(tape, pc, rq, READ_6); | 692 | ide_tape_create_rw_cmd(tape, pc, rq, READ_6); |