diff --git a/qla2x00t/qla_mbx.c b/qla2x00t/qla_mbx.c index 477669c98..ee3668001 100644 --- a/qla2x00t/qla_mbx.c +++ b/qla2x00t/qla_mbx.c @@ -1020,12 +1020,14 @@ qla2x00_init_firmware(scsi_qla_host_t *ha, uint16_t size) DEBUG11(printk("qla2x00_init_firmware(%ld): entered.\n", ha->host_no)); +#ifdef CONFIG_SCSI_QLA2XXX_TARGET if (!qla_tgt_mode_enabled(ha) && !qla_ini_mode_enabled(ha)) { DEBUG11(printk("qla2x00_init_firmware(%ld): neither initiator, " "nor target mode enabled, exiting\n", ha->host_no)); rval = QLA_SUCCESS; goto out; } +#endif #ifdef QL_DEBUG_LEVEL_5 if (IS_FWI2_CAPABLE(ha)) { @@ -2255,12 +2257,14 @@ qla24xx_get_isp_stats(scsi_qla_host_t *ha, struct link_statistics *stats, mbx_cmd_t *mcp = &mc; uint32_t *siter, *diter, dwords; +#ifdef CONFIG_SCSI_QLA2XXX_TARGET if (!qla_tgt_mode_enabled(ha) && !qla_ini_mode_enabled(ha)) { DEBUG2_3_11(printk("%s(%ld): neither initiator, nor target " "mode enabled, no stats returned\n", __func__, ha->host_no)); return QLA_FUNCTION_FAILED; } +#endif DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index be71332b8..f71811263 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -2239,7 +2239,7 @@ static void dev_user_unjam_cmd(struct scst_user_cmd *ucmd, int busy, } ucmd->cmd->scst_cmd_done(ucmd->cmd, SCST_CMD_STATE_DEFAULT, - SCST_CONTEXT_DIRECT); + SCST_CONTEXT_THREAD); /* !! At this point cmd and ucmd can be already freed !! */ if (flags != NULL) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index dc07f8d0e..514a07991 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -2749,7 +2749,6 @@ int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent, struct scst_tgt_dev *tgt_dev; struct scst_session *sess; LIST_HEAD(tmp_tgt_dev_list); - bool del_sysfs = true; TRACE_ENTRY(); @@ -2779,10 +2778,8 @@ int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent, } res = scst_acg_dev_sysfs_create(acg_dev, parent); - if (res != 0) { - del_sysfs = false; + if (res != 0) goto out_free; - } if (gen_scst_report_luns_changed) scst_report_luns_changed(acg); @@ -2803,7 +2800,7 @@ out_free: extra_tgt_dev_list_entry) { scst_free_tgt_dev(tgt_dev); } - scst_del_free_acg_dev(acg_dev, del_sysfs); + scst_del_free_acg_dev(acg_dev, false); goto out; } diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index eceac2207..59b5840d7 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -6281,8 +6281,9 @@ static int scst_init_session(struct scst_session *sess) sess->acg = scst_find_acg(sess); - PRINT_INFO("Using security group \"%s\" for initiator \"%s\"", - sess->acg->acg_name, sess->initiator_name); + PRINT_INFO("Using security group \"%s\" for initiator \"%s\" " + "(target %s)", sess->acg->acg_name, sess->initiator_name, + sess->tgt->tgt_name); list_add_tail(&sess->acg_sess_list_entry, &sess->acg->acg_sess_list);