Lines Matching refs:disk
199 int disk; /* disk in drive (-1 == unknown) */ member
931 static unsigned long *putsec(int disk, unsigned long *raw, int cnt) in putsec() argument
936 disk&=3; in putsec()
942 hdr.track = unit[disk].track; in putsec()
944 hdr.ord = unit[disk].dtype->sects * unit[disk].type->sect_mult - cnt; in putsec()
949 hdr.datachk = checksum((ulong *)(unit[disk].trackbuf+cnt*512), 512); in putsec()
959 encode_block(raw, (ulong *)(unit[disk].trackbuf+cnt*512), 512); in putsec()
965 static void amiga_write(int disk) in amiga_write() argument
970 disk&=3; in amiga_write()
972 for (cnt = 0; cnt < 415 * unit[disk].type->sect_mult; cnt++) in amiga_write()
976 for (cnt = 0; cnt < unit[disk].dtype->sects * unit[disk].type->sect_mult; cnt++) in amiga_write()
977 ptr = putsec (disk, ptr, cnt); in amiga_write()
1322 static void dos_write(int disk) in dos_write() argument
1328 disk&=3; in dos_write()
1334 if (unit[disk].type->sect_mult==2) /* check for HD-Disks */ in dos_write()
1349 for(cnt = 0; cnt < unit[disk].dtype->sects * unit[disk].type->sect_mult; cnt++) in dos_write()
1350 ptr=ms_putsec(disk,ptr,cnt); in dos_write()
1646 unit[drive].disk = -1; in fd_probe()
1707 static void floppy_release(struct gendisk *disk, fmode_t mode) in floppy_release() argument
1709 struct amiga_floppy_struct *p = disk->private_data; in floppy_release()
1734 static unsigned amiga_check_events(struct gendisk *disk, unsigned int clearing) in amiga_check_events() argument
1736 struct amiga_floppy_struct *p = disk->private_data; in amiga_check_events()
1777 struct gendisk *disk; in fd_alloc_disk() local
1779 disk = alloc_disk(1); in fd_alloc_disk()
1780 if (!disk) in fd_alloc_disk()
1783 disk->queue = blk_mq_init_sq_queue(&unit[drive].tag_set, &amiflop_mq_ops, in fd_alloc_disk()
1785 if (IS_ERR(disk->queue)) { in fd_alloc_disk()
1786 disk->queue = NULL; in fd_alloc_disk()
1794 return disk; in fd_alloc_disk()
1797 blk_cleanup_queue(disk->queue); in fd_alloc_disk()
1798 disk->queue = NULL; in fd_alloc_disk()
1801 put_disk(disk); in fd_alloc_disk()
1815 struct gendisk *disk; in fd_probe_drives() local
1820 disk = fd_alloc_disk(drive); in fd_probe_drives()
1821 if (!disk) { in fd_probe_drives()
1826 unit[drive].gendisk = disk; in fd_probe_drives()
1830 disk->major = FLOPPY_MAJOR; in fd_probe_drives()
1831 disk->first_minor = drive; in fd_probe_drives()
1832 disk->fops = &floppy_fops; in fd_probe_drives()
1833 disk->events = DISK_EVENT_MEDIA_CHANGE; in fd_probe_drives()
1834 sprintf(disk->disk_name, "fd%d", drive); in fd_probe_drives()
1835 disk->private_data = &unit[drive]; in fd_probe_drives()
1836 set_capacity(disk, 880*2); in fd_probe_drives()
1837 add_disk(disk); in fd_probe_drives()