nvme/opal: remove timeout
The timeout is designed for REVERT action, the REVERT needs even several minutes based on different drives. Due to the REVERT is low level API, it does need a response from the drive, even we returned the timeout to the user, the drive is still in the REVERT state, and it can't be used anymore, so the timeout here doesn't help anything, just remove it. Change-Id: I8f5119630d52f40e5bacea8ef8f3c771ee001aeb Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1665 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
d5de4af2bc
commit
76d8bbf3f8
@ -50,8 +50,6 @@ opal_security_recv(struct spdk_opal_dev *dev, struct opal_session *sess)
|
||||
void *response = sess->resp;
|
||||
struct spdk_opal_compacket *header = response;
|
||||
int ret = 0;
|
||||
uint64_t start = spdk_get_ticks();
|
||||
uint64_t now;
|
||||
|
||||
do {
|
||||
memset(response, 0, IO_BUFFER_LENGTH);
|
||||
@ -67,18 +65,12 @@ opal_security_recv(struct spdk_opal_dev *dev, struct opal_session *sess)
|
||||
|
||||
if (header->outstanding_data == 0 &&
|
||||
header->min_transfer == 0) {
|
||||
return 0; /* return if all the response data are ready by tper and received by host */
|
||||
} else { /* check timeout */
|
||||
now = spdk_get_ticks();
|
||||
if (now - start > dev->timeout * spdk_get_ticks_hz()) {
|
||||
SPDK_ERRLOG("Secutiy Receive Timeout on dev = %p\n", dev);
|
||||
return 0x0F; /* TPer Malfunction */
|
||||
}
|
||||
/* return if all the response data are ready by tper and received by host */
|
||||
return 0;
|
||||
}
|
||||
} while (true);
|
||||
|
||||
} while (!ret);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1802,7 +1794,6 @@ struct spdk_opal_dev *
|
||||
}
|
||||
|
||||
dev->ctrlr = ctrlr;
|
||||
dev->timeout = SPDK_OPAL_TPER_TIMEOUT;
|
||||
|
||||
payload = calloc(1, IO_BUFFER_LENGTH);
|
||||
if (!payload) {
|
||||
|
@ -43,8 +43,6 @@
|
||||
#define OPAL_KEY_MAX 256
|
||||
#define OPAL_UID_LENGTH 8
|
||||
|
||||
#define SPDK_OPAL_TPER_TIMEOUT 600 /* seconds */
|
||||
|
||||
#define GENERIC_HOST_SESSION_NUM 0x69
|
||||
|
||||
#define OPAL_INVAL_PARAM 12
|
||||
@ -257,7 +255,6 @@ struct spdk_opal_dev {
|
||||
|
||||
struct spdk_opal_d0_features_info feat_info;
|
||||
|
||||
uint64_t timeout; /* seconds */
|
||||
uint8_t max_ranges; /* max locking range number */
|
||||
struct spdk_opal_locking_range_info locking_ranges[SPDK_OPAL_MAX_LOCKING_RANGE];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user