Re: Autosuspending devices that seem to need reset_resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 09, 2009 at 11:18:32PM -0400, Alan Stern wrote:
> On Tue, 9 Jun 2009, Matthew Garrett wrote:
> 
> > On Mon, Jun 08, 2009 at 07:47:06PM -0400, Alan Stern wrote:
> > 
> > > It should not make any difference.  Can you provide dmesg output with 
> > > CONFIG_USB_DEBUG enabled, together with a usbmon trace?  You might also 
> > > want to #define VERBOSE_DEBUG at the start of drivers.c (before the 
> > > #include lines).
> > 
> > With autosuspend enabled I get the following:
> > 
> > usb usb1: usb auto-resume
> > ehci_hcd 0000:00:1a.7: resume root hub
> > usb usb1: usb_resume_device: status 0
> > hub 1-0:1.0: hub_resume
> > hub 1-0:1.0: port 2: status 0507 change 0000
> > hub 1-0:1.0: port 5: status 0507 change 0000
> > hub 1-0:1.0: usb_resume_interface: status 0
> > usb usb1: usb_resume_both: status 0
> > usb usb1: usb_autoresume_device: status 0 cnt 1
> > usb 1-2: usb auto-resume
> > hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0000
> > hub 1-0:1.0: usb_autopm_get_interface: status 0 cnt 2
> > usb usb1: usb_suspend_both: status -16
> > hub 1-0:1.0: usb_autopm_set_interface: status -16 cnt 0
> > ehci_hcd 0000:00:1a.7: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
> > usb 1-2: finish resume
> > usb 1-2: usb_resume_device: status 0
> > usb 1-2:1.0: usb_resume_interface: status 0
> > usb 1-2:1.1: usb_resume_interface: status 0
> > qcserial 1-2:1.2: usb_resume_interface: status 0
> > usb 1-2:1.3: usb_resume_interface: status 0
> > usb 1-2: usb_resume_both: status 0
> > qcserial 1-2:1.2: usb_autopm_get_interface: status 0 cnt 1
> > qcserial ttyUSB0: usb_serial_generic_open - failed resubmitting read urb, error -22
> 
> This -EINVAL is the key; everything before it is normal.  I don't know
> why it happened; there's no obvious reason for it.  Maybe you can track
> down the reason.  Or I can try some testing of my own.

I've finally got a bit further with this. The usb_submit_urb() call in 
usb_serial_generic_open fails because urb->hcpriv is set. Race between 
the resume call and the open occuring?

-- 
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux