dm: virtio: add support for VBS-K device reset

A new ioctl is introduced in VBS-K to issue reset command to kernel
VBS-K driver. This is used to support VBS-K S3. When FE enters S3
reset command is sent to device model. Backend driver in device model
should use this ioctl to inform the VBS-K drvier in kernel.

Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Jian Jun Chen 2018-08-01 15:02:42 +08:00 committed by lijinxia
parent 16a817489a
commit 1378a8440a
2 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,7 @@ vbs_kernel_init(int fd)
int
vbs_kernel_reset(int fd)
{
return VIRTIO_SUCCESS;
return ioctl(fd, VBS_K_RESET_DEV, NULL);
}
/*

View File

@ -43,5 +43,6 @@ struct vbs_dev_info {
#define VBS_K_SET_DEV _IOW(VBS_K_IOCTL, 0x00, struct vbs_dev_info)
#define VBS_K_SET_VQ _IOW(VBS_K_IOCTL, 0x01, struct vbs_vqs_info)
#define VBS_K_RESET_DEV _IO(VBS_K_IOCTL, 0x02)
#endif /* _VBS_COMMON_IF_H_ */