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