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]
Message-ID: <d120d5000703301114r420a9604i34b6a015e6bad285@mail.gmail.com>
Date:	Fri, 30 Mar 2007 14:14:20 -0400
From:	"Dmitry Torokhov" <dmitry.torokhov@...il.com>
To:	"Pete Zaitcev" <zaitcev@...hat.com>
Cc:	"Jiri Kosina" <jkosina@...e.cz>,
	linux-usb-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, stuard_hayes@...l.com
Subject: Re: usb hid: reset NumLock

Hi Pete,

On 3/30/07, Pete Zaitcev <zaitcev@...hat.com> wrote:
>
> I didn't like a) layering violation, and b) that they defeat filtering
> unconditionally. Why have any filtering then?
>
> Instead, I propose for USB HID driver to reset NumLock on probe. Like this:
>
> --- a/drivers/usb/input/hid-core.c
> +++ b/drivers/usb/input/hid-core.c
> @@ -458,6 +458,18 @@ static int usb_hidinput_input_event(struct input_dev *dev, unsigned int type, un
>        return 0;
>  }
>
> +static void usbhid_set_leds(struct hid_device *hid, unsigned int code, int val)
> +{
> +       struct hid_field *field;
> +       int offset;
> +
> +       /* This is often called for the mouse half. */
> +       if ((offset = hidinput_find_field(hid, EV_LED, code, &field)) != -1) {
> +               hid_set_field(field, offset, val);
> +               usbhid_submit_report(hid, field->report, USB_DIR_OUT);
> +       }
> +}
> +

This is fine and that's what we do in atkbd probe but maybe we should
move that in input core and reset leds as part of
input_register_device()?

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