diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2009-04-08 14:13:03 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-08 14:13:03 +0200 |
commit | 3c8a48e9a94be1e063f2f8d7d5f6f691423a3e71 (patch) | |
tree | 0b0b2b03f0927657258c643adebac564d754515b /drivers/ide | |
parent | 3153c26b54230d025c6d536e8d3015def4524906 (diff) | |
download | linux-3c8a48e9a94be1e063f2f8d7d5f6f691423a3e71.tar.gz linux-3c8a48e9a94be1e063f2f8d7d5f6f691423a3e71.tar.bz2 linux-3c8a48e9a94be1e063f2f8d7d5f6f691423a3e71.zip |
ide-cd: reverse NOT_READY sense key logic
Make the case of flushing the drive's cache explicit.
There should be no functional change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-cd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 3ce1eafef5e4..3aec19d1fdfc 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -341,15 +341,15 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat) switch (sense_key) { case NOT_READY: - if (blk_fs_request(rq) == 0 || rq_data_dir(rq) == READ) { + if (blk_fs_request(rq) && rq_data_dir(rq) == WRITE) { + if (ide_cd_breathe(drive, rq)) + return 1; + } else { cdrom_saw_media_change(drive); if (blk_fs_request(rq) && !quiet) printk(KERN_ERR PFX "%s: tray open\n", drive->name); - } else { - if (ide_cd_breathe(drive, rq)) - return 1; } do_end_request = 1; break; |