lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 1 Aug 2014 17:29:38 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Dexuan Cui <decui@...rosoft.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"jkosina@...e.cz" <jkosina@...e.cz>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"driverdev-devel@...uxdriverproject.org" 
	<driverdev-devel@...uxdriverproject.org>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"apw@...onical.com" <apw@...onical.com>,
	"jasowang@...hat.com" <jasowang@...hat.com>
CC:	Haiyang Zhang <haiyangz@...rosoft.com>
Subject: RE: [PATCH] HID: hyperv: register as a wakeup source



> -----Original Message-----
> From: Dexuan Cui [mailto:decui@...rosoft.com]
> Sent: Friday, August 1, 2014 7:27 AM
> To: gregkh@...uxfoundation.org; jkosina@...e.cz; linux-
> input@...r.kernel.org; linux-kernel@...r.kernel.org; driverdev-
> devel@...uxdriverproject.org; olaf@...fle.de; apw@...onical.com;
> jasowang@...hat.com
> Cc: KY Srinivasan; Haiyang Zhang
> Subject: [PATCH] HID: hyperv: register as a wakeup source
> 
> With this patch, we can move the mouse to wake up the VM after the VM
> executes "echo freeze > /sys/power/state".
> 
> This addresses part of https://bugzilla.redhat.com/show_bug.cgi?id=1086100
> 
> Cc: K. Y. Srinivasan <kys@...rosoft.com>
> Signed-off-by: Dexuan Cui <decui@...rosoft.com>
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>

> ---
>  drivers/hid/hid-hyperv.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index
> f52dbcb..31fad64 100644
> --- a/drivers/hid/hid-hyperv.c
> +++ b/drivers/hid/hid-hyperv.c
> @@ -308,6 +308,9 @@ static void mousevsc_on_receive(struct hv_device
> *device,
>  		memcpy(input_dev->input_buf, input_report->buffer, len);
>  		hid_input_report(input_dev->hid_device,
> HID_INPUT_REPORT,
>  				 input_dev->input_buf, len, 1);
> +
> +		pm_wakeup_event(&input_dev->device->device, 0);
> +
>  		break;
>  	default:
>  		pr_err("unsupported hid msg type - type %d len %d", @@ -
> 549,6 +552,8 @@ static int mousevsc_probe(struct hv_device *device,
>  		goto probe_err2;
>  	}
> 
> +	device_init_wakeup(&device->device, true);
> +
>  	input_dev->connected = true;
>  	input_dev->init_complete = true;
> 
> @@ -571,6 +576,7 @@ static int mousevsc_remove(struct hv_device *dev)  {
>  	struct mousevsc_dev *input_dev = hv_get_drvdata(dev);
> 
> +	device_init_wakeup(&dev->device, false);
>  	vmbus_close(dev->channel);
>  	hid_hw_stop(input_dev->hid_device);
>  	hid_destroy_device(input_dev->hid_device);
> --
> 1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ