Lines Matching refs:cmd

380 			    SRpnt->cmd[0], SRpnt->cmd[1], SRpnt->cmd[2],  in st_chk_result()
381 SRpnt->cmd[3], SRpnt->cmd[4], SRpnt->cmd[5]); in st_chk_result()
397 SRpnt->cmd[0] != MODE_SENSE && in st_chk_result()
398 SRpnt->cmd[0] != TEST_UNIT_READY) { in st_chk_result()
425 && SRpnt->cmd[0] != WRITE_6 in st_chk_result()
426 && SRpnt->cmd[0] != WRITE_FILEMARKS in st_chk_result()
434 if (SRpnt->cmd[0] == READ_6) in st_chk_result()
436 else if (SRpnt->cmd[0] == WRITE_6) in st_chk_result()
541 static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, in st_scsi_execute() argument
571 if (cmd[0] == WRITE_6) { in st_scsi_execute()
574 } else if (cmd[0] == READ_6) { in st_scsi_execute()
582 scmd->cmd_len = COMMAND_SIZE(cmd[0]); in st_scsi_execute()
583 memcpy(scmd->cmnd, cmd, scmd->cmd_len); in st_scsi_execute()
597 st_do_scsi(struct st_request * SRpnt, struct scsi_tape * STp, unsigned char *cmd, in st_do_scsi() argument
642 memcpy(SRpnt->cmd, cmd, sizeof(SRpnt->cmd)); in st_do_scsi()
646 ret = st_scsi_execute(SRpnt, cmd, direction, NULL, bytes, timeout, in st_do_scsi()
733 unsigned char cmd[MAX_COMMAND_SIZE]; in cross_eof() local
735 cmd[0] = SPACE; in cross_eof()
736 cmd[1] = 0x01; /* Space FileMarks */ in cross_eof()
738 cmd[2] = cmd[3] = 0; in cross_eof()
739 cmd[4] = 1; in cross_eof()
741 cmd[2] = cmd[3] = cmd[4] = 0xff; /* -1 filemarks */ in cross_eof()
742 cmd[5] = 0; in cross_eof()
747 SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE, in cross_eof()
770 unsigned char cmd[MAX_COMMAND_SIZE]; in st_flush_write_buffer() local
784 memset(cmd, 0, MAX_COMMAND_SIZE); in st_flush_write_buffer()
785 cmd[0] = WRITE_6; in st_flush_write_buffer()
786 cmd[1] = 1; in st_flush_write_buffer()
788 cmd[2] = blks >> 16; in st_flush_write_buffer()
789 cmd[3] = blks >> 8; in st_flush_write_buffer()
790 cmd[4] = blks; in st_flush_write_buffer()
792 SRpnt = st_do_scsi(NULL, STp, cmd, transfer, DMA_TO_DEVICE, in st_flush_write_buffer()
973 unsigned char cmd[MAX_COMMAND_SIZE]; in test_ready() local
980 memset((void *) &cmd[0], 0, MAX_COMMAND_SIZE); in test_ready()
981 cmd[0] = TEST_UNIT_READY; in test_ready()
982 SRpnt = st_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE, in test_ready()
1046 unsigned char cmd[MAX_COMMAND_SIZE], saved_cleaning; in check_tape() local
1112 memset((void *) &cmd[0], 0, MAX_COMMAND_SIZE); in check_tape()
1113 cmd[0] = READ_BLOCK_LIMITS; in check_tape()
1115 SRpnt = st_do_scsi(SRpnt, STp, cmd, 6, DMA_FROM_DEVICE, in check_tape()
1138 memset((void *) &cmd[0], 0, MAX_COMMAND_SIZE); in check_tape()
1139 cmd[0] = MODE_SENSE; in check_tape()
1140 cmd[4] = 12; in check_tape()
1142 SRpnt = st_do_scsi(SRpnt, STp, cmd, 12, DMA_FROM_DEVICE, in check_tape()
1347 unsigned char cmd[MAX_COMMAND_SIZE]; in st_flush() local
1383 memset(cmd, 0, MAX_COMMAND_SIZE); in st_flush()
1384 cmd[0] = WRITE_FILEMARKS; in st_flush()
1386 cmd[1] = 1; in st_flush()
1387 cmd[4] = 1 + STp->two_fm; in st_flush()
1389 SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE, in st_flush()
1422 DEBC_printk(STp, "Buffer flushed, %d EOF(s) written\n", cmd[4]); in st_flush()
1630 unsigned char cmd[MAX_COMMAND_SIZE]; in st_write() local
1719 memset(cmd, 0, MAX_COMMAND_SIZE); in st_write()
1720 cmd[0] = WRITE_6; in st_write()
1721 cmd[1] = (STp->block_size != 0); in st_write()
1773 cmd[2] = blks >> 16; in st_write()
1774 cmd[3] = blks >> 8; in st_write()
1775 cmd[4] = blks; in st_write()
1777 SRpnt = st_do_scsi(SRpnt, STp, cmd, transfer, DMA_TO_DEVICE, in st_write()
1906 unsigned char cmd[MAX_COMMAND_SIZE]; in read_tape() local
1937 memset(cmd, 0, MAX_COMMAND_SIZE); in read_tape()
1938 cmd[0] = READ_6; in read_tape()
1939 cmd[1] = (STp->block_size != 0); in read_tape()
1940 if (!cmd[1] && STp->sili) in read_tape()
1941 cmd[1] |= 2; in read_tape()
1942 cmd[2] = blks >> 16; in read_tape()
1943 cmd[3] = blks >> 8; in read_tape()
1944 cmd[4] = blks; in read_tape()
1947 SRpnt = st_do_scsi(SRpnt, STp, cmd, bytes, DMA_FROM_DEVICE, in read_tape()
2481 unsigned char cmd[MAX_COMMAND_SIZE]; in read_mode_page() local
2484 memset(cmd, 0, MAX_COMMAND_SIZE); in read_mode_page()
2485 cmd[0] = MODE_SENSE; in read_mode_page()
2487 cmd[1] = MODE_SENSE_OMIT_BDESCS; in read_mode_page()
2488 cmd[2] = page; in read_mode_page()
2489 cmd[4] = 255; in read_mode_page()
2491 SRpnt = st_do_scsi(NULL, STp, cmd, cmd[4], DMA_FROM_DEVICE, in read_mode_page()
2507 unsigned char cmd[MAX_COMMAND_SIZE]; in write_mode_page() local
2511 memset(cmd, 0, MAX_COMMAND_SIZE); in write_mode_page()
2512 cmd[0] = MODE_SELECT; in write_mode_page()
2513 cmd[1] = MODE_SELECT_PAGE_FORMAT; in write_mode_page()
2515 cmd[4] = pgo + (STp->buffer)->b_data[pgo + MP_OFF_PAGE_LENGTH] + 2; in write_mode_page()
2525 SRpnt = st_do_scsi(NULL, STp, cmd, cmd[4], DMA_TO_DEVICE, in write_mode_page()
2607 unsigned char cmd[MAX_COMMAND_SIZE]; in do_load_unload() local
2618 memset(cmd, 0, MAX_COMMAND_SIZE); in do_load_unload()
2619 cmd[0] = START_STOP; in do_load_unload()
2621 cmd[4] |= 1; in do_load_unload()
2628 (cmd[4]) ? "" : "un", in do_load_unload()
2630 cmd[3] = load_code - MT_ST_HPLOADER_OFFSET; /* MediaID field of C1553A */ in do_load_unload()
2633 cmd[1] = 1; /* Don't wait for completion */ in do_load_unload()
2646 SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE, in do_load_unload()
2678 static void deb_space_print(struct scsi_tape *STp, int direction, char *units, unsigned char *cmd) in deb_space_print() argument
2685 sc = sign_extend32(get_unaligned_be24(&cmd[2]), 23); in deb_space_print()
2694 static void deb_space_print(struct scsi_tape *STp, int direction, char *units, unsigned char *cmd) … in deb_space_print() argument
2705 unsigned char cmd[MAX_COMMAND_SIZE]; in st_int_ioctl() local
2724 memset(cmd, 0, MAX_COMMAND_SIZE); in st_int_ioctl()
2730 cmd[0] = SPACE; in st_int_ioctl()
2731 cmd[1] = 0x01; /* Space FileMarks */ in st_int_ioctl()
2732 cmd[2] = (arg >> 16); in st_int_ioctl()
2733 cmd[3] = (arg >> 8); in st_int_ioctl()
2734 cmd[4] = arg; in st_int_ioctl()
2735 deb_space_print(STp, ST_DEB_FORWARD, "filemarks", cmd); in st_int_ioctl()
2745 cmd[0] = SPACE; in st_int_ioctl()
2746 cmd[1] = 0x01; /* Space FileMarks */ in st_int_ioctl()
2748 cmd[2] = (ltmp >> 16); in st_int_ioctl()
2749 cmd[3] = (ltmp >> 8); in st_int_ioctl()
2750 cmd[4] = ltmp; in st_int_ioctl()
2751 deb_space_print(STp, ST_DEB_BACKWARD, "filemarks", cmd); in st_int_ioctl()
2758 cmd[0] = SPACE; in st_int_ioctl()
2759 cmd[1] = 0x00; /* Space Blocks */ in st_int_ioctl()
2760 cmd[2] = (arg >> 16); in st_int_ioctl()
2761 cmd[3] = (arg >> 8); in st_int_ioctl()
2762 cmd[4] = arg; in st_int_ioctl()
2763 deb_space_print(STp, ST_DEB_FORWARD, "blocks", cmd); in st_int_ioctl()
2769 cmd[0] = SPACE; in st_int_ioctl()
2770 cmd[1] = 0x00; /* Space Blocks */ in st_int_ioctl()
2772 cmd[2] = (ltmp >> 16); in st_int_ioctl()
2773 cmd[3] = (ltmp >> 8); in st_int_ioctl()
2774 cmd[4] = ltmp; in st_int_ioctl()
2775 deb_space_print(STp, ST_DEB_BACKWARD, "blocks", cmd); in st_int_ioctl()
2781 cmd[0] = SPACE; in st_int_ioctl()
2782 cmd[1] = 0x04; /* Space Setmarks */ in st_int_ioctl()
2783 cmd[2] = (arg >> 16); in st_int_ioctl()
2784 cmd[3] = (arg >> 8); in st_int_ioctl()
2785 cmd[4] = arg; in st_int_ioctl()
2786 deb_space_print(STp, ST_DEB_FORWARD, "setmarks", cmd); in st_int_ioctl()
2793 cmd[0] = SPACE; in st_int_ioctl()
2794 cmd[1] = 0x04; /* Space Setmarks */ in st_int_ioctl()
2796 cmd[2] = (ltmp >> 16); in st_int_ioctl()
2797 cmd[3] = (ltmp >> 8); in st_int_ioctl()
2798 cmd[4] = ltmp; in st_int_ioctl()
2799 deb_space_print(STp, ST_DEB_BACKWARD, "setmarks", cmd); in st_int_ioctl()
2810 cmd[0] = WRITE_FILEMARKS; in st_int_ioctl()
2812 cmd[1] = 2; in st_int_ioctl()
2815 cmd[1] |= 1; in st_int_ioctl()
2816 cmd[2] = (arg >> 16); in st_int_ioctl()
2817 cmd[3] = (arg >> 8); in st_int_ioctl()
2818 cmd[4] = arg; in st_int_ioctl()
2824 cmd[2] * 65536 + in st_int_ioctl()
2825 cmd[3] * 256 + in st_int_ioctl()
2826 cmd[4]); in st_int_ioctl()
2830 cmd[2] * 65536 + in st_int_ioctl()
2831 cmd[3] * 256 + in st_int_ioctl()
2832 cmd[4]); in st_int_ioctl()
2840 cmd[0] = REZERO_UNIT; in st_int_ioctl()
2842 cmd[1] = 1; /* Don't wait for completion */ in st_int_ioctl()
2852 cmd[0] = START_STOP; in st_int_ioctl()
2854 cmd[1] = 1; /* Don't wait for completion */ in st_int_ioctl()
2857 cmd[4] = 3; in st_int_ioctl()
2874 cmd[0] = SPACE; in st_int_ioctl()
2875 cmd[1] = 3; in st_int_ioctl()
2883 cmd[0] = ERASE; in st_int_ioctl()
2884 cmd[1] = (arg ? 1 : 0); /* Long erase with non-zero argument */ in st_int_ioctl()
2886 cmd[1] |= 2; /* Don't wait for completion */ in st_int_ioctl()
2910 cmd[0] = MODE_SELECT; in st_int_ioctl()
2912 cmd[1] = MODE_SELECT_PAGE_FORMAT; in st_int_ioctl()
2913 cmd[4] = datalen = 12; in st_int_ioctl()
2961 SRpnt = st_do_scsi(NULL, STp, cmd, datalen, direction, in st_int_ioctl()