diff options
-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) | |||
341 | 341 | ||
342 | switch (sense_key) { | 342 | switch (sense_key) { |
343 | case NOT_READY: | 343 | case NOT_READY: |
344 | if (blk_fs_request(rq) == 0 || rq_data_dir(rq) == READ) { | 344 | if (blk_fs_request(rq) && rq_data_dir(rq) == WRITE) { |
345 | if (ide_cd_breathe(drive, rq)) | ||
346 | return 1; | ||
347 | } else { | ||
345 | cdrom_saw_media_change(drive); | 348 | cdrom_saw_media_change(drive); |
346 | 349 | ||
347 | if (blk_fs_request(rq) && !quiet) | 350 | if (blk_fs_request(rq) && !quiet) |
348 | printk(KERN_ERR PFX "%s: tray open\n", | 351 | printk(KERN_ERR PFX "%s: tray open\n", |
349 | drive->name); | 352 | drive->name); |
350 | } else { | ||
351 | if (ide_cd_breathe(drive, rq)) | ||
352 | return 1; | ||
353 | } | 353 | } |
354 | do_end_request = 1; | 354 | do_end_request = 1; |
355 | break; | 355 | break; |