Bug 12301 - Fingerprint reader doesn't respod after the first use
Summary: Fingerprint reader doesn't respod after the first use
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-26 01:41 UTC by David Roka
Modified: 2009-02-05 16:52 UTC (History)
11 users (show)

See Also:
Kernel Version: >2.6.28-rc8-git4
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
lsusb output (26.62 KB, text/plain)
2008-12-26 01:43 UTC, David Roka
Details
usbmon of tf-tool --acquire with stock 2.6.28 kernel (3.64 KB, text/plain)
2008-12-28 02:50 UTC, Erik Ekman
Details
usbmon of tf-tool --acquire with 2.6.28 kernel with commit 24c099.. reverted (32.75 KB, text/plain)
2008-12-28 02:52 UTC, Erik Ekman
Details
usbmon of attempted login with swipe, stock 2.6.28 (3.48 KB, text/plain)
2008-12-28 15:22 UTC, Erik Ekman
Details
usbmon log of working login swipe, 2.6.28 with commit 24c099 reverted (9.94 KB, text/plain)
2008-12-28 15:24 UTC, Erik Ekman
Details
Patch to enable interface after driver release (5.65 KB, patch)
2008-12-30 12:48 UTC, Alan Stern
Details | Diff
don't send a direct Set-Config request in _libthinkfinger_usb_hello (941 bytes, patch)
2009-01-02 08:38 UTC, Timo Hoenig
Details | Diff
Track toggle state in disable-endpoint paths (5.36 KB, patch)
2009-01-26 06:59 UTC, Alan Stern
Details | Diff

Description David Roka 2008-12-26 01:41:56 UTC
Latest working kernel version: 2.6.28-rc8-00067-g9a9fafb
Earliest failing kernel version:
Distribution: Gentoo
Hardware Environment: HP 2510p, aes2501 fprint reader
Software Environment:
Problem Description:
The fingerprint reader doesn't respod after the first use, until I reload the 'ehci-hci' module.
After some bisecting I think the problem is in the '24c0996a6b73e2554104961afcc8659534503e0d' commit.
Steps to reproduce: I use the fingerprint reader
Comment 1 David Roka 2008-12-26 01:43:12 UTC
Created attachment 19486 [details]
lsusb output
Comment 2 David Roka 2008-12-26 01:45:28 UTC
Sorry, i've a clerical error, i reload the ehci_hcd module
Comment 3 David Roka 2008-12-26 02:00:30 UTC
if i skip the '24c0996a6b73e2554104961afcc8659534503e0d' commit, than the fingerprint reader is work
Comment 4 Anonymous Emailer 2008-12-26 12:59:51 UTC
Reply-To: akpm@linux-foundation.org


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Fri, 26 Dec 2008 01:41:57 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=12301
> 
>            Summary: Fingerprint reader doesn't respod after the first use
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: >2.6.28-rc8-git4
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: USB
>         AssignedTo: greg@kroah.com
>         ReportedBy: roka@dawid.hu
> 
> 
> Latest working kernel version: 2.6.28-rc8-00067-g9a9fafb
> Earliest failing kernel version:
> Distribution: Gentoo
> Hardware Environment: HP 2510p, aes2501 fprint reader
> Software Environment:
> Problem Description:
> The fingerprint reader doesn't respod after the first use, until I reload the
> 'ehci-hci' module.
> After some bisecting I think the problem is in the
> '24c0996a6b73e2554104961afcc8659534503e0d' commit.
> Steps to reproduce: I use the fingerprint reader
> 

A regression caused by:

commit 24c0996a6b73e2554104961afcc8659534503e0d
Author:     Alan Stern <stern@rowland.harvard.edu>
AuthorDate: Mon Dec 1 10:24:41 2008 -0500
Commit:     Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Wed Dec 17 10:49:14 2008 -0800

    USB: skip Set-Interface(0) if already in altsetting 0
Comment 5 Alan Stern 2008-12-26 18:49:52 UTC
Please attach 
Comment 6 Alan Stern 2008-12-26 18:50:49 UTC
On Fri, 26 Dec 2008, Andrew Morton wrote:

> > http://bugzilla.kernel.org/show_bug.cgi?id=12301
> > 
> >            Summary: Fingerprint reader doesn't respod after the first use

> > The fingerprint reader doesn't respod after the first use, until I reload
> the
> > 'ehci-hci' module.
> > After some bisecting I think the problem is in the
> > '24c0996a6b73e2554104961afcc8659534503e0d' commit.

> Author:     Alan Stern <stern@rowland.harvard.edu>
> AuthorDate: Mon Dec 1 10:24:41 2008 -0500
> Commit:     Greg Kroah-Hartman <gregkh@suse.de>
> CommitDate: Wed Dec 17 10:49:14 2008 -0800
> 
>     USB: skip Set-Interface(0) if already in altsetting 0

Please attach to the bug report some usbmon traces showing what happens
when you try to use the fingerprint reader more than once: one trace
with this commit present and one with the commit dropped.  Instructions 
for usbmon are in the kernel source file Documentation/usb/usbmon.txt.

Alan Stern
Comment 7 Erik Ekman 2008-12-27 19:25:14 UTC
I have the same problem, with a Thinkpad x06s and 0483:2016 SGS Thomson Microelectronics Fingerprint Reader, and I just located the same commit before I found this bug..

Will do usbmon trace tomorrow.
Comment 8 Erik Ekman 2008-12-28 02:50:37 UTC
Created attachment 19505 [details]
usbmon of tf-tool --acquire with stock 2.6.28 kernel
Comment 9 Erik Ekman 2008-12-28 02:52:04 UTC
Created attachment 19506 [details]
usbmon of tf-tool --acquire with 2.6.28 kernel with commit 24c099.. reverted

tf-tool is part of the thinkfinger(.sf.net) software.
Comment 10 Erik Ekman 2008-12-28 02:59:55 UTC
Actually, my UPEK TouchStrip-reader does not even work once with the stock 2.6.28 kernel. The tf-tool fails before I can scan at all.
Comment 11 Erik Ekman 2008-12-28 15:22:51 UTC
Created attachment 19510 [details]
usbmon of attempted login with swipe, stock 2.6.28
Comment 12 Erik Ekman 2008-12-28 15:24:08 UTC
Created attachment 19511 [details]
usbmon log of working login swipe, 2.6.28 with commit 24c099 reverted
Comment 13 Alan Stern 2008-12-30 12:48:04 UTC
Created attachment 19550 [details]
Patch to enable interface after driver release

For those who didn't see it in the mailing list, this patch fixes the problem.  It will be submitted and should end up in a 2.6.28.stable kernel.
Comment 14 Alon Bar-Lev 2008-12-30 23:28:48 UTC
Works for me.
Comment 15 Dieter Ries 2009-01-02 02:23:13 UTC
It works here, too, but thuinkfinger now it is really slow.
After doing "su", it takes up to 10 seconds until 
"Password or swipe finger:" appears, and then it takes up to another 10 seconds, until it accepts finger sweeps.
This is gentoo on a Thinkpad T60,
Bus 005 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
latest git kernel, libusb 0.1.12
Comment 16 Dieter Ries 2009-01-02 02:50:54 UTC
Oh yeah, my english really rocks today ... sorry for that.
I straced a su command, and there are thousands of

[pid 30406] select(5, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
[pid 30406] ioctl(4, USBDEVFS_REAPURBNDELAY, 0x7fff3d1d0998) = -1 EAGAIN (Resource temporarily unavailable)

lines there. Don't know if thats the problem, but it looks strange to me.
Comment 17 Alan Stern 2009-01-02 08:19:02 UTC
This could be caused by the bad code in libthinkfinger. See http://marc.info/?l=linux-usb&m=123067293718806&w=2
Comment 18 Timo Hoenig 2009-01-02 08:38:09 UTC
Created attachment 19606 [details]
don't send a direct Set-Config request in _libthinkfinger_usb_hello

Dieter, can you please try the attached patch?  It's yet untested as I don't have the fingerprint reader device at the moment.

Thank you!
Comment 19 Dieter Ries 2009-01-02 09:56:33 UTC
Works perfectly. Thanks! 
Should I provide further information, or is a Tested By all you need?
Comment 20 Timo Hoenig 2009-01-02 12:36:02 UTC
No, that's fine.

I'll do a maintenance release of ThinkFinger in the next few days.

Thanks a lot for testing, Dieter.
Comment 21 Alan Stern 2009-01-02 12:47:39 UTC
If the ThinkFinger package is intended to run under Windows as well as Linux then you should test the change in that environment as well.
Comment 22 Timo Hoenig 2009-01-02 13:48:27 UTC
Good point.  However I'm not aware of anyone using ThinkFinger on Windows.  I'll post a heads up and call for testing on the ThinkFinger mailing list prior the release.  If anyone is using it on Windows I'll just guard the Set-Config request with some ifdef.
Comment 23 Alan Stern 2009-01-12 14:01:06 UTC
Fixed by commit: 2caf7fcdb8532045680f06b67b9e63f0c9613aaa.  This bug report can be closed now.
Comment 24 Ian Abbott 2009-01-21 07:04:01 UTC
Could someone submit this patch to the 2.6.28.y stable queue?

This patch also fixes problems using Altera's USB-Blaster JTAG adapter on 2.6.28 kernels.
Comment 25 Alan Stern 2009-01-21 07:17:26 UTC
It already has been submitted.
Comment 26 Ian Abbott 2009-01-21 07:56:45 UTC
(In reply to comment #25)
> It already has been submitted.

Fantastic! Here's hoping it makes it to the linux-2.6.28.y git tree.
Comment 27 Sven Köhler 2009-01-26 01:12:31 UTC
For me, this is a serious regression. And the fix is not in 2.6.28.2, i think.

I'm using libusb to upload software to my Lego NXT brick running the LeJOS firmware.

I will try the patch.
Comment 28 Sven Köhler 2009-01-26 01:21:43 UTC
(In reply to comment #27)
> I'm using libusb to upload software to my Lego NXT brick running the LeJOS
> firmware.
> 
> I will try the patch.

It seems, the patch is already in 2.6.28.2. Yet, uploading to the NXT brick doesn't work. It used to work with all 2.6.27.x versions.
Comment 29 andreas loeffler 2009-01-26 01:24:02 UTC
i had probably the same problem, fingerprint reader was not working (thinkpad T61p/2.6.28.1) and in addition problems reading from usb garmin device as described here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512851.

both issues working for me now with 2.6.28.2.
Comment 30 Alan Stern 2009-01-26 06:59:05 UTC
Created attachment 19999 [details]
Track toggle state in disable-endpoint paths

It turns out that a second patch (attached) is needed in addition to the first one.  I think this will apply correctly to 2.6.28.2 or above (haven't tried it so there might be one or two small mismatches); it should get merged as of 2.6.28.4 or thereabouts.
Comment 31 Alan Stern 2009-02-05 12:09:18 UTC
The patches have been accepted for 2.6.28.stable, commits 2caf7fcdb8532045680f06b67b9e63f0c9613aaa and
ddeac4e75f2527a340f9dc655bde49bb2429b39b.  This bug report can be closed.
Comment 32 Greg Kroah-Hartman 2009-02-05 16:52:51 UTC
thanks for reminding me, closing out.

Note You need to log in before you can comment on or make changes to this bug.