提交 8a089c66 编写于 作者: B Bartlomiej Zolnierkiewicz

ide-disk: use ata_id_wcache_enabled()

Replace open-coded check by ata_id_wcache_enabled()
(which also checks validity of word 85).
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 dd8f46f6
......@@ -889,7 +889,7 @@ static void idedisk_setup(ide_drive_t *drive)
drive->bios_cyl, drive->bios_head, drive->bios_sect);
/* write cache enabled? */
if ((id[ATA_ID_CSFO] & 1) || (id[ATA_ID_CFS_ENABLE_1] & (1 << 5)))
if ((id[ATA_ID_CSFO] & 1) || ata_id_wcache_enabled(id))
drive->wcache = 1;
write_cache(drive, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册