Lines Matching defs:drive
9 static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
11 ide_hwif_t *hwif = drive->hwif;
12 struct request_queue *q = drive->queue;
18 if (drive->dev_flags & IDE_DFLAG_PARKED) {
19 int reset_timer = time_before(timeout, drive->sleep);
22 drive->sleep = timeout;
45 * Make sure that *some* command is sent to the drive after the
61 ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq)
68 drive->sleep = *(unsigned long *)rq->special;
69 drive->dev_flags |= IDE_DFLAG_SLEEPING;
85 return do_rw_taskfile(drive, &cmd);
91 ide_drive_t *drive = to_ide_device(dev);
92 ide_hwif_t *hwif = drive->hwif;
96 if (drive->dev_flags & IDE_DFLAG_NO_UNLOAD)
101 if (drive->dev_flags & IDE_DFLAG_PARKED &&
102 time_after(drive->sleep, now))
103 msecs = jiffies_to_msecs(drive->sleep - now);
115 ide_drive_t *drive = to_ide_device(dev);
131 if (drive->dev_flags & IDE_DFLAG_NO_UNLOAD)
133 else if (input || drive->dev_flags & IDE_DFLAG_PARKED)
134 issue_park_cmd(drive, msecs_to_jiffies(input));
136 if (drive->media == ide_disk)
139 drive->dev_flags &= ~IDE_DFLAG_NO_UNLOAD;
142 drive->dev_flags |= IDE_DFLAG_NO_UNLOAD;