Lines Matching refs:device

38 	struct tape_device *	device;  in tape_std_assign_timeout()  local
42 device = request->device; in tape_std_assign_timeout()
43 BUG_ON(!device); in tape_std_assign_timeout()
46 device->cdev_id); in tape_std_assign_timeout()
47 rc = tape_cancel_io(device, request); in tape_std_assign_timeout()
50 "%i\n", device->cdev_id, rc); in tape_std_assign_timeout()
54 tape_std_assign(struct tape_device *device) in tape_std_assign() argument
79 rc = tape_do_io_interruptible(device, request); in tape_std_assign()
86 device->cdev_id); in tape_std_assign()
88 DBF_EVENT(3, "%08x: Tape assigned\n", device->cdev_id); in tape_std_assign()
98 tape_std_unassign (struct tape_device *device) in tape_std_unassign() argument
103 if (device->tape_state == TS_NOT_OPER) { in tape_std_unassign()
105 device->cdev_id); in tape_std_unassign()
117 if ((rc = tape_do_io(device, request)) != 0) { in tape_std_unassign()
118 DBF_EVENT(3, "%08x: Unassign failed\n", device->cdev_id); in tape_std_unassign()
120 DBF_EVENT(3, "%08x: Tape unassigned\n", device->cdev_id); in tape_std_unassign()
130 tape_std_display(struct tape_device *device, struct display_struct *disp) in tape_std_display() argument
151 rc = tape_do_io_interruptible(device, request); in tape_std_display()
160 tape_std_read_block_id(struct tape_device *device, __u64 *id) in tape_std_read_block_id() argument
170 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_read_block_id()
174 rc = tape_do_io(device, request); in tape_std_read_block_id()
183 tape_std_terminate_write(struct tape_device *device) in tape_std_terminate_write() argument
187 if(device->required_tapemarks == 0) in tape_std_terminate_write()
190 DBF_LH(5, "tape%d: terminate write %dxEOF\n", device->first_minor, in tape_std_terminate_write()
191 device->required_tapemarks); in tape_std_terminate_write()
193 rc = tape_mtop(device, MTWEOF, device->required_tapemarks); in tape_std_terminate_write()
197 device->required_tapemarks = 0; in tape_std_terminate_write()
198 return tape_mtop(device, MTBSR, 1); in tape_std_terminate_write()
207 tape_std_mtload(struct tape_device *device, int count) in tape_std_mtload() argument
209 return wait_event_interruptible(device->state_change_wq, in tape_std_mtload()
210 (device->medium_state == MS_LOADED)); in tape_std_mtload()
217 tape_std_mtsetblk(struct tape_device *device, int count) in tape_std_mtsetblk() argument
228 device->char_data.block_size = 0; in tape_std_mtsetblk()
231 if (device->char_data.idal_buf != NULL && in tape_std_mtsetblk()
232 device->char_data.idal_buf->size == count) in tape_std_mtsetblk()
246 if (device->char_data.idal_buf != NULL) in tape_std_mtsetblk()
247 idal_buffer_free(device->char_data.idal_buf); in tape_std_mtsetblk()
248 device->char_data.idal_buf = new; in tape_std_mtsetblk()
249 device->char_data.block_size = count; in tape_std_mtsetblk()
251 DBF_LH(6, "new blocksize is %d\n", device->char_data.block_size); in tape_std_mtsetblk()
260 tape_std_mtreset(struct tape_device *device, int count) in tape_std_mtreset() argument
263 device->char_data.block_size = 0; in tape_std_mtreset()
272 tape_std_mtfsf(struct tape_device *device, int mt_count) in tape_std_mtfsf() argument
283 device->modeset_byte); in tape_std_mtfsf()
288 return tape_do_io_free(device, request); in tape_std_mtfsf()
296 tape_std_mtfsr(struct tape_device *device, int mt_count) in tape_std_mtfsr() argument
308 device->modeset_byte); in tape_std_mtfsr()
313 rc = tape_do_io(device, request); in tape_std_mtfsr()
328 tape_std_mtbsr(struct tape_device *device, int mt_count) in tape_std_mtbsr() argument
340 device->modeset_byte); in tape_std_mtbsr()
345 rc = tape_do_io(device, request); in tape_std_mtbsr()
359 tape_std_mtweof(struct tape_device *device, int mt_count) in tape_std_mtweof() argument
370 device->modeset_byte); in tape_std_mtweof()
375 return tape_do_io_free(device, request); in tape_std_mtweof()
384 tape_std_mtbsfm(struct tape_device *device, int mt_count) in tape_std_mtbsfm() argument
395 device->modeset_byte); in tape_std_mtbsfm()
400 return tape_do_io_free(device, request); in tape_std_mtbsfm()
408 tape_std_mtbsf(struct tape_device *device, int mt_count) in tape_std_mtbsf() argument
420 device->modeset_byte); in tape_std_mtbsf()
424 rc = tape_do_io_free(device, request); in tape_std_mtbsf()
426 rc = tape_mtop(device, MTFSR, 1); in tape_std_mtbsf()
439 tape_std_mtfsfm(struct tape_device *device, int mt_count) in tape_std_mtfsfm() argument
451 device->modeset_byte); in tape_std_mtfsfm()
455 rc = tape_do_io_free(device, request); in tape_std_mtfsfm()
457 rc = tape_mtop(device, MTBSR, 1); in tape_std_mtfsfm()
469 tape_std_mtrew(struct tape_device *device, int mt_count) in tape_std_mtrew() argument
479 device->modeset_byte); in tape_std_mtrew()
484 return tape_do_io_free(device, request); in tape_std_mtrew()
492 tape_std_mtoffl(struct tape_device *device, int mt_count) in tape_std_mtoffl() argument
501 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mtoffl()
506 return tape_do_io_free(device, request); in tape_std_mtoffl()
513 tape_std_mtnop(struct tape_device *device, int mt_count) in tape_std_mtnop() argument
522 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mtnop()
525 return tape_do_io_free(device, request); in tape_std_mtnop()
534 tape_std_mteom(struct tape_device *device, int mt_count) in tape_std_mteom() argument
541 if ((rc = tape_mtop(device, MTREW, 1)) < 0) in tape_std_mteom()
551 if ((rc = tape_mtop(device, MTFSF, 1)) < 0) in tape_std_mteom()
553 if ((rc = tape_mtop(device, MTFSR, 1)) < 0) in tape_std_mteom()
557 return tape_mtop(device, MTBSR, 1); in tape_std_mteom()
564 tape_std_mtreten(struct tape_device *device, int mt_count) in tape_std_mtreten() argument
573 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mtreten()
578 tape_do_io_interruptible(device, request); in tape_std_mtreten()
580 return tape_mtop(device, MTREW, 1); in tape_std_mtreten()
587 tape_std_mterase(struct tape_device *device, int mt_count) in tape_std_mterase() argument
596 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mterase()
604 return tape_do_io_free(device, request); in tape_std_mterase()
611 tape_std_mtunload(struct tape_device *device, int mt_count) in tape_std_mtunload() argument
613 return tape_mtop(device, MTOFFL, mt_count); in tape_std_mtunload()
621 tape_std_mtcompression(struct tape_device *device, int mt_count) in tape_std_mtcompression() argument
635 *device->modeset_byte &= ~0x08; in tape_std_mtcompression()
637 *device->modeset_byte |= 0x08; in tape_std_mtcompression()
638 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mtcompression()
641 return tape_do_io_free(device, request); in tape_std_mtcompression()
648 tape_std_read_block(struct tape_device *device, size_t count) in tape_std_read_block() argument
662 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_read_block()
664 device->char_data.idal_buf); in tape_std_read_block()
673 tape_std_read_backward(struct tape_device *device, struct tape_request *request) in tape_std_read_backward() argument
681 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_read_backward()
683 device->char_data.idal_buf); in tape_std_read_backward()
692 tape_std_write_block(struct tape_device *device, size_t count) in tape_std_write_block() argument
702 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_write_block()
704 device->char_data.idal_buf); in tape_std_write_block()
713 tape_std_process_eov(struct tape_device *device) in tape_std_process_eov() argument
719 if (tape_mtop(device, MTBSR, 1) == 0 && in tape_std_process_eov()
720 tape_mtop(device, MTWEOF, 1) == 0) { in tape_std_process_eov()
721 tape_mtop(device, MTBSR, 1); in tape_std_process_eov()