Lines Matching refs:SRpnt
203 static void osst_analyze_sense(struct osst_request *SRpnt, struct st_cmdstatus *s) in osst_analyze_sense() argument
206 const u8 *sense = SRpnt->sense; in osst_analyze_sense()
208 s->have_sense = scsi_normalize_sense(SRpnt->sense, in osst_analyze_sense()
235 static int osst_chk_result(struct osst_tape * STp, struct osst_request * SRpnt) in osst_chk_result() argument
238 int result = SRpnt->result; in osst_chk_result()
239 u8 * sense = SRpnt->sense, scode; in osst_chk_result()
249 osst_analyze_sense(SRpnt, cmdstatp); in osst_chk_result()
259 SRpnt->cmd[0], SRpnt->cmd[1], SRpnt->cmd[2], in osst_chk_result()
260 SRpnt->cmd[3], SRpnt->cmd[4], SRpnt->cmd[5]); in osst_chk_result()
265 SRpnt->sense, SCSI_SENSE_BUFFERSIZE); in osst_chk_result()
275 SRpnt->cmd[0] != MODE_SENSE && in osst_chk_result()
276 SRpnt->cmd[0] != TEST_UNIT_READY)) { /* Abnormal conditions for tape */ in osst_chk_result()
280 SRpnt->sense, SCSI_SENSE_BUFFERSIZE); in osst_chk_result()
305 if (SRpnt->cmd[0] == READ_6) in osst_chk_result()
307 else if (SRpnt->cmd[0] == WRITE_6) in osst_chk_result()
326 struct osst_request *SRpnt = req->end_io_data; in osst_end_async() local
327 struct osst_tape *STp = SRpnt->stp; in osst_end_async()
328 struct rq_map_data *mdata = &SRpnt->stp->buffer->map_data; in osst_end_async()
330 STp->buffer->cmdstat.midlevel_result = SRpnt->result = rq->result; in osst_end_async()
335 memcpy(SRpnt->sense, rq->sense, SCSI_SENSE_BUFFERSIZE); in osst_end_async()
336 if (SRpnt->waiting) in osst_end_async()
337 complete(SRpnt->waiting); in osst_end_async()
339 if (SRpnt->bio) { in osst_end_async()
341 blk_rq_unmap_user(SRpnt->bio); in osst_end_async()
358 static int osst_execute(struct osst_request *SRpnt, const unsigned char *cmd, in osst_execute() argument
365 struct rq_map_data *mdata = &SRpnt->stp->buffer->map_data; in osst_execute()
370 req = blk_get_request(SRpnt->stp->device->request_queue, in osst_execute()
378 SRpnt->bio = NULL; in osst_execute()
403 SRpnt->bio = req->bio; in osst_execute()
417 req->end_io_data = SRpnt; in osst_execute()
429 static struct osst_request * osst_do_scsi(struct osst_request *SRpnt, struct osst_tape *STp, in osst_do_scsi() argument
451 if (SRpnt == NULL) { in osst_do_scsi()
452 SRpnt = osst_allocate_request(); in osst_do_scsi()
453 if (SRpnt == NULL) { in osst_do_scsi()
462 SRpnt->stp = STp; in osst_do_scsi()
468 (STp->buffer)->last_SRpnt = SRpnt; in osst_do_scsi()
472 SRpnt->waiting = waiting; in osst_do_scsi()
483 memcpy(SRpnt->cmd, cmd, sizeof(SRpnt->cmd)); in osst_do_scsi()
487 if (osst_execute(SRpnt, cmd, COMMAND_SIZE(cmd[0]), direction, bp, bytes, in osst_do_scsi()
493 SRpnt->waiting = NULL; in osst_do_scsi()
494 STp->buffer->syscall_result = osst_chk_result(STp, SRpnt); in osst_do_scsi()
508 return SRpnt; in osst_do_scsi()
756 struct osst_request * SRpnt; in osst_wait_ready() local
771 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, 0, DMA_NONE, STp->timeout, MAX_RETRIES, 1); in osst_wait_ready()
772 *aSRpnt = SRpnt; in osst_wait_ready()
773 if (!SRpnt) return (-EBUSY); in osst_wait_ready()
776 (( SRpnt->sense[2] == 2 && SRpnt->sense[12] == 4 && in osst_wait_ready()
777 (SRpnt->sense[13] == 1 || SRpnt->sense[13] == 8) ) || in osst_wait_ready()
778 ( SRpnt->sense[2] == 6 && SRpnt->sense[12] == 0x28 && in osst_wait_ready()
779 SRpnt->sense[13] == 0 ) )) { in osst_wait_ready()
792 SRpnt = osst_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE, STp->timeout, MAX_RETRIES, 1); in osst_wait_ready()
794 *aSRpnt = SRpnt; in osst_wait_ready()
803 STp->buffer->syscall_result, SRpnt->sense[0], SRpnt->sense[2], in osst_wait_ready()
804 SRpnt->sense[12], SRpnt->sense[13]); in osst_wait_ready()
820 struct osst_request * SRpnt; in osst_wait_for_medium() local
832 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, 0, DMA_NONE, STp->timeout, MAX_RETRIES, 1); in osst_wait_for_medium()
833 *aSRpnt = SRpnt; in osst_wait_for_medium()
834 if (!SRpnt) return (-EBUSY); in osst_wait_for_medium()
837 SRpnt->sense[2] == 2 && SRpnt->sense[12] == 0x3a && SRpnt->sense[13] == 0 ) { in osst_wait_for_medium()
850 SRpnt = osst_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE, STp->timeout, MAX_RETRIES, 1); in osst_wait_for_medium()
852 *aSRpnt = SRpnt; in osst_wait_for_medium()
856 if ( STp->buffer->syscall_result && SRpnt->sense[2] != 2 && in osst_wait_for_medium()
857 SRpnt->sense[12] != 4 && SRpnt->sense[13] == 1) { in osst_wait_for_medium()
861 STp->buffer->syscall_result, SRpnt->sense[0], SRpnt->sense[2], in osst_wait_for_medium()
862 SRpnt->sense[12], SRpnt->sense[13]); in osst_wait_for_medium()
889 struct osst_request * SRpnt; in osst_flush_drive_buffer() local
902 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, 0, DMA_NONE, STp->timeout, MAX_RETRIES, 1); in osst_flush_drive_buffer()
903 *aSRpnt = SRpnt; in osst_flush_drive_buffer()
904 if (!SRpnt) return (-EBUSY); in osst_flush_drive_buffer()
906 if ((SRpnt->sense[2] & 0x0f) == 2 && SRpnt->sense[12] == 4) { in osst_flush_drive_buffer()
907 if (SRpnt->sense[13] == 8) { in osst_flush_drive_buffer()
977 struct osst_request * SRpnt; in osst_recover_wait_frame() local
993 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, 0, DMA_NONE, STp->timeout, in osst_recover_wait_frame()
998 if (STp->buffer->syscall_result && (SRpnt->sense[2] & 0x0f) != 2) { in osst_recover_wait_frame()
1010 SRpnt = osst_do_scsi(SRpnt, STp, cmd, 20, DMA_FROM_DEVICE, STp->timeout, in osst_recover_wait_frame()
1036 struct osst_request * SRpnt; in osst_read_frame() local
1056 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, OS_FRAME_SIZE, DMA_FROM_DEVICE, in osst_read_frame()
1058 *aSRpnt = SRpnt; in osst_read_frame()
1059 if (!SRpnt) in osst_read_frame()
1074 SRpnt->sense[0], SRpnt->sense[1], in osst_read_frame()
1075 SRpnt->sense[2], SRpnt->sense[3], in osst_read_frame()
1076 SRpnt->sense[4], SRpnt->sense[5], in osst_read_frame()
1077 SRpnt->sense[6], SRpnt->sense[7]); in osst_read_frame()
1107 struct osst_request * SRpnt ; in osst_initiate_read() local
1132 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, 0, DMA_NONE, STp->timeout, MAX_RETRIES, 1); in osst_initiate_read()
1133 *aSRpnt = SRpnt; in osst_initiate_read()
1475 struct osst_request * SRpnt = * aSRpnt; in osst_read_back_buffer_and_rewrite() local
1513 SRpnt = osst_do_scsi(SRpnt, STp, cmd, OS_FRAME_SIZE, DMA_FROM_DEVICE, in osst_read_back_buffer_and_rewrite()
1516 if ((STp->buffer)->syscall_result || !SRpnt) { in osst_read_back_buffer_and_rewrite()
1519 *aSRpnt = SRpnt; in osst_read_back_buffer_and_rewrite()
1529 *aSRpnt = SRpnt; in osst_read_back_buffer_and_rewrite()
1556 SRpnt = * aSRpnt; in osst_read_back_buffer_and_rewrite()
1585 SRpnt = osst_do_scsi(SRpnt, STp, cmd, OS_FRAME_SIZE, DMA_TO_DEVICE, in osst_read_back_buffer_and_rewrite()
1601 SRpnt = osst_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE, in osst_read_back_buffer_and_rewrite()
1616 SRpnt = osst_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE, STp->timeout, in osst_read_back_buffer_and_rewrite()
1619 if (SRpnt->sense[2] == 2 && SRpnt->sense[12] == 4 && in osst_read_back_buffer_and_rewrite()
1620 (SRpnt->sense[13] == 1 || SRpnt->sense[13] == 8)) { in osst_read_back_buffer_and_rewrite()
1635 *aSRpnt = SRpnt; in osst_read_back_buffer_and_rewrite()
1637 if ((SRpnt->sense[ 2] & 0x0f) == 13 && in osst_read_back_buffer_and_rewrite()
1638 SRpnt->sense[12] == 0 && in osst_read_back_buffer_and_rewrite()
1639 SRpnt->sense[13] == 2) { in osst_read_back_buffer_and_rewrite()
1644 i = ((SRpnt->sense[3] << 24) | in osst_read_back_buffer_and_rewrite()
1645 (SRpnt->sense[4] << 16) | in osst_read_back_buffer_and_rewrite()
1646 (SRpnt->sense[5] << 8) | in osst_read_back_buffer_and_rewrite()
1647 SRpnt->sense[6] ) - new_frame; in osst_read_back_buffer_and_rewrite()
1674 struct osst_request * SRpnt; in osst_reposition_and_retry() local
1721 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, OS_FRAME_SIZE, DMA_TO_DEVICE, in osst_reposition_and_retry()
1723 *aSRpnt = SRpnt; in osst_reposition_and_retry()
1726 if ((SRpnt->sense[ 2] & 0x0f) == 13 && in osst_reposition_and_retry()
1727 SRpnt->sense[12] == 0 && in osst_reposition_and_retry()
1728 SRpnt->sense[13] == 2) { in osst_reposition_and_retry()
1775 struct osst_request * SRpnt = * aSRpnt; in osst_write_error_recovery() local
1784 if ((SRpnt->sense[ 2] & 0x0f) != 3 in osst_write_error_recovery()
1785 || SRpnt->sense[12] != 12 in osst_write_error_recovery()
1786 || SRpnt->sense[13] != 0) { in osst_write_error_recovery()
1789 SRpnt->sense[2], SRpnt->sense[12], SRpnt->sense[13]); in osst_write_error_recovery()
1793 frame = (SRpnt->sense[3] << 24) | in osst_write_error_recovery()
1794 (SRpnt->sense[4] << 16) | in osst_write_error_recovery()
1795 (SRpnt->sense[5] << 8) | in osst_write_error_recovery()
1796 SRpnt->sense[6]; in osst_write_error_recovery()
1797 skip = SRpnt->sense[9]; in osst_write_error_recovery()
2159 struct osst_request * SRpnt = * aSRpnt; in osst_set_retries() local
2179 SRpnt = osst_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_TO_DEVICE, STp->timeout, 0, 1); in osst_set_retries()
2180 *aSRpnt = SRpnt; in osst_set_retries()
2690 struct osst_request * SRpnt = * aSRpnt; in osst_configure_onstream() local
2719 SRpnt = osst_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_FROM_DEVICE, STp->timeout, 0, 1); in osst_configure_onstream()
2720 if (SRpnt == NULL) { in osst_configure_onstream()
2726 *aSRpnt = SRpnt; in osst_configure_onstream()
2756 SRpnt = osst_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_TO_DEVICE, STp->timeout, 0, 1); in osst_configure_onstream()
2757 *aSRpnt = SRpnt; in osst_configure_onstream()
2770 SRpnt = * aSRpnt; in osst_configure_onstream()
2796 SRpnt = osst_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_TO_DEVICE, STp->timeout, 0, 1); in osst_configure_onstream()
2797 *aSRpnt = SRpnt; in osst_configure_onstream()
2811 SRpnt = osst_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_FROM_DEVICE, STp->timeout, 0, 1); in osst_configure_onstream()
2812 *aSRpnt = SRpnt; in osst_configure_onstream()
2831 SRpnt = osst_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_FROM_DEVICE, STp->timeout, 0, 1); in osst_configure_onstream()
2832 *aSRpnt = SRpnt; in osst_configure_onstream()
2889 struct osst_request * SRpnt; in osst_get_frame_position() local
2905 SRpnt = osst_do_scsi(*aSRpnt, STp, scmd, 20, DMA_FROM_DEVICE, in osst_get_frame_position()
2907 if (!SRpnt) { in osst_get_frame_position()
2911 *aSRpnt = SRpnt; in osst_get_frame_position()
2914 result = ((SRpnt->sense[2] & 0x0f) == 3) ? -EIO : -EINVAL; /* 3: Write Error */ in osst_get_frame_position()
2921 memcpy (mysense, SRpnt->sense, 16); in osst_get_frame_position()
2925 SRpnt = osst_do_scsi(SRpnt, STp, scmd, 20, DMA_FROM_DEVICE, in osst_get_frame_position()
2930 SRpnt->sense[2],SRpnt->sense[12],SRpnt->sense[13]); in osst_get_frame_position()
2933 memcpy (SRpnt->sense, mysense, 16); in osst_get_frame_position()
2973 struct osst_request * SRpnt; in osst_set_frame_position() local
3004 SRpnt = osst_do_scsi(*aSRpnt, STp, scmd, 0, DMA_NONE, STp->long_timeout, in osst_set_frame_position()
3006 if (!SRpnt) in osst_set_frame_position()
3008 *aSRpnt = SRpnt; in osst_set_frame_position()
3060 struct osst_request * SRpnt = *aSRpnt; in osst_flush_write_buffer() local
3065 if (SRpnt == (STp->buffer)->last_SRpnt) in osst_flush_write_buffer()
3070 *aSRpnt = SRpnt = NULL; in osst_flush_write_buffer()
3072 } else if (SRpnt) in osst_flush_write_buffer()
3142 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, transfer, DMA_TO_DEVICE, in osst_flush_write_buffer()
3144 *aSRpnt = SRpnt; in osst_flush_write_buffer()
3145 if (!SRpnt) in osst_flush_write_buffer()
3152 name, SRpnt->sense[0], SRpnt->sense[2], in osst_flush_write_buffer()
3153 SRpnt->sense[12], SRpnt->sense[13]); in osst_flush_write_buffer()
3155 if ((SRpnt->sense[0] & 0x70) == 0x70 && in osst_flush_write_buffer()
3156 (SRpnt->sense[2] & 0x40) && /* FIXME - SC-30 drive doesn't assert EOM bit */ in osst_flush_write_buffer()
3157 (SRpnt->sense[2] & 0x0f) == NO_SENSE) { in osst_flush_write_buffer()
3250 struct osst_request * SRpnt; in osst_write_frame() local
3299 SRpnt = osst_do_scsi(*aSRpnt, STp, cmd, OS_FRAME_SIZE, DMA_TO_DEVICE, STp->timeout, in osst_write_frame()
3301 if (!SRpnt) in osst_write_frame()
3303 *aSRpnt = SRpnt; in osst_write_frame()
3311 if ((SRpnt->sense[0] & 0x70) == 0x70 && in osst_write_frame()
3312 (SRpnt->sense[2] & 0x40)) { in osst_write_frame()
3313 if ((SRpnt->sense[2] & 0x0f) == VOLUME_OVERFLOW) in osst_write_frame()
3377 struct osst_request * SRpnt = NULL; in osst_write() local
3461 retval = osst_flush_buffer(STp, &SRpnt, 0); in osst_write()
3476 osst_reset_header(STp, &SRpnt); in osst_write()
3481 if ((STp->fast_open && osst_verify_position(STp, &SRpnt)) || in osst_write()
3525 if (SRpnt) printk(KERN_ERR "%s:A: Not supposed to have SRpnt at line %d\n", name, __LINE__); in osst_write()
3589 i = osst_write_frame(STp, &SRpnt, 1); in osst_write()
3621 if (SRpnt != NULL) { in osst_write()
3622 osst_release_request(SRpnt); in osst_write()
3623 SRpnt = NULL; in osst_write()
3670 i = osst_write_frame(STp, &SRpnt, 0); in osst_write()
3675 SRpnt = NULL; /* Prevent releasing this request! */ in osst_write()
3684 if (SRpnt != NULL) osst_release_request(SRpnt); in osst_write()
3700 struct osst_request * SRpnt = NULL; in osst_read() local
3749 retval = osst_flush_buffer(STp, &SRpnt, 0); in osst_read()
3795 special = osst_get_logical_frame(STp, &SRpnt, STp->frame_seq_number, 0); in osst_read()
3869 if (SRpnt != NULL) osst_release_request(SRpnt); in osst_read()
4065 struct osst_request * SRpnt = * aSRpnt; in osst_int_ioctl() local
4093 ioctl_result = osst_space_over_filemarks_forward_fast(STp, &SRpnt, cmd_in, arg); in osst_int_ioctl()
4095 ioctl_result = osst_space_over_filemarks_forward_slow(STp, &SRpnt, cmd_in, arg); in osst_int_ioctl()
4107 ioctl_result = osst_space_over_filemarks_backward(STp, &SRpnt, cmd_in, arg); in osst_int_ioctl()
4129 ioctl_result = osst_seek_logical_blk(STp, &SRpnt, logical_blk_num); in osst_int_ioctl()
4175 ioctl_result = osst_flush_write_buffer(STp, &SRpnt); in osst_int_ioctl()
4183 ioctl_result |= osst_write_filemark(STp, &SRpnt); in osst_int_ioctl()
4259 if ((osst_position_tape_and_confirm(STp, &SRpnt, STp->eod_frame_ppos) < 0) || in osst_int_ioctl()
4260 (osst_get_logical_frame(STp, &SRpnt, -1, 0) < 0)) { in osst_int_ioctl()
4271 ioctl_result = osst_set_frame_position(STp, &SRpnt, STp->eod_frame_ppos, 0); in osst_int_ioctl()
4279 ioctl_result = osst_reset_header(STp, &SRpnt); in osst_int_ioctl()
4280 i = osst_write_eod(STp, &SRpnt); in osst_int_ioctl()
4282 i = osst_position_tape_and_confirm(STp, &SRpnt, STp->eod_frame_ppos); in osst_int_ioctl()
4335 SRpnt = osst_do_scsi(SRpnt, STp, cmd, datalen, direction, timeout, MAX_RETRIES, 1); in osst_int_ioctl()
4339 if (!SRpnt) { in osst_int_ioctl()
4374 ioctl_result = osst_seek_logical_blk(STp, &SRpnt, STp->logical_blk_num-1); in osst_int_ioctl()
4397 ioctl_result = osst_position_tape_and_confirm(STp, &SRpnt, STp->first_data_ppos); in osst_int_ioctl()
4403 if (osst_position_tape_and_confirm(STp, &SRpnt, STp->first_data_ppos) < 0) in osst_int_ioctl()
4409 if (osst_position_tape_and_confirm(STp, &SRpnt, STp->eod_frame_ppos) < 0) in osst_int_ioctl()
4422 } else if (SRpnt) { /* SCSI command was not completely successful. */ in osst_int_ioctl()
4423 if (SRpnt->sense[2] & 0x40) { in osst_int_ioctl()
4430 if ((SRpnt->sense[2] & 0x0f) == BLANK_CHECK) in osst_int_ioctl()
4433 if (cmd_in == MTLOAD && osst_wait_for_medium(STp, &SRpnt, 60)) in osst_int_ioctl()
4434 ioctl_result = osst_wait_ready(STp, &SRpnt, 5 * 60, OSST_WAIT_POSITION_COMPLETE); in osst_int_ioctl()
4436 *aSRpnt = SRpnt; in osst_int_ioctl()
4448 struct osst_request * SRpnt = NULL; in __os_scsi_tape_open() local
4551 SRpnt = osst_do_scsi(NULL, STp, cmd, 0, DMA_NONE, STp->timeout, MAX_RETRIES, 1); in __os_scsi_tape_open()
4552 if (!SRpnt) { in __os_scsi_tape_open()
4556 if ((SRpnt->sense[0] & 0x70) == 0x70 && in __os_scsi_tape_open()
4557 (SRpnt->sense[2] & 0x0f) == NOT_READY && in __os_scsi_tape_open()
4558 SRpnt->sense[12] == 4 ) { in __os_scsi_tape_open()
4560 printk(OSST_DEB_MSG "%s:D: Unit not ready, cause %x\n", name, SRpnt->sense[13]); in __os_scsi_tape_open()
4566 if (SRpnt->sense[13] == 2) { /* initialize command required (LOAD) */ in __os_scsi_tape_open()
4571 SRpnt = osst_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE, in __os_scsi_tape_open()
4574 osst_wait_ready(STp, &SRpnt, (SRpnt->sense[13]==1?15:3) * 60, 0); in __os_scsi_tape_open()
4576 if ((SRpnt->sense[0] & 0x70) == 0x70 && in __os_scsi_tape_open()
4577 (SRpnt->sense[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */ in __os_scsi_tape_open()
4588 SRpnt = osst_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE, in __os_scsi_tape_open()
4590 if ((SRpnt->sense[0] & 0x70) != 0x70 || in __os_scsi_tape_open()
4591 (SRpnt->sense[2] & 0x0f) != UNIT_ATTENTION) in __os_scsi_tape_open()
4617 !SRpnt->result && SRpnt->sense[0] == 0) { in __os_scsi_tape_open()
4625 SRpnt = osst_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_FROM_DEVICE, STp->timeout, 0, 1); in __os_scsi_tape_open()
4642 if (STp->header_ok && i == osst_get_frame_position(STp, &SRpnt)) { in __os_scsi_tape_open()
4656 osst_release_request(SRpnt); in __os_scsi_tape_open()
4669 (SRpnt->sense[2] != 2 || SRpnt->sense[12] != 0x3A) ) { in __os_scsi_tape_open()
4688 SRpnt = osst_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_TO_DEVICE, STp->timeout, 0, 1); in __os_scsi_tape_open()
4697 SRpnt = osst_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE, in __os_scsi_tape_open()
4699 if ((SRpnt->sense[0] & 0x70) != 0x70 || in __os_scsi_tape_open()
4700 (SRpnt->sense[2] & 0x0f) == NOT_READY) in __os_scsi_tape_open()
4703 if ((SRpnt->sense[2] & 0x0f) == UNIT_ATTENTION) { in __os_scsi_tape_open()
4724 if (osst_wait_ready(STp, &SRpnt, 15 * 60, 0)) /* FIXME - not allowed with NOBLOCK */ in __os_scsi_tape_open()
4729 (SRpnt->sense[0] & 0x70) == 0x70 && in __os_scsi_tape_open()
4730 (SRpnt->sense[2] & 0x0f) == NOT_READY && in __os_scsi_tape_open()
4731 SRpnt->sense[12] == 0x3a) { /* Check ASC */ in __os_scsi_tape_open()
4735 osst_release_request(SRpnt); in __os_scsi_tape_open()
4736 SRpnt = NULL; in __os_scsi_tape_open()
4746 osst_configure_onstream(STp, &SRpnt); in __os_scsi_tape_open()
4793 osst_analyze_headers(STp, &SRpnt); in __os_scsi_tape_open()
4795 osst_release_request(SRpnt); in __os_scsi_tape_open()
4796 SRpnt = NULL; in __os_scsi_tape_open()
4801 if (SRpnt != NULL) in __os_scsi_tape_open()
4802 osst_release_request(SRpnt); in __os_scsi_tape_open()
4831 struct osst_request * SRpnt = NULL; in os_scsi_tape_flush() local
4839 result = osst_flush_write_buffer(STp, &SRpnt); in os_scsi_tape_flush()
4853 result = osst_write_trailer(STp, &SRpnt, !(STp->rew_at_close)); in os_scsi_tape_flush()
4864 result = osst_flush_buffer(STp, &SRpnt, 0); /* this is the default path */ in os_scsi_tape_flush()
4866 result = cross_eof(STp, &SRpnt, 0); in os_scsi_tape_flush()
4878 !(result = cross_eof(STp, &SRpnt, 1))) || in os_scsi_tape_flush()
4889 result2 = osst_position_tape_and_confirm(STp, &SRpnt, STp->first_data_ppos); in os_scsi_tape_flush()
4894 if (SRpnt) osst_release_request(SRpnt); in os_scsi_tape_flush()
4947 struct osst_request * SRpnt = NULL; in osst_ioctl() local
5038 i = osst_flush_buffer(STp, &SRpnt, i); in osst_ioctl()
5085 i = osst_write_trailer(STp, &SRpnt, in osst_ioctl()
5124 if ((i = osst_int_ioctl(STp, &SRpnt, MTREW, 0)) < 0 /*|| in osst_ioctl()
5143 i = osst_set_frame_position(STp, &SRpnt, mtc.mt_count, 0); in osst_ioctl()
5145 i = osst_seek_sector(STp, &SRpnt, mtc.mt_count); in osst_ioctl()
5158 cross_eof(STp, &SRpnt, 0); in osst_ioctl()
5165 retval = osst_int_ioctl(STp, &SRpnt, mtc.mt_op, mtc.mt_count); in osst_ioctl()
5174 if ((i = osst_flush_buffer(STp, &SRpnt, 0)) < 0) { in osst_ioctl()
5251 blk = osst_get_frame_position(STp, &SRpnt); in osst_ioctl()
5253 blk = osst_get_sector(STp, &SRpnt); in osst_ioctl()
5264 if (SRpnt) osst_release_request(SRpnt); in osst_ioctl()
5273 if (SRpnt) osst_release_request(SRpnt); in osst_ioctl()