diff options
author | Peter Gill <Peter.Gill@Sun.COM> | 2010-07-28 13:12:37 -0400 |
---|---|---|
committer | Peter Gill <Peter.Gill@Sun.COM> | 2010-07-28 13:12:37 -0400 |
commit | c050a449559fc53eab7574bb8f3d5f4bd85211f3 (patch) | |
tree | 3fdbd8488f7fcea26a83881dce7cba4179eb7d62 | |
parent | 7b709169bbe45d42fe0022b2267f672d18ce4adb (diff) | |
download | illumos-gate-c050a449559fc53eab7574bb8f3d5f4bd85211f3.tar.gz |
6953251 Comstar iscsi target cannot work with Starport iscsi initiator
6952103 COMSTAR iscsit ignores negotiated numerical values that are clipped to the target limit
-rw-r--r-- | usr/src/uts/common/io/comstar/port/iscsit/iscsit.h | 4 | ||||
-rw-r--r-- | usr/src/uts/common/io/comstar/port/iscsit/iscsit_login.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/io/ib/clients/iser/iser_idm.c | 26 |
3 files changed, 23 insertions, 14 deletions
diff --git a/usr/src/uts/common/io/comstar/port/iscsit/iscsit.h b/usr/src/uts/common/io/comstar/port/iscsit/iscsit.h index da9095588f..f309fabb14 100644 --- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit.h +++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit.h @@ -38,9 +38,9 @@ #define ISCSIT_MAX_VERSION 0x00 #define ISCSIT_MAX_CONNECTIONS 32 /* MC/S support */ #define ISCSIT_MAX_RECV_DATA_SEGMENT_LENGTH (32*1024) -#define ISCSIT_MAX_BURST_LENGTH (512*1024) +#define ISCSIT_MAX_BURST_LENGTH (1024*1024) #define ISCSIT_MAX_FIRST_BURST_LENGTH ISCSI_DEFAULT_FIRST_BURST_LENGTH -#define ISCSIT_MAX_TIME2WAIT ISCSI_DEFAULT_TIME_TO_WAIT +#define ISCSIT_MAX_TIME2WAIT ISCSI_MAX_TIME2WAIT #define ISCSIT_MAX_TIME2RETAIN ISCSI_DEFAULT_TIME_TO_RETAIN #define ISCSIT_MAX_OUTSTANDING_R2T ISCSI_DEFAULT_MAX_OUT_R2T #define ISCSIT_MAX_ERROR_RECOVERY_LEVEL 0 diff --git a/usr/src/uts/common/io/comstar/port/iscsit/iscsit_login.c b/usr/src/uts/common/io/comstar/port/iscsit/iscsit_login.c index 0c0086ebc4..e65e9a30a5 100644 --- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit_login.c +++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit_login.c @@ -2481,8 +2481,10 @@ iscsit_handle_boolean(iscsit_conn_t *ict, nvpair_t *nvp, boolean_t value, if (value != iscsit_value) { /* Respond back to initiator with our value */ value = iscsit_value; + nvrc = nvlist_add_boolean_value( + lsm->icl_negotiated_values, + ikvx->ik_key_name, value); lsm->icl_login_transit = B_FALSE; - nvrc = 0; } else { /* Add this to our negotiated values */ nvrc = nvlist_add_nvpair(lsm->icl_negotiated_values, @@ -2521,8 +2523,9 @@ iscsit_handle_numerical(iscsit_conn_t *ict, nvpair_t *nvp, uint64_t value, if (value > iscsit_max_value) { /* Respond back to initiator with our value */ value = iscsit_max_value; + nvrc = nvlist_add_uint64(lsm->icl_negotiated_values, + ikvx->ik_key_name, value); lsm->icl_login_transit = B_FALSE; - nvrc = 0; } else { /* Add this to our negotiated values */ nvrc = nvlist_add_nvpair(lsm->icl_negotiated_values, diff --git a/usr/src/uts/common/io/ib/clients/iser/iser_idm.c b/usr/src/uts/common/io/ib/clients/iser/iser_idm.c index f59088b599..dc85278ee9 100644 --- a/usr/src/uts/common/io/ib/clients/iser/iser_idm.c +++ b/usr/src/uts/common/io/ib/clients/iser/iser_idm.c @@ -701,9 +701,9 @@ iser_handle_boolean(nvpair_t *nvp, boolean_t value, const idm_kv_xlate_t *ikvx, boolean_t iser_value, nvlist_t *request_nvl, nvlist_t *response_nvl, nvlist_t *negotiated_nvl) { - kv_status_t kvrc; + kv_status_t kvrc = KV_UNHANDLED; int nvrc; - boolean_t respond; + boolean_t respond = B_FALSE; if (value != iser_value) { /* @@ -711,9 +711,12 @@ iser_handle_boolean(nvpair_t *nvp, boolean_t value, const idm_kv_xlate_t *ikvx, * set the return value to unset the transit bit. */ value = iser_value; - kvrc = KV_HANDLED_NO_TRANSIT; - nvrc = 0; - respond = B_TRUE; + nvrc = nvlist_add_boolean_value(negotiated_nvl, + ikvx->ik_key_name, value); + if (nvrc == 0) { + kvrc = KV_HANDLED_NO_TRANSIT; + respond = B_TRUE; + } } else { /* Add this to our negotiated values */ @@ -747,9 +750,9 @@ iser_handle_numerical(nvpair_t *nvp, uint64_t value, const idm_kv_xlate_t *ikvx, uint64_t min_value, uint64_t max_value, uint64_t iser_max_value, nvlist_t *request_nvl, nvlist_t *response_nvl, nvlist_t *negotiated_nvl) { - kv_status_t kvrc; + kv_status_t kvrc = KV_UNHANDLED; int nvrc; - boolean_t respond; + boolean_t respond = B_FALSE; /* Validate against standard */ if ((value < min_value) || (value > max_value)) { @@ -761,9 +764,12 @@ iser_handle_numerical(nvpair_t *nvp, uint64_t value, const idm_kv_xlate_t *ikvx, * set the return value to unset the transit bit. */ value = iser_max_value; - kvrc = KV_HANDLED_NO_TRANSIT; - nvrc = 0; - respond = B_TRUE; + nvrc = nvlist_add_uint64(negotiated_nvl, + ikvx->ik_key_name, value); + if (nvrc == 0) { + kvrc = KV_HANDLED_NO_TRANSIT; + respond = B_TRUE; + } } else { /* Add this to our negotiated values */ nvrc = nvlist_add_nvpair(negotiated_nvl, nvp); |