Lines Matching refs:cmd

121     TWE_Command		*cmd;
146 cmd = TWE_FIND_COMMAND(tr);
147 cmd->generic.host_id = sc->twe_host_id; /* controller-assigned host ID */
148 cmd->generic.request_id = i; /* our index number */
402 TWE_Command *cmd;
436 cmd = TWE_FIND_COMMAND(tr);
439 cmd->io.opcode = TWE_OP_READ;
442 cmd->io.opcode = TWE_OP_WRITE;
446 cmd->io.size = 3;
447 cmd->io.unit = *(int *)(bp->bio_driver1);
448 cmd->io.block_count = (tr->tr_length + TWE_BLOCK_SIZE - 1) / TWE_BLOCK_SIZE;
449 cmd->io.lba = bp->bio_pblkno;
483 TWE_Command *cmd;
494 cmd = TWE_FIND_COMMAND(tr);
495 cmd->io.opcode = TWE_OP_WRITE;
496 cmd->io.size = 3;
497 cmd->io.unit = unit;
498 cmd->io.block_count = nblks;
499 cmd->io.lba = lba;
520 TWE_Command *cmd;
556 cmd = TWE_FIND_COMMAND(tr);
557 srid = cmd->generic.request_id;
558 bcopy(&tu->tu_command, cmd, sizeof(TWE_Command));
559 cmd->generic.request_id = srid;
574 bcopy(cmd, &tu->tu_command, sizeof(TWE_Command));
767 TWE_Command *cmd;
789 cmd = TWE_FIND_COMMAND(tr);
790 cmd->param.opcode = TWE_OP_GET_PARAM;
791 cmd->param.size = 2;
792 cmd->param.unit = 0;
793 cmd->param.param_count = 1;
861 TWE_Command *cmd;
884 cmd = TWE_FIND_COMMAND(tr);
885 cmd->param.opcode = TWE_OP_SET_PARAM;
886 cmd->param.size = 2;
887 cmd->param.unit = 0;
888 cmd->param.param_count = 1;
920 TWE_Command *cmd;
932 cmd = TWE_FIND_COMMAND(tr);
933 cmd->initconnection.opcode = TWE_OP_INIT_CONNECTION;
934 cmd->initconnection.size = 3;
935 cmd->initconnection.host_id = 0;
936 cmd->initconnection.message_credits = mode;
937 cmd->initconnection.response_queue_pointer = 0;
944 sc->twe_host_id = cmd->initconnection.host_id;
1014 TWE_Command *cmd = TWE_FIND_COMMAND(tr);
1022 if (cmd->generic.status)
1109 TWE_Command *cmd;
1120 cmd = TWE_FIND_COMMAND(tr);
1142 debug(3, "queued request %d with callback %p", cmd->generic.request_id, tr->tr_complete);
1144 debug(3, "queued request %d with wait channel %p", cmd->generic.request_id, tr);
1146 debug(3, "queued request %d for polling caller", cmd->generic.request_id);
1172 TWE_Command *cmd;
1189 cmd = TWE_FIND_COMMAND(tr);
1194 cmd->generic.request_id, cmd->generic.status);
1583 TWE_Command *cmd;
1594 cmd = TWE_FIND_COMMAND(*tr);
1600 cmd->generic.status = 0; /* before submission to controller */
1601 cmd->generic.flags = 0; /* not used */
1823 TWE_Command *cmd = TWE_FIND_COMMAND(tr);
1829 if (cmd->generic.status == TWE_STATUS_RESET) {
1836 } else if (cmd->generic.status > TWE_STATUS_FATAL) {
1842 switch (cmd->generic.flags) {
1844 device_printf(sc->twe_drive[cmd->generic.unit].td_disk,
1848 device_printf(sc->twe_drive[cmd->generic.unit].td_disk,
1852 device_printf(sc->twe_drive[cmd->generic.unit].td_disk,
1854 twe_describe_code(twe_table_status, cmd->generic.status),
1855 cmd->generic.flags);
1858 } else if (cmd->generic.status > TWE_STATUS_WARNING) {
1862 device_printf(sc->twe_drive[cmd->generic.unit].td_disk,
1864 twe_describe_code(twe_table_status, cmd->generic.status),
1865 cmd->generic.flags);
1866 } else if (cmd->generic.status > 0x40) {
1870 device_printf(sc->twe_drive[cmd->generic.unit].td_disk,
1872 twe_describe_code(twe_table_status, cmd->generic.status),
1873 cmd->generic.flags);
1927 TWE_Command *cmd = TWE_FIND_COMMAND(tr);
1931 cmd->generic.request_id, twe_describe_code(twe_table_opcode, cmd->generic.opcode), cmd->generic.size,
1932 cmd->generic.unit, cmd->generic.host_id);
1934 cmd->generic.status, cmd->generic.flags, cmd->generic.count, cmd->generic.sgl_offset);
1936 switch(cmd->generic.opcode) { /* XXX add more opcodes? */
1939 twe_printf(sc, " lba %d\n", cmd->io.lba);
1940 for (i = 0; (i < TWE_MAX_SGL_LENGTH) && (cmd->io.sgl[i].length != 0); i++)
1942 i, cmd->io.sgl[i].address, cmd->io.sgl[i].length);
1947 for (i = 0; (i < TWE_MAX_SGL_LENGTH) && (cmd->param.sgl[i].length != 0); i++)
1949 i, cmd->param.sgl[i].address, cmd->param.sgl[i].length);
1954 cmd->initconnection.response_queue_pointer);