Lines Matching defs:disk
20 #include "ide-disk.h"
33 static struct ide_disk_obj *ide_disk_get(struct gendisk *disk)
38 idkp = ide_drv_g(disk, ide_disk_obj);
69 struct gendisk *g = idkp->disk;
85 struct gendisk *g = idkp->disk;
96 * reinitialized on resume otherwise the disk
125 spin down the disk in this case, especially since Alpha
131 the disk to expire its write cache. */
185 struct gendisk *disk = bdev->bd_disk;
190 idkp = ide_disk_get(disk);
204 ret = drive->disk_ops->init_media(drive, disk);
207 * Allow O_NDELAY to open a drive without a disk, or with an
208 * unreadable disk, so that we can get the format capacity
226 drive->disk_ops->set_doorlock(drive, disk, 1);
253 static int ide_gd_release(struct gendisk *disk, fmode_t mode)
255 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
265 drive->disk_ops->set_doorlock(drive, disk, 0);
288 static int ide_gd_media_changed(struct gendisk *disk)
290 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
306 static void ide_gd_unlock_native_capacity(struct gendisk *disk)
308 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
316 static int ide_gd_revalidate_disk(struct gendisk *disk)
318 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
321 if (ide_gd_media_changed(disk))
324 set_capacity(disk, ide_gd_capacity(drive));
377 printk(KERN_ERR PFX "%s: can't allocate a disk structure\n",
397 idkp->disk = g;
437 MODULE_ALIAS("ide:*m-disk*");
438 MODULE_ALIAS("ide-disk");
444 MODULE_DESCRIPTION("generic ATA/ATAPI disk driver");