Bug 18892

Summary: [BUG, Regression, bisected] USB mouse causes bug on 1st insert, ignored on 2nd insert, lsusb stuck at usbdev_open
Product: Drivers Reporter: Maciej Rutecki (maciej.rutecki)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: CLOSED CODE_FIX    
Severity: normal CC: alex.vizor, guichaz, jikos, maciej.rutecki, philip, raa.lkml, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.36-rc4 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 16444    

Description Maciej Rutecki 2010-09-20 19:34:41 UTC
Subject    : [BUG, Regression, bisected] USB mouse causes bug on 1st insert, ignored on 2nd insert, lsusb stuck at usbdev_open
Submitter  : Phil Turmel <philip@turmel.org>
Date       : 2010-09-20 1:33
Message-ID : 4C96B9DB.8030403@turmel.org
References : http://marc.info/?l=linux-kernel&m=128494643327096&w=2

This entry is being used for tracking a regression from 2.6.35. Please don't
close it until the problem is fixed in the mainline.

Caused by:

commit 8fe294caf8c868edd9046251824a0af91991bf43
Author: Guillaume Chazarain <guichaz@gmail.com>
Date:   Sun Sep 12 21:32:35 2010 +0200

    HID: fix hiddev's use of usb_find_interface
    
    My macbook infrared remote control was broken by commit
    bd25f4dd6972755579d0ea50d1a5ace2e9b00d1a ("HID: hiddev: use
    usb_find_interface, get rid of BKL").
    
    This device appears in dmesg as:
    apple 0003:05AC:8242.0001: hiddev0,hidraw0: USB HID v1.11 Device
    [Apple Computer, Inc. IR Receiver] on usb-0000:00:1d.2-1/input0
    
    It stopped working as lircd was getting ENODEV when opening /dev/usb/hiddev0.
    
    AFAICS hiddev_driver is a dummy driver so usb_find_interface(&hiddev_driver)
    does not find anything.
    
    The device is associated with the usbhid driver, so let's do
    usb_find_interface(&hid_driver) instead.
    
    $ ls -l /sys/devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0/usb/hiddev0/device/driver
    lrwxrwxrwx 1 root root 0 2010-09-12 16:28 /sys/devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0/usb/hiddev0/device/driver -> ../../../../../../bus/usb/drivers/usbhid
    
    Signed-off-by: Guillaume Chazarain <guichaz@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>


First-Bad-Commit : 8fe294caf8c868edd9046251824a0af91991bf43
Comment 1 Jiri Kosina 2010-09-21 16:35:01 UTC
Patch fixing the issue available at

http://lkml.org/lkml/2010/9/21/160
Comment 2 Rafael J. Wysocki 2010-09-21 18:30:18 UTC
Patch : https://patchwork.kernel.org/patch/197272/
Handled-By : Alan Stern <stern@rowland.harvard.edu>
Comment 3 Greg Kroah-Hartman 2010-09-21 21:23:28 UTC
*** Bug 18922 has been marked as a duplicate of this bug. ***
Comment 4 Rafael J. Wysocki 2010-09-26 20:11:58 UTC
Fixed by commit 0026e00523a85b90a92a93ddf6660939ecef3e54 .