dm: mei: check for state before link reset callback

Prevent intercepting reset callback if reset state
transition is already in progress.

Tracked-On: #1846
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Alexander Usyskin 2018-11-19 09:45:18 +02:00 committed by lijinxia
parent 58ab26ea38
commit 844553ef23
1 changed files with 3 additions and 0 deletions

View File

@ -1984,6 +1984,9 @@ vmei_reset_callback(int fd, enum ev_type type, void *param)
char buf[MEI_DEV_STATE_LEN] = {0};
int sz;
if (vmei->status != VMEI_STS_READY)
return;
lseek(fd, 0, SEEK_SET);
sz = read(fd, buf, 12);
if (first_time) {