libnvme: fix ep timeout during admin_passthru
Before the fix, the timeout will only increase and will change the
default settings. After the fix, the timeout can be decrease and
also it won't change the default setttings.
Tested:
std::cerr << "Default timeout before passthru: " << nvme_mi_ep_get_timeout(self->nvmeEP) << std::endl;
int nvme_status = nvme_mi_admin_admin_passthru();
std::cerr << "Default timeout after passthru: " << nvme_mi_ep_get_timeout(self->nvmeEP) << std::endl;
Before the fix:
Default timeout before passthru: 5000
Default timeout after passthru: 10000
After the fix:
Default timeout before passthru: 5000
Default timeout after passthru: 5000
Change-Id: I63a8fc1ac15fd5348fc6b0af5a40fc68f6c0a08f
Signed-off-by: Jinliang Wang <jinliangw@google.com>
3 files changed