Lines Matching refs:cmd
963 static int srp_exit_cmd_priv(struct Scsi_Host *shost, struct scsi_cmnd *cmd) in srp_exit_cmd_priv() argument
968 struct srp_request *req = scsi_cmd_priv(cmd); in srp_exit_cmd_priv()
981 static int srp_init_cmd_priv(struct Scsi_Host *shost, struct scsi_cmnd *cmd) in srp_init_cmd_priv() argument
986 struct srp_request *req = scsi_cmd_priv(cmd); in srp_init_cmd_priv()
1004 srp_exit_cmd_priv(shost, cmd); in srp_init_cmd_priv()
1625 struct srp_cmd *cmd = req->cmd->buf; in srp_map_data() local
1636 req->cmd->num_sge = 1; in srp_map_data()
1639 return sizeof(struct srp_cmd) + cmd->add_cdb_len; in srp_map_data()
1665 struct ib_sge *sge = &req->cmd->sge[1]; in srp_map_data()
1670 buf = (void *)cmd->add_data + cmd->add_cdb_len; in srp_map_data()
1672 WARN_ON_ONCE((void *)(buf + 1) > (void *)cmd + len); in srp_map_data()
1678 req->cmd->num_sge += count; in srp_map_data()
1683 len = sizeof(struct srp_cmd) + cmd->add_cdb_len + in srp_map_data()
1695 buf = (void *)cmd->add_data + cmd->add_cdb_len; in srp_map_data()
1708 indirect_hdr = (void *)cmd->add_data + cmd->add_cdb_len; in srp_map_data()
1743 buf = (void *)cmd->add_data + cmd->add_cdb_len; in srp_map_data()
1761 len = sizeof(struct srp_cmd) + cmd->add_cdb_len + in srp_map_data()
1784 cmd->data_out_desc_cnt = count; in srp_map_data()
1786 cmd->data_in_desc_cnt = count; in srp_map_data()
1793 cmd->buf_fmt = fmt << 4; in srp_map_data()
1795 cmd->buf_fmt = fmt; in srp_map_data()
2158 struct srp_cmd *cmd; in srp_queuecommand() local
2183 cmd = iu->buf; in srp_queuecommand()
2184 memset(cmd, 0, sizeof *cmd); in srp_queuecommand()
2186 cmd->opcode = SRP_CMD; in srp_queuecommand()
2187 int_to_scsilun(scmnd->device->lun, &cmd->lun); in srp_queuecommand()
2188 cmd->tag = tag; in srp_queuecommand()
2189 memcpy(cmd->cdb, scmnd->cmnd, scmnd->cmd_len); in srp_queuecommand()
2190 if (unlikely(scmnd->cmd_len > sizeof(cmd->cdb))) { in srp_queuecommand()
2191 cmd->add_cdb_len = round_up(scmnd->cmd_len - sizeof(cmd->cdb), in srp_queuecommand()
2193 if (WARN_ON_ONCE(cmd->add_cdb_len > SRP_MAX_ADD_CDB_LEN)) in srp_queuecommand()
2198 req->cmd = iu; in srp_queuecommand()