diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index f04b53cb023f..d868ca44d033 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -584,11 +584,13 @@ out: int set_pio_mode(ide_drive_t *drive, int arg) { struct request rq; + ide_hwif_t *hwif = drive->hwif; if (arg < 0 || arg > 255) return -EINVAL; - if (drive->hwif->set_pio_mode == NULL) + if (hwif->set_pio_mode == NULL || + (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)) return -ENOSYS; if (drive->special.b.set_tune) |