From 1d969239387702338dbbc0cbb8cc964b21381b7c Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 24 Feb 2016 01:38:16 +0000 Subject: [PATCH] Merged revisions 6777,6801,6806,6815 via svnmerge from svn+ssh://svn.code.sf.net/p/scst/svn/trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.1.x@6816 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 1 + scst/src/scst_tg.c | 10 ++++++---- usr/stpgd/Makefile | 9 +-------- usr/stpgd/stpgd_main.c | 4 ++-- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 4c752e342..843ceb886 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -1950,6 +1950,7 @@ go: memset(buf, 0, len); buf[0] = 0x7F; /* Peripheral qualifier 011b, Peripheral device type 1Fh */ + buf[2] = 6; /* Device complies to SPC-4 */ buf[4] = len - 4; TRACE_BUFFER("INQUIRY for not supported LUN set", buf, len); diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index 4029fcefb..20bea55c5 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -1537,10 +1537,12 @@ int scst_tg_get_group_info(void **buf, uint32_t *length, list_for_each_entry(tg, &dg->tg_list, entry) { /* Target port group descriptor header. */ *p++ = (tg->preferred ? SCST_TG_PREFERRED : 0) | tg->state; - *p++ = SCST_TG_SUP_OPTIMIZED - | SCST_TG_SUP_NONOPTIMIZED - | SCST_TG_SUP_STANDBY - | SCST_TG_SUP_UNAVAILABLE; + *p++ = SCST_TG_SUP_OPTIMIZED | + SCST_TG_SUP_NONOPTIMIZED | + SCST_TG_SUP_STANDBY | + SCST_TG_SUP_UNAVAILABLE | + SCST_TG_SUP_OFFLINE | + SCST_TG_SUP_TRANSITION; put_unaligned_be16(tg->group_id, p); p += 2; p++; /* reserved */ diff --git a/usr/stpgd/Makefile b/usr/stpgd/Makefile index 3fa1e9bc7..fc340742e 100644 --- a/usr/stpgd/Makefile +++ b/usr/stpgd/Makefile @@ -89,14 +89,7 @@ extraclean: clean grep "^CFLAGS += \-DDEBUG -g -fno-inline -fno-inline-functions" Makefile >/dev/null rm Makefile.aa -2perf: - sed -i.aa s/"^C\?FLAGS += \-DEXTRACHECKS"/"#CFLAGS += \-DEXTRACHECKS"/ Makefile - grep "^#CFLAGS += \-DEXTRACHECKS" Makefile >/dev/null - sed -i.aa s/"^C\?FLAGS += \-DTRACING"/"#CFLAGS += \-DTRACING"/ Makefile - grep "^#CFLAGS += \-DTRACING" Makefile >/dev/null - sed -i.aa s/"^C\?FLAGS += \-DDEBUG -g -fno-inline -fno-inline-functions"/"#CFLAGS += \-DDEBUG -g -fno-inline -fno-inline-functions"/ Makefile - grep "^#CFLAGS += \-DDEBUG -g -fno-inline -fno-inline-functions" Makefile >/dev/null - rm Makefile.aa +2perf: 2release release-archive: ../../scripts/generate-release-archive stpgd "$$(sed -n 's/^#define[[:blank:]]VERSION_STR[[:blank:]]*\"\([^\"]*\)\".*/\1/p' ../include/version.h)" diff --git a/usr/stpgd/stpgd_main.c b/usr/stpgd/stpgd_main.c index 625879cfc..63fa92bdd 100644 --- a/usr/stpgd/stpgd_main.c +++ b/usr/stpgd/stpgd_main.c @@ -46,12 +46,12 @@ char *app_name; # endif #endif /* DEBUG */ -#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) - bool log_daemon = true; unsigned long trace_flag = DEFAULT_LOG_FLAGS; #endif /* defined(DEBUG) || defined(TRACING) */ +#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) + int transition_timeout = DEFAULT_TRANSITION_TIME; static struct option const long_options[] = {