Lines Matching refs:drive

9 static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)  in issue_park_cmd()  argument
11 ide_hwif_t *hwif = drive->hwif; in issue_park_cmd()
12 struct request_queue *q = drive->queue; in issue_park_cmd()
18 if (drive->dev_flags & IDE_DFLAG_PARKED) { in issue_park_cmd()
19 int reset_timer = time_before(timeout, drive->sleep); in issue_park_cmd()
22 drive->sleep = timeout; in issue_park_cmd()
61 ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq) in ide_do_park_unpark() argument
68 drive->sleep = *(unsigned long *)rq->special; in ide_do_park_unpark()
69 drive->dev_flags |= IDE_DFLAG_SLEEPING; in ide_do_park_unpark()
85 return do_rw_taskfile(drive, &cmd); in ide_do_park_unpark()
91 ide_drive_t *drive = to_ide_device(dev); in ide_park_show() local
92 ide_hwif_t *hwif = drive->hwif; in ide_park_show()
96 if (drive->dev_flags & IDE_DFLAG_NO_UNLOAD) in ide_park_show()
101 if (drive->dev_flags & IDE_DFLAG_PARKED && in ide_park_show()
102 time_after(drive->sleep, now)) in ide_park_show()
103 msecs = jiffies_to_msecs(drive->sleep - now); in ide_park_show()
115 ide_drive_t *drive = to_ide_device(dev); in ide_park_store() local
129 if (drive->dev_flags & IDE_DFLAG_NO_UNLOAD) in ide_park_store()
131 else if (input || drive->dev_flags & IDE_DFLAG_PARKED) in ide_park_store()
132 issue_park_cmd(drive, msecs_to_jiffies(input)); in ide_park_store()
134 if (drive->media == ide_disk) in ide_park_store()
137 drive->dev_flags &= ~IDE_DFLAG_NO_UNLOAD; in ide_park_store()
140 drive->dev_flags |= IDE_DFLAG_NO_UNLOAD; in ide_park_store()