Lines Matching full:drive

34  *  | IRQ-unmask, drive-id, multiple-mode, support for ">16 heads",
67 * @drive: device to get a reference to
72 int ide_device_get(ide_drive_t *drive) in ide_device_get() argument
77 if (!get_device(&drive->gendev)) in ide_device_get()
80 host_dev = drive->hwif->host->dev[0]; in ide_device_get()
84 put_device(&drive->gendev); in ide_device_get()
94 * @drive: device to release a reference on
99 void ide_device_put(ide_drive_t *drive) in ide_device_put() argument
102 struct device *host_dev = drive->hwif->host->dev[0]; in ide_device_put()
107 put_device(&drive->gendev); in ide_device_put()
118 ide_drive_t *drive = to_ide_device(dev); in ide_uevent() local
120 add_uevent_var(env, "MEDIA=%s", ide_media_string(drive)); in ide_uevent()
121 add_uevent_var(env, "DRIVENAME=%s", drive->name); in ide_uevent()
122 add_uevent_var(env, "MODALIAS=ide:m-%s", ide_media_string(drive)); in ide_uevent()
128 ide_drive_t *drive = to_ide_device(dev); in generic_ide_probe() local
131 return drv->probe ? drv->probe(drive) : -ENODEV; in generic_ide_probe()
136 ide_drive_t *drive = to_ide_device(dev); in generic_ide_remove() local
140 drv->remove(drive); in generic_ide_remove()
147 ide_drive_t *drive = to_ide_device(dev); in generic_ide_shutdown() local
151 drv->shutdown(drive); in generic_ide_shutdown()
281 static void ide_dev_apply_params(ide_drive_t *drive, u8 unit) in ide_dev_apply_params() argument
283 int i = drive->hwif->index * MAX_DRIVES + unit; in ide_dev_apply_params()
286 printk(KERN_INFO "ide: disallowing DMA for %s\n", drive->name); in ide_dev_apply_params()
287 drive->dev_flags |= IDE_DFLAG_NODMA; in ide_dev_apply_params()
291 drive->name); in ide_dev_apply_params()
292 drive->dev_flags |= IDE_DFLAG_NOFLUSH; in ide_dev_apply_params()
296 drive->name); in ide_dev_apply_params()
297 drive->dev_flags |= IDE_DFLAG_NOHPA; in ide_dev_apply_params()
300 printk(KERN_INFO "ide: skipping probe for %s\n", drive->name); in ide_dev_apply_params()
301 drive->dev_flags |= IDE_DFLAG_NOPROBE; in ide_dev_apply_params()
305 drive->name); in ide_dev_apply_params()
306 drive->bad_wstat = BAD_R_STAT; in ide_dev_apply_params()
309 printk(KERN_INFO "ide: forcing %s as a CD-ROM\n", drive->name); in ide_dev_apply_params()
310 drive->dev_flags |= IDE_DFLAG_PRESENT; in ide_dev_apply_params()
311 drive->media = ide_cdrom; in ide_dev_apply_params()
313 drive->ready_stat = 0; in ide_dev_apply_params()
316 drive->cyl = drive->bios_cyl = ide_disks_chs[i].cyl; in ide_dev_apply_params()
317 drive->head = drive->bios_head = ide_disks_chs[i].head; in ide_dev_apply_params()
318 drive->sect = drive->bios_sect = ide_disks_chs[i].sect; in ide_dev_apply_params()
321 drive->name, in ide_dev_apply_params()
322 drive->cyl, drive->head, drive->sect); in ide_dev_apply_params()
324 drive->dev_flags |= IDE_DFLAG_FORCED_GEOM | IDE_DFLAG_PRESENT; in ide_dev_apply_params()
325 drive->media = ide_disk; in ide_dev_apply_params()
326 drive->ready_stat = ATA_DRDY; in ide_dev_apply_params()
357 ide_drive_t *drive; in ide_port_apply_params() local
366 ide_port_for_each_dev(i, drive, hwif) in ide_port_apply_params()
367 ide_dev_apply_params(drive, i); in ide_port_apply_params()