Lines Matching refs:drive
10 static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
12 ide_hwif_t *hwif = drive->hwif;
13 struct request_queue *q = drive->queue;
19 if (drive->dev_flags & IDE_DFLAG_PARKED) {
20 int reset_timer = time_before(timeout, drive->sleep);
23 drive->sleep = timeout;
47 * Make sure that *some* command is sent to the drive after the
58 ide_insert_request_head(drive, rq);
65 ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq)
72 drive->sleep = *(unsigned long *)ide_req(rq)->special;
73 drive->dev_flags |= IDE_DFLAG_SLEEPING;
89 return do_rw_taskfile(drive, &cmd);
95 ide_drive_t *drive = to_ide_device(dev);
96 ide_hwif_t *hwif = drive->hwif;
100 if (drive->dev_flags & IDE_DFLAG_NO_UNLOAD)
105 if (drive->dev_flags & IDE_DFLAG_PARKED &&
106 time_after(drive->sleep, now))
107 msecs = jiffies_to_msecs(drive->sleep - now);
119 ide_drive_t *drive = to_ide_device(dev);
135 if (drive->dev_flags & IDE_DFLAG_NO_UNLOAD)
137 else if (input || drive->dev_flags & IDE_DFLAG_PARKED)
138 issue_park_cmd(drive, msecs_to_jiffies(input));
140 if (drive->media == ide_disk)
143 drive->dev_flags &= ~IDE_DFLAG_NO_UNLOAD;
146 drive->dev_flags |= IDE_DFLAG_NO_UNLOAD;