2009-03-25 23:07:40

by Jiri Kosina

[permalink] [raw]
Subject: What's in hid.git for 2.6.30

Hi,

below is the list of changes queued in HID tree for 2.6.30.

Apart from the usual stuff (support for new devices, small fixes), the
most notable change is USB autosuspend support for the usbhid driver
written by Oliver Neukum.

Also the compat stuff for legacy hotplug is scheduled for removal.

Anssi Hannula (1):
HID: add support for another version of 0e8f:0003 device in hid-pl

Jiri Kosina (5):
HID: bring back possibility to specify vid/pid ignore on module load
HID: do not try to compile PM code with CONFIG_PM unset
HID: hid_reset_resume() needs to be defined only when CONFIG_PM is set
HID: support for Kensington slimblade device
HID: add support for Kye/Genius Ergo 525V

Jiri Slaby (1):
HID: remove compat stuff

Oliver Neukum (4):
HID: autosuspend support for USB HID
HID: fix race between usb_register_dev() and hiddev_open()
HID: fix USB HID devices after STD with autosuspend
HID: autosuspend -- fix lockup of hid on reset

Paul Collins (1):
HID: constify arrays of struct apple_key_translation

Pavel Machek (1):
HID: make HID_DEBUG defaults consistent

Richard Walmsley (1):
HID: DragonRise game controller force feedback driver

Ryan Finnie (1):
HID: Support Apple mini aluminum keyboard

--
Jiri Kosina
SUSE Labs


2009-04-30 22:31:28

by Guillaume Chazarain

[permalink] [raw]
Subject: Re: What's in hid.git for 2.6.30

Hello,

On Thu, Mar 26, 2009 at 1:07 AM, Jiri Kosina <[email protected]> wrote:
>      HID: autosuspend support for USB HID

Testing 2.6.30-rc4 this patch breaks the IR remote control on my
macbook pro (ubuntu 9.04 x86_64).
Pressing a button on the Apple A1156 triggers a kernel panic,
reverting that patch fixes it.

BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<ffffffffa018c432>] hid_check_keys_pressed+0x12/0x60 [hid]
PGD 0
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
CPU 1
Modules linked in: netconsole configfs af_packet rfcomm btusb sco
bridge stp llc bnep l2cap bluetooth container acpi_cpufreq
snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep
snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_seq_midi_event
snd_seq snd_timer snd_seq_device applesmc snd uvcvideo led_class
soundcore video iTCO_wdt videodev appletouch hid_apple i2c_core
input_polldev evdev snd_page_alloc iTCO_vendor_support intel_agp
processor output battery button v4l1_compat v4l2_compat_ioctl32 ac
usbhid hid ext3 jbd mbcache sg sd_mod sr_mod cdrom pata_acpi ata_piix
libata scsi_mod sky2 ehci_hcd uhci_hcd usbcore thermal fan thermal_sys
fuse
Pid: 0, comm: swapper Not tainted 2.6.30-rc4-custom-gc #1 MacBookPro3,1
RIP: 0010:[<ffffffffa018c432>] [<ffffffffa018c432>]
hid_check_keys_pressed+0x12/0x60 [hid]
RSP: 0018:ffff88000102dd18 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffff88007e8c5000 RCX: 0000000000000001
RDX: ffff880079950800 RSI: ffff8800371759f0 RDI: ffff880037174000
RBP: ffff88000102dd18 R08: ffff8800799c5918 R09: 0000000000000000
R10: 0000000000000004 R11: 00000000ffffff00 R12: 0000000000000000
R13: ffff88007e8c5000 R14: ffff88003757c000 R15: ffff880037174000
FS: 0000000000000000(0000) GS:ffff88000102a000(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 0000000000201000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff88007e890000, task ffff88007e884350)
Stack:
ffff88000102dd58 ffffffffa019fb14 0000000000000086 ffff88007e8c5000
ffff880036d8c800 0000000000000000 ffff88007a0ac800 ffff880036d8c978
ffff88000102dd88 ffffffffa0038320 ffff88000102dd88 ffff880036d8ca00
Call Trace:
<IRQ> <0> [<ffffffffa019fb14>] hid_irq_in+0x1f4/0x240 [usbhid]
[<ffffffffa0038320>] usb_hcd_giveback_urb+0x60/0xe0 [usbcore]
[<ffffffffa0067c6e>] uhci_giveback_urb+0xae/0x2f0 [uhci_hcd]
[<ffffffffa00749b8>] ? timer_action+0x48/0x60 [ehci_hcd]
[<ffffffffa00763a6>] ? ehci_work+0x886/0xac0 [ehci_hcd]
[<ffffffffa0068354>] uhci_scan_schedule+0x354/0xab0 [uhci_hcd]
[<ffffffffa006ad61>] uhci_irq+0x91/0x190 [uhci_hcd]
[<ffffffffa0037c80>] usb_hcd_irq+0x40/0xb0 [usbcore]
[<ffffffff8028ad34>] handle_IRQ_event+0xc4/0x260
[<ffffffff8028cb9c>] handle_fasteoi_irq+0x7c/0xf0
[<ffffffff8020e65f>] handle_irq+0x1f/0x30
[<ffffffff8020dd5a>] do_IRQ+0x6a/0xf0
[<ffffffff8020c913>] ret_from_intr+0x0/0xf
<EOI> <0> [<ffffffffa01d7631>] ? acpi_idle_enter_bm+0x274/0x2a2 [processor]
[<ffffffffa01d7627>] ? acpi_idle_enter_bm+0x26a/0x2a2 [processor]
[<ffffffff80402ca5>] ? cpuidle_idle_call+0xa5/0x100
[<ffffffff8020b11e>] ? cpu_idle+0x6e/0xe0
[<ffffffff804921f6>] ? start_secondary+0x1bd/0x2a7
Code: b7 10 66 85 d2 75 ce 66 90 31 c0 eb 92 66 66 66 2e 0f 1f 84 00
00 00 00 00 55 48 8d b7 f0 19 00 00 48 8b 87 f0 19 00 00 48 89 e5 <48>
8b 08 48 39 f0 0f 18 09 74 2e 48 8b 50 18 31 c0 0f 1f 44 00
RIP [<ffffffffa018c432>] hid_check_keys_pressed+0x12/0x60 [hid]
RSP <ffff88000102dd18>
CR2: 0000000000000000
---[ end trace 4bd9a2f21c16185f ]---
Kernel panic - not syncing: Fatal exception in interrupt
Pid: 0, comm: swapper Tainted: G D 2.6.30-rc4-custom-gc #1
Call Trace:
<IRQ> [<ffffffff80495019>] panic+0xaa/0x172
[<ffffffff80498b04>] ? _spin_unlock_irqrestore+0x24/0x60
[<ffffffff80244815>] ? release_console_sem+0x1e5/0x230
[<ffffffff80244ae5>] ? console_unblank+0x75/0x90
[<ffffffff80499dd4>] oops_end+0xd4/0xe0
[<ffffffff802287f8>] no_context+0xe8/0x260
[<ffffffff80228ac5>] __bad_area_nosemaphore+0x155/0x1f0
[<ffffffff8023516e>] ? __wake_up+0x4e/0x70
[<ffffffffa01a290c>] ? hiddev_send_event+0xec/0x100 [usbhid]
[<ffffffff80228b6e>] bad_area_nosemaphore+0xe/0x10
[<ffffffff8049b786>] do_page_fault+0x2f6/0x3b0
[<ffffffff8049906f>] page_fault+0x1f/0x30
[<ffffffffa018c432>] ? hid_check_keys_pressed+0x12/0x60 [hid]
[<ffffffffa019fb14>] hid_irq_in+0x1f4/0x240 [usbhid]
[<ffffffffa0038320>] usb_hcd_giveback_urb+0x60/0xe0 [usbcore]
[<ffffffffa0067c6e>] uhci_giveback_urb+0xae/0x2f0 [uhci_hcd]
[<ffffffffa00749b8>] ? timer_action+0x48/0x60 [ehci_hcd]
[<ffffffffa00763a6>] ? ehci_work+0x886/0xac0 [ehci_hcd]
[<ffffffffa0068354>] uhci_scan_schedule+0x354/0xab0 [uhci_hcd]
[<ffffffffa006ad61>] uhci_irq+0x91/0x190 [uhci_hcd]
[<ffffffffa0037c80>] usb_hcd_irq+0x40/0xb0 [usbcore]
[<ffffffff8028ad34>] handle_IRQ_event+0xc4/0x260
[<ffffffff8028cb9c>] handle_fasteoi_irq+0x7c/0xf0
[<ffffffff8020e65f>] handle_irq+0x1f/0x30
[<ffffffff8020dd5a>] do_IRQ+0x6a/0xf0
[<ffffffff8020c913>] ret_from_intr+0x0/0xf
<EOI> [<ffffffffa01d7631>] ? acpi_idle_enter_bm+0x274/0x2a2 [processor]
[<ffffffffa01d7627>] ? acpi_idle_enter_bm+0x26a/0x2a2 [processor]
[<ffffffff80402ca5>] ? cpuidle_idle_call+0xa5/0x100
[<ffffffff8020b11e>] ? cpu_idle+0x6e/0xe0
[<ffffffff804921f6>] ? start_secondary+0x1bd/0x2a7

.config and dmesg attached.

Cheers.

--
Guillaume


Attachments:
dmesg (33.38 kB)
config (58.06 kB)
Download all attachments

2009-04-30 22:46:25

by Jiri Kosina

[permalink] [raw]
Subject: Re: What's in hid.git for 2.6.30

On Fri, 1 May 2009, Guillaume Chazarain wrote:

> Testing 2.6.30-rc4 this patch breaks the IR remote control on my macbook
> pro (ubuntu 9.04 x86_64). Pressing a button on the Apple A1156 triggers
> a kernel panic, reverting that patch fixes it.
>
> BUG: unable to handle kernel NULL pointer dereference at (null)
> IP: [<ffffffffa018c432>] hid_check_keys_pressed+0x12/0x60 [hid]
> PGD 0
> Oops: 0000 [#1] PREEMPT SMP
> last sysfs file: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
> CPU 1
> Modules linked in: netconsole configfs af_packet rfcomm btusb sco
> bridge stp llc bnep l2cap bluetooth container acpi_cpufreq
> snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep
> snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_seq_midi_event
> snd_seq snd_timer snd_seq_device applesmc snd uvcvideo led_class
> soundcore video iTCO_wdt videodev appletouch hid_apple i2c_core
> input_polldev evdev snd_page_alloc iTCO_vendor_support intel_agp
> processor output battery button v4l1_compat v4l2_compat_ioctl32 ac
> usbhid hid ext3 jbd mbcache sg sd_mod sr_mod cdrom pata_acpi ata_piix
> libata scsi_mod sky2 ehci_hcd uhci_hcd usbcore thermal fan thermal_sys
> fuse
> Pid: 0, comm: swapper Not tainted 2.6.30-rc4-custom-gc #1 MacBookPro3,1
> RIP: 0010:[<ffffffffa018c432>] [<ffffffffa018c432>]
> hid_check_keys_pressed+0x12/0x60 [hid]
> RSP: 0018:ffff88000102dd18 EFLAGS: 00010046
> RAX: 0000000000000000 RBX: ffff88007e8c5000 RCX: 0000000000000001
> RDX: ffff880079950800 RSI: ffff8800371759f0 RDI: ffff880037174000
> RBP: ffff88000102dd18 R08: ffff8800799c5918 R09: 0000000000000000
> R10: 0000000000000004 R11: 00000000ffffff00 R12: 0000000000000000
> R13: ffff88007e8c5000 R14: ffff88003757c000 R15: ffff880037174000
> FS: 0000000000000000(0000) GS:ffff88000102a000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
> CR2: 0000000000000000 CR3: 0000000000201000 CR4: 00000000000006e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process swapper (pid: 0, threadinfo ffff88007e890000, task ffff88007e884350)
> Stack:
> ffff88000102dd58 ffffffffa019fb14 0000000000000086 ffff88007e8c5000
> ffff880036d8c800 0000000000000000 ffff88007a0ac800 ffff880036d8c978
> ffff88000102dd88 ffffffffa0038320 ffff88000102dd88 ffff880036d8ca00
> Call Trace:
> <IRQ> <0> [<ffffffffa019fb14>] hid_irq_in+0x1f4/0x240 [usbhid]
> [<ffffffffa0038320>] usb_hcd_giveback_urb+0x60/0xe0 [usbcore]
> [<ffffffffa0067c6e>] uhci_giveback_urb+0xae/0x2f0 [uhci_hcd]
> [<ffffffffa00749b8>] ? timer_action+0x48/0x60 [ehci_hcd]
> [<ffffffffa00763a6>] ? ehci_work+0x886/0xac0 [ehci_hcd]
> [<ffffffffa0068354>] uhci_scan_schedule+0x354/0xab0 [uhci_hcd]
> [<ffffffffa006ad61>] uhci_irq+0x91/0x190 [uhci_hcd]
> [<ffffffffa0037c80>] usb_hcd_irq+0x40/0xb0 [usbcore]
> [<ffffffff8028ad34>] handle_IRQ_event+0xc4/0x260
> [<ffffffff8028cb9c>] handle_fasteoi_irq+0x7c/0xf0
> [<ffffffff8020e65f>] handle_irq+0x1f/0x30
> [<ffffffff8020dd5a>] do_IRQ+0x6a/0xf0
> [<ffffffff8020c913>] ret_from_intr+0x0/0xf
> <EOI> <0> [<ffffffffa01d7631>] ? acpi_idle_enter_bm+0x274/0x2a2 [processor]
> [<ffffffffa01d7627>] ? acpi_idle_enter_bm+0x26a/0x2a2 [processor]
> [<ffffffff80402ca5>] ? cpuidle_idle_call+0xa5/0x100
> [<ffffffff8020b11e>] ? cpu_idle+0x6e/0xe0
> [<ffffffff804921f6>] ? start_secondary+0x1bd/0x2a7
> Code: b7 10 66 85 d2 75 ce 66 90 31 c0 eb 92 66 66 66 2e 0f 1f 84 00
> 00 00 00 00 55 48 8d b7 f0 19 00 00 48 8b 87 f0 19 00 00 48 89 e5 <48>
> 8b 08 48 39 f0 0f 18 09 74 2e 48 8b 50 18 31 c0 0f 1f 44 00
> RIP [<ffffffffa018c432>] hid_check_keys_pressed+0x12/0x60 [hid]
> RSP <ffff88000102dd18>
> CR2: 0000000000000000

Does the pathc below fix the problem for you?


drivers/hid/hid-core.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 5746a59..8f26403 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1824,6 +1824,9 @@ int hid_check_keys_pressed(struct hid_device *hid)
struct hid_input *hidinput;
int i;

+ if (!(hid->claimed & HID_CLAIMED_INPUT))
+ return 0;
+
list_for_each_entry(hidinput, &hid->inputs, list) {
for (i = 0; i < BITS_TO_LONGS(KEY_MAX); i++)
if (hidinput->input->key[i])

--
Jiri Kosina
SUSE Labs

2009-04-30 23:02:40

by Oliver Neukum

[permalink] [raw]
Subject: Re: What's in hid.git for 2.6.30

Am Freitag, 1. Mai 2009 00:45:51 schrieb Jiri Kosina:
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1824,6 +1824,9 @@ int hid_check_keys_pressed(struct hid_device *hid)
> ????????struct hid_input *hidinput;
> ????????int i;
> ?
> +???????if (!(hid->claimed & HID_CLAIMED_INPUT))
> +???????????????return 0;
> +

Jiri,

is there a guarantee all keyboards will be claimed as input devices?

Regards
Oliver

2009-04-30 23:09:21

by Jiri Kosina

[permalink] [raw]
Subject: Re: What's in hid.git for 2.6.30

On Fri, 1 May 2009, Oliver Neukum wrote:

> > --- a/drivers/hid/hid-core.c
> > +++ b/drivers/hid/hid-core.c
> > @@ -1824,6 +1824,9 @@ int hid_check_keys_pressed(struct hid_device *hid)
> > ????????struct hid_input *hidinput;
> > ????????int i;
> > ?
> > +???????if (!(hid->claimed & HID_CLAIMED_INPUT))
> > +???????????????return 0;
> > +
> is there a guarantee all keyboards will be claimed as input devices?

Hi Oliver,

do you see any way how hid->inputs could currently be initialized other
than the device being claimed by hid-input?

--
Jiri Kosina
SUSE Labs

2009-04-30 23:37:20

by Guillaume Chazarain

[permalink] [raw]
Subject: Re: What's in hid.git for 2.6.30

On Fri, May 1, 2009 at 12:45 AM, Jiri Kosina <[email protected]> wrote:
> Does the pathc below fix the problem for you?

Yes, the remote control works fine now. Thanks for the awesomely fast response!

Cheers.

--
Guillaume