tag | line | file | source code |
STp | 181 | drivers/scsi/st.c | Scsi_Tape * STp; |
STp | 184 | drivers/scsi/st.c | STp = &(scsi_tapes[st_nbr]); |
STp | 185 | drivers/scsi/st.c | if ((STp->buffer)->writing && |
STp | 197 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; /* Error */ |
STp | 199 | drivers/scsi/st.c | (STp->buffer)->last_result = INT_MAX; /* OK */ |
STp | 202 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; |
STp | 203 | drivers/scsi/st.c | if ((STp->buffer)->writing) { |
STp | 205 | drivers/scsi/st.c | (STp->buffer)->last_result_fatal = st_chk_result(SCpnt); |
STp | 212 | drivers/scsi/st.c | STp->write_pending = 0; |
STp | 226 | drivers/scsi/st.c | st_do_scsi(Scsi_Cmnd *SCpnt, Scsi_Tape *STp, unsigned char *cmd, int bytes, |
STp | 230 | drivers/scsi/st.c | if ((SCpnt = allocate_device(NULL, STp->device, 1)) == NULL) { |
STp | 231 | drivers/scsi/st.c | printk("st%d: Can't get SCSI request.\n", TAPE_NR(STp->devt)); |
STp | 236 | drivers/scsi/st.c | STp->sem = MUTEX_LOCKED; |
STp | 237 | drivers/scsi/st.c | SCpnt->request.sem = &(STp->sem); |
STp | 239 | drivers/scsi/st.c | SCpnt->request.rq_dev = STp->devt; |
STp | 241 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, (void *)cmd, (STp->buffer)->b_data, bytes, |
STp | 246 | drivers/scsi/st.c | (STp->buffer)->last_result_fatal = st_chk_result(SCpnt); |
STp | 254 | drivers/scsi/st.c | write_behind_check(Scsi_Tape *STp) |
STp | 258 | drivers/scsi/st.c | STbuffer = STp->buffer; |
STp | 261 | drivers/scsi/st.c | if (STp->write_pending) |
STp | 262 | drivers/scsi/st.c | STp->nbr_waits++; |
STp | 264 | drivers/scsi/st.c | STp->nbr_finished++; |
STp | 267 | drivers/scsi/st.c | down(&(STp->sem)); |
STp | 274 | drivers/scsi/st.c | if (STp->drv_block >= 0) { |
STp | 275 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 276 | drivers/scsi/st.c | STp->drv_block++; |
STp | 278 | drivers/scsi/st.c | STp->drv_block += STbuffer->writing / STp->block_size; |
STp | 289 | drivers/scsi/st.c | back_over_eof(Scsi_Tape *STp) |
STp | 299 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_TIMEOUT, MAX_RETRIES); |
STp | 304 | drivers/scsi/st.c | if ((STp->buffer)->last_result != 0) { |
STp | 305 | drivers/scsi/st.c | printk("st%d: Backing over filemark failed.\n", TAPE_NR(STp->devt)); |
STp | 306 | drivers/scsi/st.c | if ((STp->mt_status)->mt_fileno >= 0) |
STp | 307 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno += 1; |
STp | 308 | drivers/scsi/st.c | (STp->mt_status)->mt_blkno = 0; |
STp | 311 | drivers/scsi/st.c | return (STp->buffer)->last_result_fatal; |
STp | 317 | drivers/scsi/st.c | flush_write_buffer(Scsi_Tape *STp) |
STp | 324 | drivers/scsi/st.c | if ((STp->buffer)->writing) { |
STp | 325 | drivers/scsi/st.c | write_behind_check(STp); |
STp | 326 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal) { |
STp | 329 | drivers/scsi/st.c | printk("st%d: Async write error (flush) %x.\n", TAPE_NR(STp->devt), |
STp | 330 | drivers/scsi/st.c | (STp->buffer)->last_result); |
STp | 332 | drivers/scsi/st.c | if ((STp->buffer)->last_result == INT_MAX) |
STp | 338 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 342 | drivers/scsi/st.c | if (STp->dirty == 1) { |
STp | 344 | drivers/scsi/st.c | offset = (STp->buffer)->buffer_bytes; |
STp | 345 | drivers/scsi/st.c | transfer = ((offset + STp->block_size - 1) / |
STp | 346 | drivers/scsi/st.c | STp->block_size) * STp->block_size; |
STp | 349 | drivers/scsi/st.c | printk("st%d: Flushing %d bytes.\n", TAPE_NR(STp->devt), transfer); |
STp | 351 | drivers/scsi/st.c | memset((STp->buffer)->b_data + offset, 0, transfer - offset); |
STp | 356 | drivers/scsi/st.c | blks = transfer / STp->block_size; |
STp | 361 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, transfer, ST_TIMEOUT, MAX_WRITE_RETRIES); |
STp | 365 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal != 0) { |
STp | 366 | drivers/scsi/st.c | printk("st%d: Error on flush.\n", TAPE_NR(STp->devt)); |
STp | 370 | drivers/scsi/st.c | STp->dirty = 0; |
STp | 371 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = 0; |
STp | 376 | drivers/scsi/st.c | STp->drv_block = (-1); |
STp | 379 | drivers/scsi/st.c | if (STp->drv_block >= 0) |
STp | 380 | drivers/scsi/st.c | STp->drv_block += blks; |
STp | 381 | drivers/scsi/st.c | STp->dirty = 0; |
STp | 382 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = 0; |
STp | 396 | drivers/scsi/st.c | Scsi_Tape * STp; |
STp | 400 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
STp | 401 | drivers/scsi/st.c | STbuffer = STp->buffer; |
STp | 407 | drivers/scsi/st.c | if( STp->device->was_reset ) |
STp | 410 | drivers/scsi/st.c | if (STp->ready != ST_READY) |
STp | 413 | drivers/scsi/st.c | if (STp->rw == ST_WRITING) /* Writing */ |
STp | 414 | drivers/scsi/st.c | return flush_write_buffer(STp); |
STp | 416 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 419 | drivers/scsi/st.c | backspace = ((STp->buffer)->buffer_bytes + |
STp | 420 | drivers/scsi/st.c | (STp->buffer)->read_pointer) / STp->block_size - |
STp | 421 | drivers/scsi/st.c | ((STp->buffer)->read_pointer + STp->block_size - 1) / |
STp | 422 | drivers/scsi/st.c | STp->block_size; |
STp | 423 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = 0; |
STp | 424 | drivers/scsi/st.c | (STp->buffer)->read_pointer = 0; |
STp | 427 | drivers/scsi/st.c | if ((STp->eof == ST_FM) && !STp->eof_hit) { |
STp | 428 | drivers/scsi/st.c | result = back_over_eof(STp); /* Back over the EOF hit */ |
STp | 430 | drivers/scsi/st.c | STp->eof = ST_NOEOF; |
STp | 431 | drivers/scsi/st.c | STp->eof_hit = 0; |
STp | 450 | drivers/scsi/st.c | Scsi_Tape * STp; |
STp | 455 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
STp | 456 | drivers/scsi/st.c | if (STp->in_use) { |
STp | 466 | drivers/scsi/st.c | STp->buffer = new_tape_buffer(FALSE); |
STp | 467 | drivers/scsi/st.c | if (STp->buffer == NULL) { |
STp | 473 | drivers/scsi/st.c | STp->buffer = st_buffers[i]; |
STp | 474 | drivers/scsi/st.c | (STp->buffer)->in_use = 1; |
STp | 475 | drivers/scsi/st.c | (STp->buffer)->writing = 0; |
STp | 476 | drivers/scsi/st.c | STp->in_use = 1; |
STp | 479 | drivers/scsi/st.c | STp->write_prot = ((flags & O_ACCMODE) == O_RDONLY); |
STp | 481 | drivers/scsi/st.c | STp->dirty = 0; |
STp | 482 | drivers/scsi/st.c | STp->rw = ST_IDLE; |
STp | 483 | drivers/scsi/st.c | STp->ready = ST_READY; |
STp | 484 | drivers/scsi/st.c | if (STp->eof != ST_EOD) /* Save EOD across opens */ |
STp | 485 | drivers/scsi/st.c | STp->eof = ST_NOEOF; |
STp | 486 | drivers/scsi/st.c | STp->eof_hit = 0; |
STp | 487 | drivers/scsi/st.c | STp->recover_count = 0; |
STp | 489 | drivers/scsi/st.c | STp->nbr_waits = STp->nbr_finished = 0; |
STp | 495 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_LONG_TIMEOUT, MAX_READY_RETRIES); |
STp | 501 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = 0 ; |
STp | 505 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, 0, ST_LONG_TIMEOUT, MAX_READY_RETRIES); |
STp | 507 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = STp->drv_block = 0; |
STp | 508 | drivers/scsi/st.c | STp->eof = ST_NOEOF; |
STp | 509 | drivers/scsi/st.c | (STp->device)->was_reset = 0; |
STp | 512 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal != 0) { |
STp | 515 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = STp->drv_block = 0 ; |
STp | 517 | drivers/scsi/st.c | STp->ready = ST_NO_TAPE; |
STp | 519 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = STp->drv_block = (-1); |
STp | 520 | drivers/scsi/st.c | STp->ready = ST_NOT_READY; |
STp | 523 | drivers/scsi/st.c | STp->density = 0; /* Clear the erroneous "residue" */ |
STp | 524 | drivers/scsi/st.c | STp->write_prot = 0; |
STp | 525 | drivers/scsi/st.c | STp->block_size = 0; |
STp | 526 | drivers/scsi/st.c | STp->eof = ST_NOEOF; |
STp | 527 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = STp->drv_block = 0; |
STp | 528 | drivers/scsi/st.c | STp->door_locked = ST_UNLOCKED; |
STp | 538 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, 6, ST_TIMEOUT, MAX_READY_RETRIES); |
STp | 541 | drivers/scsi/st.c | STp->max_block = ((STp->buffer)->b_data[1] << 16) | |
STp | 542 | drivers/scsi/st.c | ((STp->buffer)->b_data[2] << 8) | (STp->buffer)->b_data[3]; |
STp | 543 | drivers/scsi/st.c | STp->min_block = ((STp->buffer)->b_data[4] << 8) | |
STp | 544 | drivers/scsi/st.c | (STp->buffer)->b_data[5]; |
STp | 547 | drivers/scsi/st.c | printk("st%d: Block limits %d - %d bytes.\n", dev, STp->min_block, |
STp | 548 | drivers/scsi/st.c | STp->max_block); |
STp | 552 | drivers/scsi/st.c | STp->min_block = STp->max_block = (-1); |
STp | 563 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, 12, ST_TIMEOUT, MAX_READY_RETRIES); |
STp | 565 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal != 0) { |
STp | 570 | drivers/scsi/st.c | STp->block_size = ST_DEFAULT_BLOCK; /* Educated guess (?) */ |
STp | 571 | drivers/scsi/st.c | (STp->buffer)->last_result_fatal = 0; /* Prevent error propagation */ |
STp | 572 | drivers/scsi/st.c | STp->drv_write_prot = 0; |
STp | 579 | drivers/scsi/st.c | (STp->buffer)->b_data[0], (STp->buffer)->b_data[1], |
STp | 580 | drivers/scsi/st.c | (STp->buffer)->b_data[2], (STp->buffer)->b_data[3]); |
STp | 583 | drivers/scsi/st.c | if ((STp->buffer)->b_data[3] >= 8) { |
STp | 584 | drivers/scsi/st.c | STp->drv_buffer = ((STp->buffer)->b_data[2] >> 4) & 7; |
STp | 585 | drivers/scsi/st.c | STp->density = (STp->buffer)->b_data[4]; |
STp | 586 | drivers/scsi/st.c | STp->block_size = (STp->buffer)->b_data[9] * 65536 + |
STp | 587 | drivers/scsi/st.c | (STp->buffer)->b_data[10] * 256 + (STp->buffer)->b_data[11]; |
STp | 591 | drivers/scsi/st.c | dev, STp->density, (STp->buffer)->b_data[5] * 65536 + |
STp | 592 | drivers/scsi/st.c | (STp->buffer)->b_data[6] * 256 + (STp->buffer)->b_data[7], |
STp | 593 | drivers/scsi/st.c | STp->drv_buffer); |
STp | 597 | drivers/scsi/st.c | if (STp->block_size > (STp->buffer)->buffer_size && |
STp | 598 | drivers/scsi/st.c | !enlarge_buffer(STp->buffer, STp->block_size)) { |
STp | 600 | drivers/scsi/st.c | STp->block_size); |
STp | 601 | drivers/scsi/st.c | (STp->buffer)->in_use = 0; |
STp | 602 | drivers/scsi/st.c | STp->in_use = 0; |
STp | 605 | drivers/scsi/st.c | STp->drv_write_prot = ((STp->buffer)->b_data[2] & 0x80) != 0; |
STp | 609 | drivers/scsi/st.c | if (STp->block_size > 0) |
STp | 610 | drivers/scsi/st.c | (STp->buffer)->buffer_blocks = st_buffer_size / STp->block_size; |
STp | 612 | drivers/scsi/st.c | (STp->buffer)->buffer_blocks = 1; |
STp | 613 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = (STp->buffer)->read_pointer = 0; |
STp | 618 | drivers/scsi/st.c | STp->block_size, (STp->buffer)->buffer_size, |
STp | 619 | drivers/scsi/st.c | (STp->buffer)->buffer_blocks); |
STp | 622 | drivers/scsi/st.c | if (STp->drv_write_prot) { |
STp | 623 | drivers/scsi/st.c | STp->write_prot = 1; |
STp | 629 | drivers/scsi/st.c | (STp->buffer)->in_use = 0; |
STp | 630 | drivers/scsi/st.c | STp->buffer = 0; |
STp | 631 | drivers/scsi/st.c | STp->in_use = 0; |
STp | 652 | drivers/scsi/st.c | Scsi_Tape * STp; |
STp | 659 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
STp | 661 | drivers/scsi/st.c | if ( STp->rw == ST_WRITING && !(STp->device)->was_reset) { |
STp | 663 | drivers/scsi/st.c | result = flush_write_buffer(STp); |
STp | 669 | drivers/scsi/st.c | STp->nbr_waits, STp->nbr_finished); |
STp | 677 | drivers/scsi/st.c | cmd[4] = 1 + STp->two_fm; |
STp | 679 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_TIMEOUT, MAX_WRITE_RETRIES); |
STp | 685 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal != 0) |
STp | 688 | drivers/scsi/st.c | if ((STp->mt_status)->mt_fileno >= 0) |
STp | 689 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno++ ; |
STp | 690 | drivers/scsi/st.c | STp->drv_block = 0; |
STp | 691 | drivers/scsi/st.c | if (STp->two_fm) |
STp | 692 | drivers/scsi/st.c | back_over_eof(STp); |
STp | 705 | drivers/scsi/st.c | if ((STp->eof == ST_FM) && !STp->eof_hit) |
STp | 706 | drivers/scsi/st.c | back_over_eof(STp); |
STp | 713 | drivers/scsi/st.c | if (STp->door_locked == ST_LOCKED_AUTO) |
STp | 716 | drivers/scsi/st.c | if (STp->buffer != NULL) { |
STp | 717 | drivers/scsi/st.c | normalize_buffer(STp->buffer); |
STp | 718 | drivers/scsi/st.c | (STp->buffer)->in_use = 0; |
STp | 720 | drivers/scsi/st.c | STp->in_use = 0; |
STp | 740 | drivers/scsi/st.c | Scsi_Tape * STp; |
STp | 743 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
STp | 744 | drivers/scsi/st.c | if (STp->ready != ST_READY) |
STp | 751 | drivers/scsi/st.c | if( STp->device->was_reset ) |
STp | 755 | drivers/scsi/st.c | if (!STp->in_use) { |
STp | 761 | drivers/scsi/st.c | if (STp->write_prot) |
STp | 764 | drivers/scsi/st.c | if (STp->block_size == 0 && |
STp | 765 | drivers/scsi/st.c | count > (STp->buffer)->buffer_size && |
STp | 766 | drivers/scsi/st.c | !enlarge_buffer(STp->buffer, count)) |
STp | 769 | drivers/scsi/st.c | if (STp->do_auto_lock && STp->door_locked == ST_UNLOCKED && |
STp | 771 | drivers/scsi/st.c | STp->door_locked = ST_LOCKED_AUTO; |
STp | 773 | drivers/scsi/st.c | if (STp->rw == ST_READING) { |
STp | 777 | drivers/scsi/st.c | STp->rw = ST_WRITING; |
STp | 780 | drivers/scsi/st.c | if (STp->moves_after_eof < 255) |
STp | 781 | drivers/scsi/st.c | STp->moves_after_eof++; |
STp | 783 | drivers/scsi/st.c | if ((STp->buffer)->writing) { |
STp | 784 | drivers/scsi/st.c | write_behind_check(STp); |
STp | 785 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal) { |
STp | 789 | drivers/scsi/st.c | (STp->buffer)->last_result); |
STp | 791 | drivers/scsi/st.c | if ((STp->buffer)->last_result == INT_MAX) { |
STp | 793 | drivers/scsi/st.c | STp->eof = ST_EOM_OK; |
STp | 801 | drivers/scsi/st.c | if (STp->eof == ST_EOM_OK) |
STp | 803 | drivers/scsi/st.c | else if (STp->eof == ST_EOM_ERROR) |
STp | 806 | drivers/scsi/st.c | if (!STp->do_buffer_writes) { |
STp | 807 | drivers/scsi/st.c | if (STp->block_size != 0 && (count % STp->block_size) != 0) |
STp | 812 | drivers/scsi/st.c | write_threshold = (STp->buffer)->buffer_blocks * STp->block_size; |
STp | 813 | drivers/scsi/st.c | if (!STp->do_async_writes) |
STp | 820 | drivers/scsi/st.c | cmd[1] = (STp->block_size != 0); |
STp | 822 | drivers/scsi/st.c | STp->rw = ST_WRITING; |
STp | 825 | drivers/scsi/st.c | while((STp->block_size == 0 && !STp->do_async_writes && count > 0) || |
STp | 826 | drivers/scsi/st.c | (STp->block_size != 0 && |
STp | 827 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes + count > write_threshold)) |
STp | 830 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 833 | drivers/scsi/st.c | do_count = (STp->buffer)->buffer_blocks * STp->block_size - |
STp | 834 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes; |
STp | 838 | drivers/scsi/st.c | memcpy_fromfs((STp->buffer)->b_data + |
STp | 839 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes, b_point, do_count); |
STp | 841 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 844 | drivers/scsi/st.c | blks = ((STp->buffer)->buffer_bytes + do_count) / |
STp | 845 | drivers/scsi/st.c | STp->block_size; |
STp | 846 | drivers/scsi/st.c | transfer = blks * STp->block_size; |
STp | 852 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, transfer, ST_TIMEOUT, MAX_WRITE_RETRIES); |
STp | 856 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal != 0) { |
STp | 863 | drivers/scsi/st.c | if (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0) |
STp | 867 | drivers/scsi/st.c | else if (STp->block_size == 0 && |
STp | 872 | drivers/scsi/st.c | if (STp->block_size != 0) |
STp | 873 | drivers/scsi/st.c | transfer *= STp->block_size; |
STp | 877 | drivers/scsi/st.c | if (STp->drv_block >= 0) { |
STp | 878 | drivers/scsi/st.c | if (STp->block_size == 0 && transfer < do_count) |
STp | 879 | drivers/scsi/st.c | STp->drv_block++; |
STp | 880 | drivers/scsi/st.c | else if (STp->block_size != 0) |
STp | 881 | drivers/scsi/st.c | STp->drv_block += (do_count - transfer) / STp->block_size; |
STp | 883 | drivers/scsi/st.c | STp->eof = ST_EOM_OK; |
STp | 892 | drivers/scsi/st.c | STp->eof = ST_EOM_ERROR; |
STp | 893 | drivers/scsi/st.c | STp->drv_block = (-1); /* Too cautious? */ |
STp | 902 | drivers/scsi/st.c | STp->drv_block = (-1); /* Too cautious? */ |
STp | 907 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = 0; |
STp | 908 | drivers/scsi/st.c | STp->dirty = 0; |
STp | 917 | drivers/scsi/st.c | if (STp->drv_block >= 0) { |
STp | 918 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 919 | drivers/scsi/st.c | STp->drv_block++; |
STp | 921 | drivers/scsi/st.c | STp->drv_block += blks; |
STp | 923 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = 0; |
STp | 924 | drivers/scsi/st.c | STp->dirty = 0; |
STp | 927 | drivers/scsi/st.c | STp->dirty = 1; |
STp | 928 | drivers/scsi/st.c | memcpy_fromfs((STp->buffer)->b_data + |
STp | 929 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes,b_point,count); |
STp | 931 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes += count; |
STp | 935 | drivers/scsi/st.c | if (doing_write && (STp->buffer)->last_result_fatal != 0) { |
STp | 937 | drivers/scsi/st.c | return (STp->buffer)->last_result_fatal; |
STp | 940 | drivers/scsi/st.c | if (STp->do_async_writes && |
STp | 941 | drivers/scsi/st.c | ((STp->buffer)->buffer_bytes >= STp->write_threshold || |
STp | 942 | drivers/scsi/st.c | STp->block_size == 0) ) { |
STp | 945 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
STp | 949 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 950 | drivers/scsi/st.c | (STp->buffer)->writing = (STp->buffer)->buffer_bytes; |
STp | 952 | drivers/scsi/st.c | (STp->buffer)->writing = ((STp->buffer)->buffer_bytes / |
STp | 953 | drivers/scsi/st.c | STp->block_size) * STp->block_size; |
STp | 954 | drivers/scsi/st.c | STp->dirty = !((STp->buffer)->writing == |
STp | 955 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes); |
STp | 957 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 958 | drivers/scsi/st.c | blks = (STp->buffer)->writing; |
STp | 960 | drivers/scsi/st.c | blks = (STp->buffer)->writing / STp->block_size; |
STp | 964 | drivers/scsi/st.c | STp->sem = MUTEX_LOCKED; |
STp | 965 | drivers/scsi/st.c | SCpnt->request.sem = &(STp->sem); |
STp | 967 | drivers/scsi/st.c | SCpnt->request.rq_dev = STp->devt; |
STp | 969 | drivers/scsi/st.c | STp->write_pending = 1; |
STp | 973 | drivers/scsi/st.c | (void *) cmd, (STp->buffer)->b_data, |
STp | 974 | drivers/scsi/st.c | (STp->buffer)->writing, |
STp | 980 | drivers/scsi/st.c | STp->at_sm &= (total != 0); |
STp | 993 | drivers/scsi/st.c | Scsi_Tape * STp; |
STp | 996 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
STp | 997 | drivers/scsi/st.c | if (STp->ready != ST_READY) |
STp | 1000 | drivers/scsi/st.c | if (!STp->in_use) { |
STp | 1006 | drivers/scsi/st.c | if (STp->block_size == 0 && |
STp | 1007 | drivers/scsi/st.c | count > (STp->buffer)->buffer_size && |
STp | 1008 | drivers/scsi/st.c | !enlarge_buffer(STp->buffer, count)) |
STp | 1011 | drivers/scsi/st.c | if (!(STp->do_read_ahead) && STp->block_size != 0 && |
STp | 1012 | drivers/scsi/st.c | (count % STp->block_size) != 0) |
STp | 1015 | drivers/scsi/st.c | if (STp->do_auto_lock && STp->door_locked == ST_UNLOCKED && |
STp | 1017 | drivers/scsi/st.c | STp->door_locked = ST_LOCKED_AUTO; |
STp | 1019 | drivers/scsi/st.c | if (STp->rw == ST_WRITING) { |
STp | 1023 | drivers/scsi/st.c | STp->rw = ST_READING; |
STp | 1025 | drivers/scsi/st.c | if (STp->moves_after_eof < 255) |
STp | 1026 | drivers/scsi/st.c | STp->moves_after_eof++; |
STp | 1029 | drivers/scsi/st.c | if (debugging && STp->eof != ST_NOEOF) |
STp | 1031 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes); |
STp | 1033 | drivers/scsi/st.c | if (((STp->buffer)->buffer_bytes == 0) && |
STp | 1034 | drivers/scsi/st.c | (STp->eof == ST_EOM_OK || STp->eof == ST_EOD)) |
STp | 1037 | drivers/scsi/st.c | STp->rw = ST_READING; |
STp | 1041 | drivers/scsi/st.c | if ((STp->buffer)->buffer_bytes == 0 && |
STp | 1042 | drivers/scsi/st.c | STp->eof == ST_NOEOF) { |
STp | 1046 | drivers/scsi/st.c | cmd[1] = (STp->block_size != 0); |
STp | 1047 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 1050 | drivers/scsi/st.c | if (STp->do_read_ahead) { |
STp | 1051 | drivers/scsi/st.c | blks = (STp->buffer)->buffer_blocks; |
STp | 1052 | drivers/scsi/st.c | bytes = blks * STp->block_size; |
STp | 1056 | drivers/scsi/st.c | if (bytes > (STp->buffer)->buffer_size) |
STp | 1057 | drivers/scsi/st.c | bytes = (STp->buffer)->buffer_size; |
STp | 1058 | drivers/scsi/st.c | blks = bytes / STp->block_size; |
STp | 1059 | drivers/scsi/st.c | bytes = blks * STp->block_size; |
STp | 1066 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, bytes, ST_TIMEOUT, MAX_RETRIES); |
STp | 1070 | drivers/scsi/st.c | (STp->buffer)->read_pointer = 0; |
STp | 1071 | drivers/scsi/st.c | STp->eof_hit = 0; |
STp | 1072 | drivers/scsi/st.c | STp->at_sm = 0; |
STp | 1074 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal) { |
STp | 1093 | drivers/scsi/st.c | if (STp->block_size == 0 && |
STp | 1098 | drivers/scsi/st.c | if (STp->block_size == 0) { |
STp | 1101 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = bytes - transfer; |
STp | 1110 | drivers/scsi/st.c | STp->eof = ST_EOM_OK; |
STp | 1111 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 1112 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = bytes - transfer; |
STp | 1114 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = |
STp | 1115 | drivers/scsi/st.c | bytes - transfer * STp->block_size; |
STp | 1119 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes); |
STp | 1123 | drivers/scsi/st.c | STp->eof = ST_FM; |
STp | 1124 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 1125 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = 0; |
STp | 1127 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = |
STp | 1128 | drivers/scsi/st.c | bytes - transfer * STp->block_size; |
STp | 1133 | drivers/scsi/st.c | dev, (STp->buffer)->buffer_bytes, total); |
STp | 1143 | drivers/scsi/st.c | STp->drv_block = (-1); |
STp | 1146 | drivers/scsi/st.c | else if (STp->moves_after_eof == 1 && |
STp | 1153 | drivers/scsi/st.c | STp->eof = ST_EOD; |
STp | 1161 | drivers/scsi/st.c | transfer = (STp->buffer)->last_result_fatal; |
STp | 1167 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = bytes; |
STp | 1169 | drivers/scsi/st.c | if (STp->drv_block >= 0) { |
STp | 1170 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 1171 | drivers/scsi/st.c | STp->drv_block++; |
STp | 1173 | drivers/scsi/st.c | STp->drv_block += (STp->buffer)->buffer_bytes / STp->block_size; |
STp | 1179 | drivers/scsi/st.c | if ((STp->buffer)->buffer_bytes > 0) { |
STp | 1181 | drivers/scsi/st.c | if (debugging && STp->eof != ST_NOEOF) |
STp | 1183 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes, count - total); |
STp | 1185 | drivers/scsi/st.c | transfer = (STp->buffer)->buffer_bytes < count - total ? |
STp | 1186 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes : count - total; |
STp | 1187 | drivers/scsi/st.c | memcpy_tofs(buf, (STp->buffer)->b_data + |
STp | 1188 | drivers/scsi/st.c | (STp->buffer)->read_pointer,transfer); |
STp | 1192 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes -= transfer; |
STp | 1193 | drivers/scsi/st.c | (STp->buffer)->read_pointer += transfer; |
STp | 1195 | drivers/scsi/st.c | else if (STp->eof != ST_NOEOF) { |
STp | 1196 | drivers/scsi/st.c | STp->eof_hit = 1; |
STp | 1199 | drivers/scsi/st.c | if (total == 0 && STp->eof == ST_FM) { |
STp | 1200 | drivers/scsi/st.c | STp->eof = ST_NOEOF; |
STp | 1201 | drivers/scsi/st.c | STp->drv_block = 0; |
STp | 1202 | drivers/scsi/st.c | if (STp->moves_after_eof > 1) |
STp | 1203 | drivers/scsi/st.c | STp->moves_after_eof = 0; |
STp | 1204 | drivers/scsi/st.c | if ((STp->mt_status)->mt_fileno >= 0) |
STp | 1205 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno++; |
STp | 1207 | drivers/scsi/st.c | if (total == 0 && STp->eof == ST_EOM_OK) |
STp | 1212 | drivers/scsi/st.c | if (STp->block_size == 0) |
STp | 1230 | drivers/scsi/st.c | Scsi_Tape *STp; |
STp | 1233 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
STp | 1235 | drivers/scsi/st.c | STp->do_buffer_writes = (options & MT_ST_BUFFER_WRITES) != 0; |
STp | 1236 | drivers/scsi/st.c | STp->do_async_writes = (options & MT_ST_ASYNC_WRITES) != 0; |
STp | 1237 | drivers/scsi/st.c | STp->do_read_ahead = (options & MT_ST_READ_AHEAD) != 0; |
STp | 1238 | drivers/scsi/st.c | STp->two_fm = (options & MT_ST_TWO_FM) != 0; |
STp | 1239 | drivers/scsi/st.c | STp->fast_mteom = (options & MT_ST_FAST_MTEOM) != 0; |
STp | 1240 | drivers/scsi/st.c | STp->do_auto_lock = (options & MT_ST_AUTO_LOCK) != 0; |
STp | 1245 | drivers/scsi/st.c | dev, STp->do_buffer_writes, STp->do_async_writes, |
STp | 1246 | drivers/scsi/st.c | STp->do_read_ahead); |
STp | 1248 | drivers/scsi/st.c | STp->two_fm, STp->fast_mteom, STp->do_auto_lock, debugging); |
STp | 1258 | drivers/scsi/st.c | STp->write_threshold = value; |
STp | 1261 | drivers/scsi/st.c | STp->write_threshold); |
STp | 1281 | drivers/scsi/st.c | Scsi_Tape * STp; |
STp | 1285 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
STp | 1286 | drivers/scsi/st.c | if (STp->ready != ST_READY && cmd_in != MTLOAD) |
STp | 1288 | drivers/scsi/st.c | fileno = (STp->mt_status)->mt_fileno ; |
STp | 1289 | drivers/scsi/st.c | blkno = STp->drv_block; |
STp | 1290 | drivers/scsi/st.c | at_sm = STp->at_sm; |
STp | 1405 | drivers/scsi/st.c | if (STp->write_prot) |
STp | 1474 | drivers/scsi/st.c | if (!STp->fast_mteom) { |
STp | 1477 | drivers/scsi/st.c | fileno = (STp->mt_status)->mt_fileno ; |
STp | 1478 | drivers/scsi/st.c | if (STp->eof == ST_EOD || STp->eof == ST_EOM_OK) |
STp | 1497 | drivers/scsi/st.c | if (STp->write_prot) |
STp | 1542 | drivers/scsi/st.c | if ((STp->device)->scsi_level < SCSI_2) { |
STp | 1571 | drivers/scsi/st.c | if (STp->dirty || (STp->buffer)->buffer_bytes != 0) |
STp | 1575 | drivers/scsi/st.c | (arg < STp->min_block || arg > STp->max_block || |
STp | 1583 | drivers/scsi/st.c | memset((STp->buffer)->b_data, 0, 12); |
STp | 1585 | drivers/scsi/st.c | (STp->buffer)->b_data[2] = (arg & 7) << 4; |
STp | 1587 | drivers/scsi/st.c | (STp->buffer)->b_data[2] = |
STp | 1588 | drivers/scsi/st.c | STp->drv_buffer << 4; |
STp | 1589 | drivers/scsi/st.c | (STp->buffer)->b_data[3] = 8; /* block descriptor length */ |
STp | 1591 | drivers/scsi/st.c | (STp->buffer)->b_data[4] = arg; |
STp | 1593 | drivers/scsi/st.c | (STp->buffer)->b_data[4] = STp->density; |
STp | 1597 | drivers/scsi/st.c | ltmp = STp->block_size; |
STp | 1598 | drivers/scsi/st.c | (STp->buffer)->b_data[9] = (ltmp >> 16); |
STp | 1599 | drivers/scsi/st.c | (STp->buffer)->b_data[10] = (ltmp >> 8); |
STp | 1600 | drivers/scsi/st.c | (STp->buffer)->b_data[11] = ltmp; |
STp | 1606 | drivers/scsi/st.c | (STp->buffer)->b_data[9] * 65536 + |
STp | 1607 | drivers/scsi/st.c | (STp->buffer)->b_data[10] * 256 + |
STp | 1608 | drivers/scsi/st.c | (STp->buffer)->b_data[11]); |
STp | 1611 | drivers/scsi/st.c | (STp->buffer)->b_data[4]); |
STp | 1614 | drivers/scsi/st.c | ((STp->buffer)->b_data[2] >> 4) & 7); |
STp | 1623 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, datalen, timeout, MAX_RETRIES); |
STp | 1627 | drivers/scsi/st.c | ioctl_result = (STp->buffer)->last_result_fatal; |
STp | 1632 | drivers/scsi/st.c | STp->moves_after_eof = 0; |
STp | 1634 | drivers/scsi/st.c | STp->moves_after_eof = 1; |
STp | 1637 | drivers/scsi/st.c | STp->drv_block = blkno; |
STp | 1638 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = fileno; |
STp | 1639 | drivers/scsi/st.c | STp->at_sm = at_sm; |
STp | 1642 | drivers/scsi/st.c | STp->drv_block = (STp->mt_status)->mt_fileno = (-1); |
STp | 1643 | drivers/scsi/st.c | STp->at_sm = 0; |
STp | 1646 | drivers/scsi/st.c | STp->door_locked = ST_LOCKED_EXPLICIT; |
STp | 1648 | drivers/scsi/st.c | STp->door_locked = ST_UNLOCKED; |
STp | 1654 | drivers/scsi/st.c | STp->block_size = arg; |
STp | 1656 | drivers/scsi/st.c | (STp->buffer)->buffer_blocks = |
STp | 1657 | drivers/scsi/st.c | (STp->buffer)->buffer_size / STp->block_size; |
STp | 1658 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes = (STp->buffer)->read_pointer = 0; |
STp | 1661 | drivers/scsi/st.c | STp->drv_buffer = (arg & 7); |
STp | 1663 | drivers/scsi/st.c | STp->density = arg; |
STp | 1665 | drivers/scsi/st.c | STp->eof = ST_EOD; |
STp | 1666 | drivers/scsi/st.c | STp->eof_hit = 0; |
STp | 1669 | drivers/scsi/st.c | STp->eof = ST_NOEOF; |
STp | 1670 | drivers/scsi/st.c | STp->eof_hit = 0; |
STp | 1676 | drivers/scsi/st.c | STp->eof = ST_EOM_OK; |
STp | 1677 | drivers/scsi/st.c | STp->eof_hit = 0; |
STp | 1678 | drivers/scsi/st.c | STp->drv_block = 0; |
STp | 1687 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = fileno - undone ; |
STp | 1689 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = fileno; |
STp | 1690 | drivers/scsi/st.c | STp->drv_block = 0; |
STp | 1693 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = fileno + undone ; |
STp | 1694 | drivers/scsi/st.c | STp->drv_block = 0; |
STp | 1698 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno++; |
STp | 1699 | drivers/scsi/st.c | STp->drv_block = 0; |
STp | 1703 | drivers/scsi/st.c | STp->drv_block = blkno - undone; |
STp | 1705 | drivers/scsi/st.c | STp->drv_block = (-1); |
STp | 1710 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno--; |
STp | 1711 | drivers/scsi/st.c | STp->drv_block = (-1); |
STp | 1715 | drivers/scsi/st.c | STp->drv_block = blkno + undone; |
STp | 1717 | drivers/scsi/st.c | STp->drv_block = (-1); |
STp | 1721 | drivers/scsi/st.c | (STp->mt_status)->mt_fileno = (-1); |
STp | 1722 | drivers/scsi/st.c | STp->drv_block = (-1); |
STp | 1724 | drivers/scsi/st.c | if (STp->eof == ST_NOEOF && |
STp | 1726 | drivers/scsi/st.c | STp->eof = ST_EOD; |
STp | 1728 | drivers/scsi/st.c | STp->door_locked = ST_LOCK_FAILS; |
STp | 1746 | drivers/scsi/st.c | Scsi_Tape *STp; |
STp | 1749 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
STp | 1751 | drivers/scsi/st.c | if (debugging && !STp->in_use) { |
STp | 1763 | drivers/scsi/st.c | return scsi_ioctl(STp->device, cmd_in, (void *) arg); |
STp | 1778 | drivers/scsi/st.c | if (!(STp->device)->was_reset) { |
STp | 1799 | drivers/scsi/st.c | STp->device->was_reset = 0; |
STp | 1800 | drivers/scsi/st.c | if (STp->door_locked != ST_UNLOCKED && |
STp | 1801 | drivers/scsi/st.c | STp->door_locked != ST_LOCK_FAILS) { |
STp | 1804 | drivers/scsi/st.c | STp->door_locked = ST_UNLOCKED; |
STp | 1812 | drivers/scsi/st.c | STp->rw = ST_IDLE; /* Prevent automatic WEOF */ |
STp | 1814 | drivers/scsi/st.c | if (mtc.mt_op == MTOFFL && STp->door_locked != ST_UNLOCKED) |
STp | 1831 | drivers/scsi/st.c | (STp->mt_status)->mt_dsreg = |
STp | 1832 | drivers/scsi/st.c | ((STp->block_size << MT_ST_BLKSIZE_SHIFT) & MT_ST_BLKSIZE_MASK) | |
STp | 1833 | drivers/scsi/st.c | ((STp->density << MT_ST_DENSITY_SHIFT) & MT_ST_DENSITY_MASK); |
STp | 1834 | drivers/scsi/st.c | (STp->mt_status)->mt_blkno = STp->drv_block; |
STp | 1835 | drivers/scsi/st.c | if (STp->block_size != 0) { |
STp | 1836 | drivers/scsi/st.c | if (STp->rw == ST_WRITING) |
STp | 1837 | drivers/scsi/st.c | (STp->mt_status)->mt_blkno += |
STp | 1838 | drivers/scsi/st.c | (STp->buffer)->buffer_bytes / STp->block_size; |
STp | 1839 | drivers/scsi/st.c | else if (STp->rw == ST_READING) |
STp | 1840 | drivers/scsi/st.c | (STp->mt_status)->mt_blkno -= ((STp->buffer)->buffer_bytes + |
STp | 1841 | drivers/scsi/st.c | STp->block_size - 1) / STp->block_size; |
STp | 1844 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat = 0; |
STp | 1845 | drivers/scsi/st.c | if (STp->drv_write_prot) |
STp | 1846 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_WR_PROT(0xffffffff); |
STp | 1847 | drivers/scsi/st.c | if ((STp->mt_status)->mt_blkno == 0) { |
STp | 1848 | drivers/scsi/st.c | if ((STp->mt_status)->mt_fileno == 0) |
STp | 1849 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_BOT(0xffffffff); |
STp | 1851 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_EOF(0xffffffff); |
STp | 1853 | drivers/scsi/st.c | if (STp->eof == ST_EOM_OK || STp->eof == ST_EOM_ERROR) |
STp | 1854 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_EOT(0xffffffff); |
STp | 1855 | drivers/scsi/st.c | else if (STp->eof == ST_EOD) |
STp | 1856 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_EOD(0xffffffff); |
STp | 1857 | drivers/scsi/st.c | if (STp->density == 1) |
STp | 1858 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_D_800(0xffffffff); |
STp | 1859 | drivers/scsi/st.c | else if (STp->density == 2) |
STp | 1860 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_D_1600(0xffffffff); |
STp | 1861 | drivers/scsi/st.c | else if (STp->density == 3) |
STp | 1862 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_D_6250(0xffffffff); |
STp | 1863 | drivers/scsi/st.c | if (STp->ready == ST_READY) |
STp | 1864 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_ONLINE(0xffffffff); |
STp | 1865 | drivers/scsi/st.c | if (STp->ready == ST_NO_TAPE) |
STp | 1866 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_DR_OPEN(0xffffffff); |
STp | 1867 | drivers/scsi/st.c | if (STp->at_sm) |
STp | 1868 | drivers/scsi/st.c | (STp->mt_status)->mt_gstat |= GMT_SM(0xffffffff); |
STp | 1870 | drivers/scsi/st.c | memcpy_tofs((char *)arg, (char *)(STp->mt_status), |
STp | 1873 | drivers/scsi/st.c | (STp->mt_status)->mt_erreg = 0; /* Clear after read */ |
STp | 1877 | drivers/scsi/st.c | if (STp->ready != ST_READY) |
STp | 1895 | drivers/scsi/st.c | if ((STp->device)->scsi_level < SCSI_2) { |
STp | 1903 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, scmd, 20, ST_TIMEOUT, MAX_READY_RETRIES); |
STp | 1907 | drivers/scsi/st.c | if ((STp->buffer)->last_result_fatal != 0) { |
STp | 1917 | drivers/scsi/st.c | if ((STp->device)->scsi_level < SCSI_2) |
STp | 1918 | drivers/scsi/st.c | mt_pos.mt_blkno = ((STp->buffer)->b_data[0] << 16) |
STp | 1919 | drivers/scsi/st.c | + ((STp->buffer)->b_data[1] << 8) |
STp | 1920 | drivers/scsi/st.c | + (STp->buffer)->b_data[2]; |
STp | 1922 | drivers/scsi/st.c | mt_pos.mt_blkno = ((STp->buffer)->b_data[4] << 24) |
STp | 1923 | drivers/scsi/st.c | + ((STp->buffer)->b_data[5] << 16) |
STp | 1924 | drivers/scsi/st.c | + ((STp->buffer)->b_data[6] << 8) |
STp | 1925 | drivers/scsi/st.c | + (STp->buffer)->b_data[7]; |
STp | 1935 | drivers/scsi/st.c | return scsi_ioctl(STp->device, cmd_in, (void *) arg); |
STp | 2127 | drivers/scsi/st.c | Scsi_Tape * STp; |
STp | 2161 | drivers/scsi/st.c | STp = &(scsi_tapes[i]); |
STp | 2162 | drivers/scsi/st.c | STp->device = NULL; |
STp | 2163 | drivers/scsi/st.c | STp->capacity = 0xfffff; |
STp | 2164 | drivers/scsi/st.c | STp->dirty = 0; |
STp | 2165 | drivers/scsi/st.c | STp->rw = ST_IDLE; |
STp | 2166 | drivers/scsi/st.c | STp->eof = ST_NOEOF; |
STp | 2167 | drivers/scsi/st.c | STp->waiting = NULL; |
STp | 2168 | drivers/scsi/st.c | STp->in_use = 0; |
STp | 2169 | drivers/scsi/st.c | STp->drv_buffer = 1; /* Try buffering if no mode sense */ |
STp | 2170 | drivers/scsi/st.c | STp->density = 0; |
STp | 2171 | drivers/scsi/st.c | STp->do_buffer_writes = ST_BUFFER_WRITES; |
STp | 2172 | drivers/scsi/st.c | STp->do_async_writes = ST_ASYNC_WRITES; |
STp | 2173 | drivers/scsi/st.c | STp->do_read_ahead = ST_READ_AHEAD; |
STp | 2174 | drivers/scsi/st.c | STp->do_auto_lock = ST_AUTO_LOCK; |
STp | 2175 | drivers/scsi/st.c | STp->two_fm = ST_TWO_FM; |
STp | 2176 | drivers/scsi/st.c | STp->fast_mteom = ST_FAST_MTEOM; |
STp | 2177 | drivers/scsi/st.c | STp->write_threshold = st_write_threshold; |
STp | 2178 | drivers/scsi/st.c | STp->drv_block = 0; |
STp | 2179 | drivers/scsi/st.c | STp->moves_after_eof = 1; |
STp | 2180 | drivers/scsi/st.c | STp->at_sm = 0; |
STp | 2181 | drivers/scsi/st.c | STp->mt_status = (struct mtget *) scsi_init_malloc(sizeof(struct mtget), |