ide: ide_id_has_flush_cache() -> ata_id_flush_enabled()
* Add ata_id_flush_enabled() inline helper to <linux/ata.h>. * ide_id_has_flush_cache() -> ata_id_flush_enabled() The latter one also checks if the command is marked as supported in word 83 and validity of words 83 & 86. Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
@ -184,7 +184,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
|
||||
if (drive->media != ide_disk)
|
||||
break;
|
||||
/* Not supported? Switch to next step now. */
|
||||
if (!drive->wcache || !ide_id_has_flush_cache(drive->id)) {
|
||||
if (!drive->wcache || ata_id_flush_enabled(drive->id) == 0) {
|
||||
ide_complete_power_step(drive, rq, 0, 0);
|
||||
return ide_stopped;
|
||||
}
|
||||
|
Reference in New Issue
Block a user