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:	Wed, 27 Jan 2010 07:57:48 -0700
From:	"Rick L. Vinyard, Jr." <rvinyard@...nmsu.edu>
To:	"Jiri Kosina" <jkosina@...e.cz>
Cc:	"Linux" <linux-kernel@...r.kernel.org>,
	"Linux USB" <linux-usb@...r.kernel.org>
Subject: Re: usbhid driver: replacing resume or using a post resume function

Jiri Kosina wrote:
> On Tue, 26 Jan 2010, Rick L. Vinyard, Jr. wrote:
>
>> I was looking for an example of a hid driver that needs to customize
>> resume or provides a post resume function, but couldn't find one.
>>
>> I would like to implement some post resume code. In particular, the g13
>> on
>> resume loses the backlight color, LCD image and LED state. On resume, it
>> needs feature reports sent to re-establish these settings.
>>
>> However, I couldn't find a way to either provide a post resume function
>> or
>> replace resume with a call to hid_resume() followed by the feature
>> reports.
>>
>> Any suggestions?
>
> Current HID / USBHID code doesn't allow for that. But implementing that
> should be pretty straightforward, you can define callbacks in the
> hid_device struct and then redirect to them instead of the default ones,
> when they are initialized.

Sounds good. I was actually thinking of doing a post_reset() and
post_resume().

I think the most common case would be for something like the G13 to
re-establish settings, which from the few devices I'm familiar with would
need to restart the hid subsystem first and then re-establish through
feature reports, et. al. after the hid_resume().

Also, that means that usbhid's hid_resume() doesn't need to be exposed in
the API, or even need to be usb specific.

>
> If you submit this patch together (but separately) with your Logitech G13
> driver, there shouldn't be any obstacle merging it.
>

Sounds good.

Thanks,

Rick

--
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