Lines Matching defs:disk

13  *   - Autodetection of disk format (DD/HD); untested yet, because I
32 * the FDC will otherwise wait forever when no disk is inserted...
36 * - more/other disk formats
41 * - Make disk format numbering independent from minors
47 * - disk formatting
60 * - Maybe a better strategy for disk change detection (does anyone
99 { "D820", 10,1640, 0, 0}, /* 3: DD disk with 82 tracks/10 sectors */
147 /* Array for translating minors into disk formats */
189 * Maximum disk size (in kilobytes). This default is used whenever the
190 * current disk size is unknown.
203 * restored upon disk change by floppy_revalidate() if valid (as seen by
213 struct atari_disk_type *disktype; /* current type of disk */
219 disk change detection) */
221 struct gendisk *disk;
259 * of the disk to save read operations. These are two separate buffers
372 static void floppy_release(struct gendisk *disk, fmode_t mode);
426 * clock speed for this disk's type.
504 /* Test again later; if tested too often, it seems there is no disk
506 * at least until a disk is inserted). So we'll test only twice
514 /* This function is repeatedly called to detect disk changes (as good
955 /* If reading a whole track, wait about one disk rotation and
1074 /* try another disk type */
1076 set_capacity(unit[SelectedDrive].disk,
1091 set_capacity(unit[SelectedDrive].disk,
1262 * FDC status register accessible for check_change. If the last disk
1296 /* If the check for a disk change is done too early after this
1313 /* The detection of disk changes is a dark chapter in Atari history :-(
1320 * filesystem used on the disk and thus the contents of block 0. I've
1321 * chosen the method to always say "The disk was changed" if it is
1323 * invalidates the disk buffers if you work with write protected
1325 * due to unrecognised disk changes.
1328 static unsigned int floppy_check_events(struct gendisk *disk,
1331 struct atari_floppy_struct *p = disk->private_data;
1351 static int floppy_revalidate(struct gendisk *disk)
1353 struct atari_floppy_struct *p = disk->private_data;
1407 q = unit[fdc_queue].disk->queue;
1454 set_capacity(floppy->disk, UDT->blocks);
1459 /* user supplied disk type */
1461 printk(KERN_WARNING "fd%d: invalid disk format", drive );
1466 printk(KERN_WARNING "fd%d: unsupported disk format", drive );
1472 set_capacity(floppy->disk, UDT->blocks);
1512 struct gendisk *disk = bdev->bd_disk;
1513 struct atari_floppy_struct *floppy = disk->private_data;
1559 * disk change and subsequent revalidate()! simple
1574 if (floppy_check_events(disk, 0))
1575 floppy_revalidate(disk);
1612 set_capacity(floppy->disk, UDT->blocks);
1628 /* no matching disk type found above - setting user_params */
1634 /* set user type (reset by disk change!) */
1658 set_capacity(floppy->disk, UDT->blocks);
1681 set_capacity(floppy->disk, MAX_DISK_SIZE * 2);
1743 * whether a disk is inserted). This is done by issuing a restore
1745 * head across the whole disk) and looking at the state of the "TR00"
1795 * floppies, additionally start the disk-change and motor-off timers.
1889 static void floppy_release(struct gendisk *disk, fmode_t mode)
1891 struct atari_floppy_struct *p = disk->private_data;
1918 return get_disk(unit[drive].disk);
1933 unit[i].disk = alloc_disk(1);
1934 if (!unit[i].disk)
1962 unit[i].disk->major = FLOPPY_MAJOR;
1963 unit[i].disk->first_minor = i;
1964 sprintf(unit[i].disk->disk_name, "fd%d", i);
1965 unit[i].disk->fops = &floppy_fops;
1966 unit[i].disk->private_data = &unit[i];
1967 unit[i].disk->queue = blk_init_queue(do_fd_request,
1969 if (!unit[i].disk->queue)
1971 set_capacity(unit[i].disk, MAX_DISK_SIZE * 2);
1972 add_disk(unit[i].disk);
1986 struct request_queue *q = unit[i].disk->queue;
1988 put_disk(unit[i].disk);
2041 struct request_queue *q = unit[i].disk->queue;
2043 del_gendisk(unit[i].disk);
2044 put_disk(unit[i].disk);