• Home
  • Raw
  • Download

Lines Matching full:drive

12  * Drive/Driver settings can be retrieved by reading the drive's
81 ide_drive_t *drive = (ide_drive_t *)m->private; in ide_identify_proc_show() local
84 if (!drive) { in ide_identify_proc_show()
92 if (taskfile_lib_get_identify(drive, buf) == 0) { in ide_identify_proc_show()
130 * @drive: drive to read from
131 * @setting: drive setting
133 * Read a drive setting and return the value. The caller
141 static int ide_read_setting(ide_drive_t *drive, in ide_read_setting() argument
148 val = ds->get(drive); in ide_read_setting()
155 * @drive: drive to read from
156 * @setting: drive setting
159 * Write a drive setting if it is possible. The caller
171 static int ide_write_setting(ide_drive_t *drive, in ide_write_setting() argument
183 return ide_devset_execute(drive, ds, val); in ide_write_setting()
188 static int set_xfer_rate (ide_drive_t *drive, int arg) in set_xfer_rate() argument
203 return ide_no_data_taskfile(drive, &cmd); in set_xfer_rate()
234 ide_drive_t *drive = (ide_drive_t *) m->private; in ide_settings_proc_show() local
241 d = drive->settings; in ide_settings_proc_show()
255 mul_factor = setting->mulf ? setting->mulf(drive) : 1; in ide_settings_proc_show()
256 div_factor = setting->divf ? setting->divf(drive) : 1; in ide_settings_proc_show()
258 rc = ide_read_setting(drive, setting); in ide_settings_proc_show()
285 ide_drive_t *drive = PDE_DATA(file_inode(file)); in ide_settings_proc_write() local
361 if (drive->settings) in ide_settings_proc_write()
362 setting = ide_find_setting(drive->settings, name); in ide_settings_proc_write()
369 mul_factor = setting->mulf ? setting->mulf(drive) : 1; in ide_settings_proc_write()
370 div_factor = setting->divf ? setting->divf(drive) : 1; in ide_settings_proc_write()
371 ide_write_setting(drive, setting, val * div_factor / mul_factor); in ide_settings_proc_write()
401 ide_drive_t *drive = (ide_drive_t *) m->private; in ide_geometry_proc_show() local
404 drive->cyl, drive->head, drive->sect); in ide_geometry_proc_show()
406 drive->bios_cyl, drive->bios_head, drive->bios_sect); in ide_geometry_proc_show()
413 ide_drive_t *drive = (ide_drive_t *) seq->private; in ide_dmodel_proc_show() local
414 char *m = (char *)&drive->id[ATA_ID_PROD]; in ide_dmodel_proc_show()
422 ide_drive_t *drive = (ide_drive_t *)m->private; in ide_driver_proc_show() local
423 struct device *dev = &drive->gendev; in ide_driver_proc_show()
437 ide_drive_t *drive = (ide_drive_t *) m->private; in ide_media_proc_show() local
440 switch (drive->media) { in ide_media_proc_show()
496 void ide_proc_register_driver(ide_drive_t *drive, struct ide_driver *driver) in ide_proc_register_driver() argument
499 drive->settings = driver->proc_devsets(drive); in ide_proc_register_driver()
502 ide_add_proc_entries(drive->proc, driver->proc_entries(drive), drive); in ide_proc_register_driver()
509 * @drive: drive
513 * for a given drive.
518 void ide_proc_unregister_driver(ide_drive_t *drive, struct ide_driver *driver) in ide_proc_unregister_driver() argument
520 ide_remove_proc_entries(drive->proc, driver->proc_entries(drive)); in ide_proc_unregister_driver()
527 drive->settings = NULL; in ide_proc_unregister_driver()
536 ide_drive_t *drive; in ide_proc_port_register_devices() local
540 ide_port_for_each_dev(i, drive, hwif) { in ide_proc_port_register_devices()
541 if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) in ide_proc_port_register_devices()
544 drive->proc = proc_mkdir(drive->name, parent); in ide_proc_port_register_devices()
545 if (drive->proc) { in ide_proc_port_register_devices()
546 ide_add_proc_entries(drive->proc, generic_drive_entries, drive); in ide_proc_port_register_devices()
548 drive->proc, &ide_settings_proc_ops, in ide_proc_port_register_devices()
549 drive); in ide_proc_port_register_devices()
551 sprintf(name, "ide%d/%s", (drive->name[2]-'a')/2, drive->name); in ide_proc_port_register_devices()
552 ent = proc_symlink(drive->name, proc_ide_root, name); in ide_proc_port_register_devices()
557 void ide_proc_unregister_device(ide_drive_t *drive) in ide_proc_unregister_device() argument
559 if (drive->proc) { in ide_proc_unregister_device()
560 remove_proc_entry("settings", drive->proc); in ide_proc_unregister_device()
561 ide_remove_proc_entries(drive->proc, generic_drive_entries); in ide_proc_unregister_device()
562 remove_proc_entry(drive->name, proc_ide_root); in ide_proc_unregister_device()
563 remove_proc_entry(drive->name, drive->hwif->proc); in ide_proc_unregister_device()
564 drive->proc = NULL; in ide_proc_unregister_device()