Lines Matching refs:disk

33  *    needed for the disk mechanic.
35 * february 1996 fixed error recovery and multiple disk access
97 #define FD_NOTREADY 4 /* unit is not ready (motor not on/no disk) */
170 #define RAW_BUF_SIZE 30000 /* size of raw disk data */
531 /* loop and read disk ID */
658 * written to disk and vice versa.
814 static unsigned long *putsec(int disk, unsigned long *raw, int cnt)
819 disk&=3;
825 hdr.track = unit[disk].track;
827 hdr.ord = unit[disk].dtype->sects * unit[disk].type->sect_mult - cnt;
832 hdr.datachk = checksum((ulong *)(unit[disk].trackbuf+cnt*512), 512);
842 encode_block(raw, (ulong *)(unit[disk].trackbuf+cnt*512), 512);
848 static void amiga_write(int disk)
853 disk&=3;
855 for (cnt = 0; cnt < 415 * unit[disk].type->sect_mult; cnt++)
859 for (cnt = 0; cnt < unit[disk].dtype->sects * unit[disk].type->sect_mult; cnt++)
860 ptr = putsec (disk, ptr, cnt);
1095 "%d, unit %d for sector%d, disk sector %d\n",
1205 static void dos_write(int disk)
1211 disk&=3;
1217 if (unit[disk].type->sect_mult==2) /* check for HD-Disks */
1232 for(cnt = 0; cnt < unit[disk].dtype->sects * unit[disk].type->sect_mult; cnt++)
1233 ptr=ms_putsec(disk,ptr,cnt);
1261 printk (KERN_NOTICE "floppy disk write protected\n");
1286 printk (KERN_NOTICE "floppy disk write protected "
1576 unit[drive].disk = -1;
1630 printk(KERN_INFO "fd%d: accessing %s-disk with %s-layout\n",drive,
1637 static void floppy_release(struct gendisk *disk, fmode_t mode)
1639 struct amiga_floppy_struct *p = disk->private_data;
1665 static unsigned amiga_check_events(struct gendisk *disk, unsigned int clearing)
1667 struct amiga_floppy_struct *p = disk->private_data;
1710 struct gendisk *disk;
1714 disk = alloc_disk(1);
1715 if (!disk) {
1719 unit[drive].gendisk = disk;
1721 disk->queue = blk_init_queue(do_fd_request, &amiflop_lock);
1722 if (!disk->queue) {
1735 disk->major = FLOPPY_MAJOR;
1736 disk->first_minor = drive;
1737 disk->fops = &floppy_fops;
1738 sprintf(disk->disk_name, "fd%d", drive);
1739 disk->private_data = &unit[drive];
1740 set_capacity(disk, 880*2);
1741 add_disk(disk);
1822 /* make sure that disk DMA is enabled */