mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -3,19 +3,20 @@
|
||||
ABT_DETAILS="x86_64"
|
||||
ABT_JOBS=5
|
||||
ABT_KERNELS=" \
|
||||
5.0.13 \
|
||||
5.1 \
|
||||
5.0.14-nc \
|
||||
4.20.17-nc \
|
||||
4.19.40-nc \
|
||||
4.19.41-nc \
|
||||
4.18.18-nc \
|
||||
4.17.18-nc \
|
||||
4.16.18-nc \
|
||||
4.15.18-nc \
|
||||
4.14.116-nc \
|
||||
4.14.117-nc \
|
||||
4.13.16-nc \
|
||||
4.12.14-nc \
|
||||
4.11.12-nc \
|
||||
4.10.17-nc \
|
||||
4.9.173-nc \
|
||||
4.9.174-nc \
|
||||
4.8.17-nc \
|
||||
4.7.10-nc \
|
||||
4.6.7-nc \
|
||||
|
||||
@@ -182,7 +182,7 @@ static enum scst_exec_context scst_work_context = SCST_CONTEXT_TASKLET;
|
||||
struct cmd_state_name {
|
||||
uint8_t state;
|
||||
char *str;
|
||||
} cmd_str [] = {
|
||||
} cmd_str[] = {
|
||||
{0xff, "unknown"},
|
||||
{QLA_TGT_STATE_NEW, "new"},
|
||||
{QLA_TGT_STATE_NEED_DATA, "NeedData"},
|
||||
@@ -205,7 +205,7 @@ static char *cmdstate_to_str(uint8_t state)
|
||||
|
||||
#if QLA_ENABLE_PI
|
||||
|
||||
static const int qla_tgt_supported_dif_block_size[]= {
|
||||
static const int qla_tgt_supported_dif_block_size[] = {
|
||||
512,
|
||||
0, /* null terminated */
|
||||
};
|
||||
@@ -230,9 +230,9 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
dir = scst_cmd_get_expected_data_direction(scst_cmd);
|
||||
}
|
||||
|
||||
switch(action) {
|
||||
switch (action) {
|
||||
case SCST_DIF_ACTION_STRIP:
|
||||
switch(dir) {
|
||||
switch (dir) {
|
||||
case SCST_DATA_READ:
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_DOUT_STRIP;
|
||||
break;
|
||||
@@ -242,14 +242,14 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
case SCST_DATA_BIDI:
|
||||
if (xmit_rsp) {
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_DOUT_STRIP;
|
||||
}else {
|
||||
} else {
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_DIN_STRIP;
|
||||
}
|
||||
break;
|
||||
case SCST_DATA_NONE:
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_NORMAL;
|
||||
break;
|
||||
default :
|
||||
default:
|
||||
EXTRACHECKS_BUG_ON(dir);
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_NORMAL;
|
||||
break;
|
||||
@@ -258,7 +258,7 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
|
||||
|
||||
case SCST_DIF_ACTION_INSERT:
|
||||
switch(dir) {
|
||||
switch (dir) {
|
||||
case SCST_DATA_READ:
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_DOUT_INSERT;
|
||||
break;
|
||||
@@ -266,7 +266,7 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_DIN_INSERT;
|
||||
break;
|
||||
case SCST_DATA_BIDI:
|
||||
if (xmit_rsp){
|
||||
if (xmit_rsp) {
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_DOUT_INSERT;
|
||||
} else {
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_DIN_INSERT;
|
||||
@@ -275,7 +275,7 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
case SCST_DATA_NONE:
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_NORMAL;
|
||||
break;
|
||||
default :
|
||||
default:
|
||||
EXTRACHECKS_BUG_ON(dir);
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_NORMAL;
|
||||
break;
|
||||
@@ -284,7 +284,7 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
|
||||
|
||||
case SCST_DIF_ACTION_PASS_CHECK:
|
||||
switch(dir) {
|
||||
switch (dir) {
|
||||
case SCST_DATA_READ:
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_DOUT_PASS;
|
||||
break;
|
||||
@@ -301,7 +301,7 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
case SCST_DATA_NONE:
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_NORMAL;
|
||||
break;
|
||||
default :
|
||||
default:
|
||||
EXTRACHECKS_BUG_ON(dir);
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_NORMAL;
|
||||
break;
|
||||
@@ -310,7 +310,7 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
|
||||
|
||||
case SCST_DIF_ACTION_PASS: // nocheck
|
||||
switch(dir) {
|
||||
switch (dir) {
|
||||
case SCST_DATA_READ:
|
||||
case SCST_DATA_WRITE:
|
||||
case SCST_DATA_BIDI:
|
||||
@@ -320,7 +320,7 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
case SCST_DATA_NONE:
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_NORMAL;
|
||||
break;
|
||||
default :
|
||||
default:
|
||||
EXTRACHECKS_BUG_ON(dir);
|
||||
cmd->se_cmd.prot_op = TARGET_PROT_NORMAL;
|
||||
break;
|
||||
@@ -355,7 +355,7 @@ static void sqa_qla2xxx_rel_cmd(struct qla_tgt_cmd *cmd)
|
||||
static struct qla_tgt_cmd *sqa_qla2xxx_get_cmd(struct fc_port *sess)
|
||||
{
|
||||
struct sqa_scst_tgt *sqa_tgt =
|
||||
(struct sqa_scst_tgt*)sess->vha->vha_tgt.target_lport_ptr;
|
||||
(struct sqa_scst_tgt *)sess->vha->vha_tgt.target_lport_ptr;
|
||||
struct qla_tgt_cmd *cmd;
|
||||
int tag = -ENOENT;
|
||||
|
||||
@@ -432,7 +432,7 @@ static int sqa_qla2xxx_handle_cmd(scsi_qla_host_t *vha,
|
||||
sizeof(atio->u.isp24.fcp_cmnd.lun),
|
||||
atio->u.isp24.fcp_cmnd.cdb,
|
||||
sizeof(atio->u.isp24.fcp_cmnd.cdb) +
|
||||
(atio->u.isp24.fcp_cmnd.add_cdb_len *4),
|
||||
(atio->u.isp24.fcp_cmnd.add_cdb_len * 4),
|
||||
SCST_ATOMIC);
|
||||
|
||||
if (cmd->scst_cmd == NULL) {
|
||||
@@ -579,7 +579,7 @@ static int sqa_qla2xxx_handle_tmr(struct qla_tgt_mgmt_cmd *mcmd, u64 lun,
|
||||
* Call into SCST target core based on task management function
|
||||
* type.
|
||||
*/
|
||||
switch(tmr_func) {
|
||||
switch (tmr_func) {
|
||||
case QLA_TGT_CLEAR_ACA: //TMR_CLEAR_ACA:
|
||||
TRACE(TRACE_MGMT, "sqatgt(%ld/%d) CLEAR_ACA received.",
|
||||
sess->tgt->vha->host_no, sess->tgt->vha->vp_idx);
|
||||
@@ -650,7 +650,7 @@ static int sqa_qla2xxx_handle_tmr(struct qla_tgt_mgmt_cmd *mcmd, u64 lun,
|
||||
sess->tgt->vha->host_no, sess->tgt->vha->vp_idx);
|
||||
rc = scst_rx_mgmt_fn_lun(scst_sess, SCST_NEXUS_LOSS,
|
||||
&sl, lun_size, SCST_ATOMIC, mcmd);
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
PRINT_ERROR("sqatgt(%ld/%d): Unknown task mgmt fn=0x%x",
|
||||
@@ -724,7 +724,7 @@ static void sqa_qla2xxx_free_session(struct fc_port *fcport)
|
||||
wait_for_completion(&c);
|
||||
}
|
||||
|
||||
TRACE_MGMT_DBG("sqatgt(%ld/%d): Unregister completed %s done \n",
|
||||
TRACE_MGMT_DBG("sqatgt(%ld/%d): Unregister completed %s done\n",
|
||||
vha->host_no, vha->vp_idx, wwn_to_str(fcport->port_name));
|
||||
|
||||
kfree(se_sess);
|
||||
@@ -1439,7 +1439,7 @@ static int sqa_target_release(struct scst_tgt *scst_tgt)
|
||||
{
|
||||
struct sqa_scst_tgt *sqa_tgt = scst_tgt_get_tgt_priv(scst_tgt);
|
||||
struct qla_tgt *tgt = sqa_tgt->qla_tgt;
|
||||
struct scsi_qla_host *vha= tgt->vha;
|
||||
struct scsi_qla_host *vha = tgt->vha;
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
@@ -1477,7 +1477,7 @@ static int sqa_target_release(struct scst_tgt *scst_tgt)
|
||||
|
||||
static int sqa_xmit_response(struct scst_cmd *scst_cmd)
|
||||
{
|
||||
int xmit_type = QLA_TGT_XMIT_DATA, res, residual=0;
|
||||
int xmit_type = QLA_TGT_XMIT_DATA, res, residual = 0;
|
||||
int is_send_status = scst_cmd_get_is_send_status(scst_cmd);
|
||||
struct qla_tgt_cmd *cmd;
|
||||
|
||||
@@ -1501,7 +1501,7 @@ static int sqa_xmit_response(struct scst_cmd *scst_cmd)
|
||||
EXTRACHECKS_BUG_ON(scst_cmd_atomic(scst_cmd));
|
||||
#endif
|
||||
if (is_send_status) {
|
||||
const u8* const sense_buf = scst_cmd_get_sense_buffer(scst_cmd);
|
||||
const u8 *const sense_buf = scst_cmd_get_sense_buffer(scst_cmd);
|
||||
u16 len = scst_cmd_get_sense_buffer_len(scst_cmd);
|
||||
|
||||
xmit_type |= QLA_TGT_XMIT_STATUS;
|
||||
@@ -1555,7 +1555,7 @@ static int sqa_xmit_response(struct scst_cmd *scst_cmd)
|
||||
cmd->vha->host_no, cmd->vha->vp_idx, residual);
|
||||
if (residual > 0)
|
||||
cmd->se_cmd.se_cmd_flags |= SCF_UNDERFLOW_BIT;
|
||||
if (residual < 0 ) {
|
||||
if (residual < 0) {
|
||||
cmd->se_cmd.se_cmd_flags |= SCF_OVERFLOW_BIT;
|
||||
residual = -residual;
|
||||
}
|
||||
@@ -1671,7 +1671,7 @@ static uint32_t sqa_convert_to_fc_tm_status(int scst_mstatus)
|
||||
uint32_t res;
|
||||
|
||||
switch (scst_mstatus) {
|
||||
case SCST_MGMT_STATUS_SUCCESS:
|
||||
case SCST_MGMT_STATUS_SUCCESS:
|
||||
res = FC_TM_SUCCESS;
|
||||
break;
|
||||
case SCST_MGMT_STATUS_TASK_NOT_EXIST:
|
||||
@@ -1708,7 +1708,7 @@ static void sqa_task_mgmt_fn_done(struct scst_mgmt_cmd *scst_mcmd)
|
||||
}
|
||||
|
||||
vha = mcmd->sess->vha;
|
||||
TRACE_MGMT_DBG("sqatgt(%ld/%d): scst_mcmd %p status %#x state %#x; "
|
||||
TRACE_MGMT_DBG("sqatgt(%ld/%d): scst_mcmd %p status %#x state %#x; "
|
||||
"mcmd %p flags %x\n",
|
||||
vha->host_no, vha->vp_idx, scst_mcmd,
|
||||
scst_mcmd->status, scst_mcmd->state,
|
||||
@@ -1799,7 +1799,7 @@ static int sqa_qla2xxx_dif_tags(struct qla_tgt_cmd *cmd,
|
||||
uint16_t *pfw_prot_opts)
|
||||
{
|
||||
struct scst_cmd *scst_cmd = cmd->scst_cmd;
|
||||
uint32_t t32=0;
|
||||
uint32_t t32 = 0;
|
||||
|
||||
t32 = scst_get_dif_checks(scst_cmd->cmd_dif_actions);
|
||||
if (!(t32 & SCST_DIF_CHECK_GUARD_TAG))
|
||||
@@ -1818,7 +1818,7 @@ static void sqa_cleanup_hw_pending_cmd(scsi_qla_host_t *vha,
|
||||
struct qla_qpair *qpair = cmd->qpair;
|
||||
|
||||
for (h = 1; h < qpair->req->num_outstanding_cmds; h++) {
|
||||
if (qpair->req->outstanding_cmds[h] == (srb_t*)cmd) {
|
||||
if (qpair->req->outstanding_cmds[h] == (srb_t *)cmd) {
|
||||
printk(KERN_INFO "Clearing handle %d for cmd %p", h, cmd);
|
||||
//TRACE_DBG("Clearing handle %d for cmd %p", h, cmd);
|
||||
qpair->req->outstanding_cmds[h] = NULL;
|
||||
@@ -1841,14 +1841,14 @@ static void sqa_on_hw_pending_cmd_timeout(struct scst_cmd *scst_cmd)
|
||||
"(state %s) %s; %s;",
|
||||
vha->host_no, vha->vp_idx, cmd,
|
||||
cmdstate_to_str((uint8_t)cmd->state),
|
||||
cmd->cmd_sent_to_fw ? "sent to fw": "not sent to fw",
|
||||
cmd->cmd_sent_to_fw ? "sent to fw" : "not sent to fw",
|
||||
aborted ? "aborted":"not aborted");
|
||||
|
||||
|
||||
qlt_abort_cmd(cmd);
|
||||
|
||||
spin_lock_irqsave(qpair->qp_lock_ptr, flags);
|
||||
switch(cmd->state) {
|
||||
switch (cmd->state) {
|
||||
case QLA_TGT_STATE_NEW:
|
||||
case QLA_TGT_STATE_DATA_IN:
|
||||
PRINT_ERROR("sqa(%ld): A command in state (%s) should "
|
||||
@@ -1912,7 +1912,7 @@ static struct qla_tgt_func_tmpl sqa_qla2xxx_template = {
|
||||
};
|
||||
|
||||
static int sqa_lport_callback(struct scsi_qla_host *vha,
|
||||
void* target_lport_ptr, u64 npiv_wwpn, u64 npiv_wwnn)
|
||||
void *target_lport_ptr, u64 npiv_wwpn, u64 npiv_wwnn)
|
||||
|
||||
{
|
||||
struct qla_hw_data *ha = vha->hw;
|
||||
@@ -1961,7 +1961,7 @@ static int sqa_enable_tgt(struct scst_tgt *scst_tgt, bool enable)
|
||||
|
||||
if (enable) {
|
||||
qlt_lport_register(sqa_tgt, wwn_to_u64(vha->port_name),
|
||||
0,0, sqa_lport_callback);
|
||||
0, 0, sqa_lport_callback);
|
||||
qlt_enable_vha(vha);
|
||||
} else {
|
||||
rc = qlt_stop_phase1(tgt);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
extern size_t qlt_add_vtarget(u64, u64, u64);
|
||||
extern size_t qlt_del_vtarget(u64);
|
||||
|
||||
struct sqa_scst_tgt{
|
||||
struct sqa_scst_tgt {
|
||||
struct list_head list;
|
||||
struct scst_tgt *scst_tgt;
|
||||
struct qla_tgt *qla_tgt;
|
||||
|
||||
@@ -1258,7 +1258,7 @@ sp_get(struct srb *sp)
|
||||
else
|
||||
return 0;
|
||||
#else
|
||||
if (!refcount_inc_not_zero((refcount_t*)&sp->ref_count))
|
||||
if (!refcount_inc_not_zero((refcount_t *)&sp->ref_count))
|
||||
/* kref get fail */
|
||||
return ENXIO;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user