tag | line | file | source code |
scsi_tapes | 81 | kernel/blk_drv/scsi/st.c | static Scsi_Tape * scsi_tapes; |
scsi_tapes | 97 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[st_nbr].buffer->writing && |
scsi_tapes | 100 | kernel/blk_drv/scsi/st.c | scsi_tapes[st_nbr].buffer->last_result = 0x7fffffff; |
scsi_tapes | 102 | kernel/blk_drv/scsi/st.c | scsi_tapes[st_nbr].buffer->last_result = SCpnt->result; |
scsi_tapes | 103 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[st_nbr].buffer->writing) |
scsi_tapes | 107 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[st_nbr].buffer->writing <= 0) |
scsi_tapes | 108 | kernel/blk_drv/scsi/st.c | wake_up( &scsi_tapes[st_nbr].waiting ); |
scsi_tapes | 167 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->last_result < 0) { |
scsi_tapes | 168 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing = (- scsi_tapes[dev].buffer->writing); |
scsi_tapes | 169 | kernel/blk_drv/scsi/st.c | sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 170 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing = (- scsi_tapes[dev].buffer->writing); |
scsi_tapes | 174 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->writing < scsi_tapes[dev].buffer->buffer_bytes) |
scsi_tapes | 175 | kernel/blk_drv/scsi/st.c | memcpy(scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 176 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data + scsi_tapes[dev].buffer->writing, |
scsi_tapes | 177 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes - |
scsi_tapes | 178 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing); |
scsi_tapes | 179 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes -= scsi_tapes[dev].buffer->writing; |
scsi_tapes | 180 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing = 0; |
scsi_tapes | 196 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->writing) { |
scsi_tapes | 198 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->last_result) { |
scsi_tapes | 201 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->last_result); |
scsi_tapes | 209 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].dirty==1) { |
scsi_tapes | 210 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
scsi_tapes | 212 | kernel/blk_drv/scsi/st.c | offset = scsi_tapes[dev].buffer->buffer_bytes; |
scsi_tapes | 213 | kernel/blk_drv/scsi/st.c | transfer = ((offset + scsi_tapes[dev].block_size - 1) / |
scsi_tapes | 214 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size) * scsi_tapes[dev].block_size; |
scsi_tapes | 218 | kernel/blk_drv/scsi/st.c | memset(scsi_tapes[dev].buffer->b_data + offset, 0, transfer - offset); |
scsi_tapes | 224 | kernel/blk_drv/scsi/st.c | blks = transfer / scsi_tapes[dev].block_size; |
scsi_tapes | 230 | kernel/blk_drv/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, transfer, |
scsi_tapes | 233 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 243 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 0; |
scsi_tapes | 244 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
scsi_tapes | 262 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].rw == 2) /* Writing */ |
scsi_tapes | 265 | kernel/blk_drv/scsi/st.c | backspace = (scsi_tapes[dev].buffer->buffer_bytes + |
scsi_tapes | 266 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer) / scsi_tapes[dev].block_size - |
scsi_tapes | 267 | kernel/blk_drv/scsi/st.c | (scsi_tapes[dev].buffer->read_pointer + scsi_tapes[dev].block_size - 1) / |
scsi_tapes | 268 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size; |
scsi_tapes | 269 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
scsi_tapes | 270 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
scsi_tapes | 275 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 0; |
scsi_tapes | 276 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
scsi_tapes | 296 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].in_use) { |
scsi_tapes | 311 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer = st_buffers[i]; |
scsi_tapes | 312 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 1; |
scsi_tapes | 315 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].write_prot = ((flags & O_ACCMODE) == O_RDONLY); |
scsi_tapes | 317 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 0; |
scsi_tapes | 318 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 0; |
scsi_tapes | 319 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 0; |
scsi_tapes | 320 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
scsi_tapes | 322 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
scsi_tapes | 333 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 336 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 348 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 351 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 363 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
scsi_tapes | 364 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 0; |
scsi_tapes | 374 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 377 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 380 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].max_block = (scsi_tapes[dev].buffer->b_data[1] << 16) | |
scsi_tapes | 381 | kernel/blk_drv/scsi/st.c | (scsi_tapes[dev].buffer->b_data[2] << 8) | scsi_tapes[dev].buffer->b_data[3]; |
scsi_tapes | 382 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].min_block = (scsi_tapes[dev].buffer->b_data[4] << 8) | |
scsi_tapes | 383 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[5]; |
scsi_tapes | 385 | kernel/blk_drv/scsi/st.c | printk("st%d: Block limits %d - %d bytes.\n", dev, scsi_tapes[dev].min_block, |
scsi_tapes | 386 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].max_block); |
scsi_tapes | 390 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].min_block = scsi_tapes[dev].max_block = (-1); |
scsi_tapes | 402 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 405 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 412 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[2] = |
scsi_tapes | 413 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[3] = 0; |
scsi_tapes | 419 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[0], scsi_tapes[dev].buffer->b_data[1], |
scsi_tapes | 420 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[2], scsi_tapes[dev].buffer->b_data[3]); |
scsi_tapes | 423 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->b_data[3] >= 8) { |
scsi_tapes | 424 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size = scsi_tapes[dev].buffer->b_data[9] * 65536 + |
scsi_tapes | 425 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] * 256 + scsi_tapes[dev].buffer->b_data[11]; |
scsi_tapes | 428 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[4], scsi_tapes[dev].buffer->b_data[5] * |
scsi_tapes | 429 | kernel/blk_drv/scsi/st.c | 65536 + scsi_tapes[dev].buffer->b_data[6] * 256 + |
scsi_tapes | 430 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[7], scsi_tapes[dev].buffer->b_data[9] * |
scsi_tapes | 431 | kernel/blk_drv/scsi/st.c | 65536 + scsi_tapes[dev].buffer->b_data[10] * 256 + |
scsi_tapes | 432 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[11]); |
scsi_tapes | 434 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].block_size > ST_BUFFER_SIZE) { |
scsi_tapes | 436 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size); |
scsi_tapes | 437 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
scsi_tapes | 438 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 0; |
scsi_tapes | 442 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].block_size == 0) { |
scsi_tapes | 446 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
scsi_tapes | 447 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 0; |
scsi_tapes | 450 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size = ST_BLOCK_SIZE; |
scsi_tapes | 454 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size = ST_BLOCK_SIZE; |
scsi_tapes | 456 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks = |
scsi_tapes | 457 | kernel/blk_drv/scsi/st.c | ST_BUFFER_SIZE / scsi_tapes[dev].block_size; |
scsi_tapes | 458 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size = |
scsi_tapes | 459 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks * scsi_tapes[dev].block_size; |
scsi_tapes | 460 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = scsi_tapes[dev].buffer->read_pointer = 0; |
scsi_tapes | 464 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size, scsi_tapes[dev].buffer->buffer_size, |
scsi_tapes | 465 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks); |
scsi_tapes | 468 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->b_data[2] & 0x80) { |
scsi_tapes | 469 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].write_prot = 1; |
scsi_tapes | 492 | kernel/blk_drv/scsi/st.c | if ( scsi_tapes[dev].rw == 2) { |
scsi_tapes | 501 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
scsi_tapes | 509 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 512 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 528 | kernel/blk_drv/scsi/st.c | if ((scsi_tapes[dev].eof == 1) && !scsi_tapes[dev].eof_hit) |
scsi_tapes | 538 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
scsi_tapes | 539 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 0; |
scsi_tapes | 556 | kernel/blk_drv/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
scsi_tapes | 562 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].write_prot) |
scsi_tapes | 565 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].rw == 1) { |
scsi_tapes | 569 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 2; |
scsi_tapes | 573 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->writing) { |
scsi_tapes | 575 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->last_result) { |
scsi_tapes | 578 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->last_result); |
scsi_tapes | 589 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
scsi_tapes | 597 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 2; |
scsi_tapes | 600 | kernel/blk_drv/scsi/st.c | while((scsi_tapes[dev].buffer->buffer_bytes + count) >= |
scsi_tapes | 601 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size) { |
scsi_tapes | 602 | kernel/blk_drv/scsi/st.c | do_count = scsi_tapes[dev].buffer->buffer_size - |
scsi_tapes | 603 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes; |
scsi_tapes | 604 | kernel/blk_drv/scsi/st.c | memcpy_fromfs(scsi_tapes[dev].buffer->b_data + |
scsi_tapes | 605 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes,b_point,do_count); |
scsi_tapes | 607 | kernel/blk_drv/scsi/st.c | blks = scsi_tapes[dev].buffer->buffer_blocks; |
scsi_tapes | 614 | kernel/blk_drv/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 615 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size, |
scsi_tapes | 618 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 639 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
scsi_tapes | 640 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 0; |
scsi_tapes | 643 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 1; |
scsi_tapes | 644 | kernel/blk_drv/scsi/st.c | memcpy_fromfs(scsi_tapes[dev].buffer->b_data + |
scsi_tapes | 645 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes,b_point,count); |
scsi_tapes | 647 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes += count; |
scsi_tapes | 658 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes >= ST_WRITE_THRESHOLD) { |
scsi_tapes | 660 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing = (scsi_tapes[dev].buffer->buffer_bytes / |
scsi_tapes | 661 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size) * scsi_tapes[dev].block_size; |
scsi_tapes | 662 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 0; |
scsi_tapes | 664 | kernel/blk_drv/scsi/st.c | blks = scsi_tapes[dev].buffer->writing / scsi_tapes[dev].block_size; |
scsi_tapes | 668 | kernel/blk_drv/scsi/st.c | SCpnt->result = scsi_tapes[dev].buffer->last_result = -1; |
scsi_tapes | 672 | kernel/blk_drv/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 673 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing, |
scsi_tapes | 695 | kernel/blk_drv/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
scsi_tapes | 701 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].rw == 2) { |
scsi_tapes | 705 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 1; |
scsi_tapes | 709 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].eof) |
scsi_tapes | 711 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes); |
scsi_tapes | 713 | kernel/blk_drv/scsi/st.c | if ((scsi_tapes[dev].buffer->buffer_bytes == 0) && |
scsi_tapes | 714 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof == 2) /* EOM or Blank Check */ |
scsi_tapes | 717 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 1; |
scsi_tapes | 719 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
scsi_tapes | 723 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes == 0 && |
scsi_tapes | 724 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof == 0) { |
scsi_tapes | 729 | kernel/blk_drv/scsi/st.c | blks = scsi_tapes[dev].buffer->buffer_blocks; |
scsi_tapes | 737 | kernel/blk_drv/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 738 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size, |
scsi_tapes | 741 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 743 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
scsi_tapes | 744 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
scsi_tapes | 767 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 2; /* What should be done at EOM ? */ |
scsi_tapes | 768 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
scsi_tapes | 769 | kernel/blk_drv/scsi/st.c | (scsi_tapes[dev].buffer->buffer_blocks - transfer) * |
scsi_tapes | 770 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size; |
scsi_tapes | 773 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks - transfer); |
scsi_tapes | 777 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 1; |
scsi_tapes | 778 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
scsi_tapes | 779 | kernel/blk_drv/scsi/st.c | (scsi_tapes[dev].buffer->buffer_blocks - transfer) * |
scsi_tapes | 780 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size; |
scsi_tapes | 783 | kernel/blk_drv/scsi/st.c | dev, scsi_tapes[dev].buffer->buffer_blocks - transfer, total); |
scsi_tapes | 807 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
scsi_tapes | 808 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size; |
scsi_tapes | 812 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes > 0) { |
scsi_tapes | 814 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].eof) |
scsi_tapes | 816 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes, count - total); |
scsi_tapes | 818 | kernel/blk_drv/scsi/st.c | transfer = scsi_tapes[dev].buffer->buffer_bytes < count - total ? |
scsi_tapes | 819 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes : count - total; |
scsi_tapes | 820 | kernel/blk_drv/scsi/st.c | memcpy_tofs(buf, scsi_tapes[dev].buffer->b_data + |
scsi_tapes | 821 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer,transfer); |
scsi_tapes | 825 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes -= transfer; |
scsi_tapes | 826 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer += transfer; |
scsi_tapes | 828 | kernel/blk_drv/scsi/st.c | else if (scsi_tapes[dev].eof) { |
scsi_tapes | 829 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 1; |
scsi_tapes | 831 | kernel/blk_drv/scsi/st.c | if (total == 0 && scsi_tapes[dev].eof == 1) |
scsi_tapes | 832 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 0; |
scsi_tapes | 833 | kernel/blk_drv/scsi/st.c | if (total == 0 && scsi_tapes[dev].eof == 2) |
scsi_tapes | 914 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].write_prot) |
scsi_tapes | 971 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].write_prot) |
scsi_tapes | 980 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) { |
scsi_tapes | 1005 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].dirty || scsi_tapes[dev].buffer->buffer_bytes != 0) |
scsi_tapes | 1008 | kernel/blk_drv/scsi/st.c | (arg < scsi_tapes[dev].min_block || arg > scsi_tapes[dev].max_block || |
scsi_tapes | 1016 | kernel/blk_drv/scsi/st.c | memset(scsi_tapes[dev].buffer->b_data, 0, 12); |
scsi_tapes | 1017 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[2] = 0x10; /* buffered mode */ |
scsi_tapes | 1018 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[3] = 8; /* block descriptor length */ |
scsi_tapes | 1022 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[4] = arg; |
scsi_tapes | 1023 | kernel/blk_drv/scsi/st.c | ltmp = scsi_tapes[dev].block_size; |
scsi_tapes | 1025 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[9] = (ltmp >> 16); |
scsi_tapes | 1026 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] = (ltmp >> 8); |
scsi_tapes | 1027 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[11] = ltmp; |
scsi_tapes | 1032 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[9] * 65536 + |
scsi_tapes | 1033 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] * 256 + |
scsi_tapes | 1034 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[11]); |
scsi_tapes | 1037 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[4]); |
scsi_tapes | 1045 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
scsi_tapes | 1049 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, ST_BLOCK_SIZE, |
scsi_tapes | 1052 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 1064 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size = arg; |
scsi_tapes | 1065 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks = |
scsi_tapes | 1066 | kernel/blk_drv/scsi/st.c | ST_BUFFER_SIZE / scsi_tapes[dev].block_size; |
scsi_tapes | 1067 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size = |
scsi_tapes | 1068 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks * scsi_tapes[dev].block_size; |
scsi_tapes | 1069 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
scsi_tapes | 1070 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
scsi_tapes | 1073 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 2; |
scsi_tapes | 1074 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
scsi_tapes | 1077 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 0; |
scsi_tapes | 1078 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
scsi_tapes | 1100 | kernel/blk_drv/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
scsi_tapes | 1134 | kernel/blk_drv/scsi/st.c | memcpy_tofs((char *)arg, (char *)scsi_tapes[dev].buffer->mt_status, |
scsi_tapes | 1153 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
scsi_tapes | 1157 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) { |
scsi_tapes | 1168 | kernel/blk_drv/scsi/st.c | (void *) scmd, (void *) scsi_tapes[dev].buffer->b_data, |
scsi_tapes | 1171 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
scsi_tapes | 1182 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) |
scsi_tapes | 1183 | kernel/blk_drv/scsi/st.c | mt_pos.mt_blkno = (scsi_tapes[dev].buffer->b_data[0] << 16) |
scsi_tapes | 1184 | kernel/blk_drv/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[1] << 8) |
scsi_tapes | 1185 | kernel/blk_drv/scsi/st.c | + scsi_tapes[dev].buffer->b_data[2]; |
scsi_tapes | 1187 | kernel/blk_drv/scsi/st.c | mt_pos.mt_blkno = (scsi_tapes[dev].buffer->b_data[4] << 24) |
scsi_tapes | 1188 | kernel/blk_drv/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[5] << 16) |
scsi_tapes | 1189 | kernel/blk_drv/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[6] << 8) |
scsi_tapes | 1190 | kernel/blk_drv/scsi/st.c | + scsi_tapes[dev].buffer->b_data[7]; |
scsi_tapes | 1200 | kernel/blk_drv/scsi/st.c | return scsi_ioctl(scsi_tapes[dev].device, cmd_in, (void *) arg); |
scsi_tapes | 1218 | kernel/blk_drv/scsi/st.c | scsi_tapes[NR_ST++].device = SDp; |
scsi_tapes | 1223 | kernel/blk_drv/scsi/st.c | scsi_tapes = (Scsi_Tape *) mem_start; |
scsi_tapes | 1244 | kernel/blk_drv/scsi/st.c | scsi_tapes[i].capacity = 0xfffff; |
scsi_tapes | 1245 | kernel/blk_drv/scsi/st.c | scsi_tapes[i].dirty = 0; |
scsi_tapes | 1246 | kernel/blk_drv/scsi/st.c | scsi_tapes[i].rw = 0; |
scsi_tapes | 1247 | kernel/blk_drv/scsi/st.c | scsi_tapes[i].eof = 0; |
scsi_tapes | 1248 | kernel/blk_drv/scsi/st.c | scsi_tapes[i].waiting = NULL; |
scsi_tapes | 1249 | kernel/blk_drv/scsi/st.c | scsi_tapes[i].in_use = 0; |