提交 3c8a48e9 编写于 作者: B Borislav Petkov 提交者: Bartlomiej Zolnierkiewicz

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: NBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 3153c26b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册