Lines Matching refs:_floppy
589 static struct floppy_struct *_floppy = floppy_type; variable
2113 _floppy = floppy_type + type; in set_floppy()
2115 _floppy = current_type[drive]; in set_floppy()
2154 raw_cmd->rate = _floppy->rate & 0x43; in setup_format_params()
2156 raw_cmd->cmd[COMMAND] = FM_MODE(_floppy, FD_FORMAT); in setup_format_params()
2157 raw_cmd->cmd[DR_SELECT] = UNIT(current_drive) + PH_HEAD(_floppy, format_req.head); in setup_format_params()
2158 raw_cmd->cmd[F_SIZECODE] = FD_SIZECODE(_floppy); in setup_format_params()
2159 raw_cmd->cmd[F_SECT_PER_TRACK] = _floppy->sect << 2 >> raw_cmd->cmd[F_SIZECODE]; in setup_format_params()
2160 raw_cmd->cmd[F_GAP] = _floppy->fmt_gap; in setup_format_params()
2181 if (_floppy->fmt_gap < 0x22) in setup_format_params()
2204 if (_floppy->stretch & FD_SECTBASEMASK) { in setup_format_params()
2206 here[count].sect += FD_SECTBASE(_floppy) - 1; in setup_format_params()
2213 setup_format_params(format_req.track << STRETCH(_floppy)); in redo_format()
2233 if (!_floppy || in do_format()
2234 _floppy->track > drive_params[current_drive].tracks || in do_format()
2235 tmp_format_req->track >= _floppy->track || in do_format()
2236 tmp_format_req->head >= _floppy->head || in do_format()
2237 (_floppy->sect << 2) % (1 << FD_SIZECODE(_floppy)) || in do_format()
2238 !_floppy->fmt_gap) { in do_format()
2297 if (block > _floppy->sect) in request_done()
2387 current_type[current_drive] = _floppy; in rw_interrupt()
2388 floppy_sizes[TOMINOR(current_drive)] = _floppy->size; in rw_interrupt()
2395 _floppy->name, current_drive); in rw_interrupt()
2396 current_type[current_drive] = _floppy; in rw_interrupt()
2397 floppy_sizes[TOMINOR(current_drive)] = _floppy->size; in rw_interrupt()
2440 max_sector -= (max_sector % _floppy->sect) % ssize; in transfer_size()
2585 raw_cmd->cmd[COMMAND] = FM_MODE(_floppy, FD_READ); in make_raw_rw_request()
2588 raw_cmd->cmd[COMMAND] = FM_MODE(_floppy, FD_WRITE); in make_raw_rw_request()
2594 max_sector = _floppy->sect * _floppy->head; in make_raw_rw_request()
2598 if (_floppy->track && raw_cmd->cmd[TRACK] >= _floppy->track) { in make_raw_rw_request()
2605 raw_cmd->cmd[HEAD] = fsector_t / _floppy->sect; in make_raw_rw_request()
2607 if (((_floppy->stretch & (FD_SWAPSIDES | FD_SECTBASEMASK)) || in make_raw_rw_request()
2609 fsector_t < _floppy->sect) in make_raw_rw_request()
2610 max_sector = _floppy->sect; in make_raw_rw_request()
2613 if ((_floppy->rate & FD_2M) && (!raw_cmd->cmd[TRACK]) && (!raw_cmd->cmd[HEAD])) { in make_raw_rw_request()
2614 max_sector = 2 * _floppy->sect / 3; in make_raw_rw_request()
2617 min_t(int, _floppy->sect - fsector_t, in make_raw_rw_request()
2623 raw_cmd->cmd[SIZECODE] = FD_SIZECODE(_floppy); in make_raw_rw_request()
2624 raw_cmd->rate = _floppy->rate & 0x43; in make_raw_rw_request()
2625 if ((_floppy->rate & FD_2M) && in make_raw_rw_request()
2633 raw_cmd->track = raw_cmd->cmd[TRACK] << STRETCH(_floppy); in make_raw_rw_request()
2634 raw_cmd->cmd[DR_SELECT] = UNIT(current_drive) + PH_HEAD(_floppy, raw_cmd->cmd[HEAD]); in make_raw_rw_request()
2635 raw_cmd->cmd[GAP] = _floppy->gap; in make_raw_rw_request()
2637 raw_cmd->cmd[SECT_PER_TRACK] = _floppy->sect << 2 >> raw_cmd->cmd[SIZECODE]; in make_raw_rw_request()
2638 raw_cmd->cmd[SECTOR] = ((fsector_t % _floppy->sect) << 2 >> raw_cmd->cmd[SIZECODE]) + in make_raw_rw_request()
2639 FD_SECTBASE(_floppy); in make_raw_rw_request()
2644 tracksize = _floppy->sect - _floppy->sect % ssize; in make_raw_rw_request()
2645 if (tracksize < _floppy->sect) { in make_raw_rw_request()
2647 if (tracksize <= fsector_t % _floppy->sect) in make_raw_rw_request()
2651 while (tracksize <= fsector_t % _floppy->sect) { in make_raw_rw_request()
2652 while (tracksize + ssize > _floppy->sect) { in make_raw_rw_request()
2660 max_sector = raw_cmd->cmd[HEAD] * _floppy->sect + tracksize; in make_raw_rw_request()
2661 } else if (!raw_cmd->cmd[TRACK] && !raw_cmd->cmd[HEAD] && !(_floppy->rate & FD_2M) && probing) { in make_raw_rw_request()
2662 max_sector = _floppy->sect; in make_raw_rw_request()
2665 max_sector = _floppy->sect; in make_raw_rw_request()
2668 in_sector_offset = (fsector_t % _floppy->sect) % ssize; in make_raw_rw_request()
2691 raw_cmd->cmd[COMMAND] = FM_MODE(_floppy, FD_READ); in make_raw_rw_request()
2897 if (!_floppy) { /* Autodetection */ in redo_fd_request()
2902 _floppy = NULL; in redo_fd_request()
2908 …_floppy = floppy_type + drive_params[current_drive].autodetect[drive_state[current_drive].probed_f… in redo_fd_request()