Bug 23012 (Kevin)
Summary: | ftdi_sio /dev/ttyUSB error: "Resource Temporarily Unavailable" | ||
---|---|---|---|
Product: | Drivers | Reporter: | Kevin Smith (thirdwiggin) |
Component: | USB | Assignee: | Greg Kroah-Hartman (greg) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | artfwo, error27, florian, gesimu, kernel-bug, maciej.rutecki, ozan, rjw, stern |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.37-rc1 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 21782 | ||
Attachments: |
dmesg from v2.6.37-rc2
strace on minicom Set the supports_autosuspend for all USB serial drivers |
Description
Kevin Smith
2010-11-16 06:25:28 UTC
On Tue, Nov 16, 2010 at 06:25:31AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > I am using a ftdi USB-to-serial device, which has worked in previous kernels. > After a recent update to mainline 2.6.37, I am no longer able to access the > device. Upon plugging in the device, the ftdi_sio module loads and > /dev/ttyUSB0 appears. However, when I try to access the device, I get the > error "Resource Temporarily Unavailable". There is no other process trying > to > access the device. After downgrading to 2.6.36, the problem is fixed. Can you run 'git bisect' to determine which patch caused the problem? And there is no 2.6.37 yet, only 2.6.37-rc2. I am installing from the Ubuntu PPA, not source. The hash of the non-working revision is e53beacd23d9cb47590da6a7a7f6d417b941a994 and the working version is tag v2.6.36. I went to report the bug through my distribution, but since it's a build of mainline, the bug tool referred me to the kernel bugzilla. Sorry to not be more help. If this is not enough information, please feel free to close. Please attach the output of dmesg. Created attachment 37782 [details]
dmesg from v2.6.37-rc2
dmesg output from v2.6.37-rc2 when repeatedly attaching and detaching a ftdi_sio USB-to-Serial converter.
Hi, I'm encountering the same bug... Have attached dmesg for v2.6.37-rc2 from the tar-ball. will do a git bisect now. hth -- Simon After bisecting I found this: the "Resource temporarily unavailable" message occurs first with commit 1bfee5bc86fdaecc912e06080583eddab7263df2, "PM / Runtime: Merge synchronous and async runtime routines". Did you send Alan an email? Could you run strace on the program which is accessing the ttyUSB0? I don't think this can be coming from the open() call because that would have printed a error message if it returned -EAGAIN. Simon, can you try a little debugging? In drivers/usb/serial/usb-serial.c, in the serial_install() routine, make sure that usb_autopm_get_interface() is getting called and see what value it returns. Sure, will look into this tonight. --Simon Ok, figured out how to enable debugging in usb-serial.c... This is what I got: Nov 27 23:35:39 gryphon kernel: [ 416.482926] drivers/usb/serial/usb-serial.c: serial_install Nov 27 23:35:39 gryphon kernel: [ 416.482935] drivers/usb/serial/usb-serial.c: serial_install: usb_autopm_get_interface returned -11 For good measure I also did a strace on minicom (which is what I use to access ttyUSB0 at the moment). --Simon Created attachment 38352 [details]
strace on minicom
Created attachment 38372 [details]
Set the supports_autosuspend for all USB serial drivers
It looks like the autosuspend support for USB serial drivers wasn't done quite correctly. This patch should fix the problem. Let me know how it works out.
The patch in #12 fixes the issue for me. Handled-By : Alan Stern <stern@rowland.harvard.edu> Patch : https://bugzilla.kernel.org/attachment.cgi?id=38372 On Friday, December 03, 2010, Alan Stern wrote:
> On Fri, 3 Dec 2010, Rafael J. Wysocki wrote:
>
> > This message has been generated automatically as a part of a summary report
> > of recent regressions.
> >
> > The following bug entry is on the current list of known regressions
> > from 2.6.36. Please verify if it still should be listed and let the
> tracking team
> > know (either way).
> >
> >
> > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=23012
> > Subject : ftdi_sio /dev/ttyUSB error: "Resource Temporarily
> Unavailable"
> > Submitter : Kevin Smith <thirdwiggin@gmail.com>
> > Date : 2010-11-16 06:25 (17 days old)
> > Handled-By : Alan Stern <stern@rowland.harvard.edu>
> > Patch : https://bugzilla.kernel.org/attachment.cgi?id=38372
>
> This has been fixed by commit bf03184a31a3286fc0ab30f838ddee8ba9f9b7b
> (USB: fix autosuspend bug in usb-serial).
This is still happening for at least Keyspan USA-19H and many 3G sticks using the option driver on stable 2.6.37. It can't be the same thing, because 2.6.37 includes the bug fix above. It must be a different problem. An additional, related problem has shown up in the meantime. It would affect some devices using the keyspan driver but not the option driver. The fix is posted here: http://marc.info/?l=linux-usb&m=129477341409005&w=2 Hm, will try that patch thanks. I'll google for the 3g sticks' problems. |