Re: Disabling per-device autosuspend

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

 



Hi Alan,

I clicked the Send button too early...

V Wed, 4 Jan 2023 11:18:29 -0500
Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> napsáno:

> On Wed, Jan 04, 2023 at 04:49:00PM +0100, Petr Tesařík wrote:
> > On Wed, 4 Jan 2023 15:13:41 +0100
> > Petr Tesařík <petr@xxxxxxxxxxx> wrote:
> >   
> > > Hi folks,
> > > 
> > > I'm struggling with autosuspend on my Samsung phone in download mode,  
> 
> Wait...  Autosuspend is carried out by the host, but you appear to be 
> stating that the Samsung phone is acting as a USB device (i.e., it's 
> being autosuspended, not that it is autosuspending something else).  
> Is that right?
> 
> > > as it apparently breaks heimdall/libusb on my Tumbleweed system. Here's
> > > what I'm seeing:
> > > 
> > > - My device is autosuspended, because it has been idle for long enough.
> > > - cd /sys/bus/usb/devices/1-4/  # my device's port
> > > - echo -1 > power/autosuspend
> > > - The device is reset and gets a new device ID.
> > >   The current directory is no longer valid (becomes empty).  
> > 
> > On a second thought, this looks like the actual bug. I don't think
> > we're supposed to see a disconnect+reconnect whenever a suspended USB
> > device is resumed. Then again, I'm no expert on USB...  
> 
> In general there should not be a disconnect during a resume.  But it can 
> happen, depending on how the device behaves.


>  Perhaps your phone is 
> disconnecting deliberately.
> 
> The dmesg log ought to contain some useful information, particularly if 
> you enable USB kernel debugging before starting the experiment:
> 
> 	echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control

I can see there is an -EIO after the resume attempt:

Jan 04 17:44:38 meshulam kernel: usb 1-4: usb auto-resume
Jan 04 17:44:38 meshulam kernel: hub 1-0:1.0: state 7 ports 4 chg 0000 evt 0010
Jan 04 17:44:38 meshulam kernel: usb 1-4: Waited 0ms for CONNECT
Jan 04 17:44:38 meshulam kernel: usb 1-4: finish resume
Jan 04 17:44:38 meshulam kernel: usb 1-4: retry with reset-resume
Jan 04 17:44:38 meshulam kernel: usb 1-4: reset high-speed USB device number 46 using xhci_hcd
Jan 04 17:44:38 meshulam kernel: usb 1-4: gone after usb resume? status -5
Jan 04 17:44:38 meshulam kernel: usb 1-4: can't resume, status -5
Jan 04 17:44:38 meshulam kernel: usb usb1-port4: logical disconnect
Jan 04 17:44:38 meshulam kernel: usb usb1-port4: status 0503, change 0000, 480 Mb/s
Jan 04 17:44:38 meshulam kernel: usb 1-4: USB disconnect, device number 46
Jan 04 17:44:38 meshulam kernel: usb 1-4: unregistering device
Jan 04 17:44:38 meshulam kernel: usb 1-4: unregistering interface 1-4:1.0
Jan 04 17:44:38 meshulam kernel: usb 1-4: unregistering interface 1-4:1.1
Jan 04 17:44:38 meshulam kernel: usb 1-4: usb_disable_device nuking all URBs
Jan 04 17:44:38 meshulam kernel: usb 1-4: new high-speed USB device number 47 using xhci_hcd
Jan 04 17:44:38 meshulam kernel: usb 1-4: skipped 4 descriptors after interface
Jan 04 17:44:38 meshulam kernel: usb 1-4: default language 0x0409
Jan 04 17:44:38 meshulam kernel: usb 1-4: udev 47, busnum 1, minor = 46
Jan 04 17:44:38 meshulam kernel: usb 1-4: New USB device found, idVendor=04e8, idProduct=685d, bcdDevice= 2.1b
Jan 04 17:44:38 meshulam kernel: usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 04 17:44:38 meshulam kernel: usb 1-4: Product: SAMSUNG USB DRIVER
Jan 04 17:44:38 meshulam kernel: usb 1-4: Manufacturer: SAMSUNG
Jan 04 17:44:38 meshulam kernel: usb 1-4: usb_probe_device
Jan 04 17:44:38 meshulam kernel: usb 1-4: configuration #1 chosen from 1 choice
Jan 04 17:44:38 meshulam kernel: usb 1-4: adding 1-4:1.0 (config #1, interface 0)
Jan 04 17:44:38 meshulam kernel: cdc_acm 1-4:1.0: usb_probe_interface
Jan 04 17:44:38 meshulam kernel: cdc_acm 1-4:1.0: usb_probe_interface - got id
Jan 04 17:44:38 meshulam kernel: usb 1-4: adding 1-4:1.1 (config #1, interface 1)
Jan 04 17:44:38 meshulam kernel: cdc_acm 1-4:1.1: usb_probe_interface
Jan 04 17:44:38 meshulam kernel: cdc_acm 1-4:1.1: usb_probe_interface - got id
Jan 04 17:44:38 meshulam kernel: hub 1-0:1.0: state 7 ports 4 chg 0000 evt 0000

Petr T




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

  Powered by Linux