Implement zetSysmanDeviceReset

Implemented function level reset.

Implementation is:
Make sure we are root (otherwise, return insufficient permissions)
Make sure no one has the device open
    (otherwise, return hande object in use)
Close our file handle
Unbind the device from the kernel driver
Make sure no one still has the device open
    (otherwise, kill them)
Perform function level reset (FLR)
Rebind the device to the kernel driver

Change-Id: Ic57b95487e73b5a5f2d03e619d813bf4199adf40
Signed-off-by: Bill Jordan <bill.jordan@intel.com>
This commit is contained in:
Bill Jordan
2020-03-19 12:36:29 -04:00
committed by sys_ocldev
parent 47e3e7c8eb
commit 7c489ac60d
20 changed files with 721 additions and 292 deletions

View File

@@ -11,7 +11,6 @@
#include "level_zero/core/source/device.h"
#include "sysman/linux/os_sysman_imp.h"
#include "sysman/linux/sysfs_access.h"
#include "sysman/pci/os_pci.h"
#include "sysman/pci/pci_imp.h"