Re: Disabling per-device autosuspend

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

 



On Wed, Jan 04, 2023 at 06:27:50PM +0100, Petr Tesařík wrote:
> On Wed, 4 Jan 2023 12:04:22 -0500
> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > At this point the host sends a Get-Device-Status request to the device 
> > (not shown in the log).
> > 
> >  [...]  
> > 
> > The fact that the host is retrying means that the status request got an 
> > error.  Unfortunately the log message doesn't say sort of error 
> > occurred.
> 
> OK, I see. The URB indicates success, but there is no data:
> 
> 45	0.432232	host	1.50.0	USB	64	GET STATUS Request
> 46	0.432659	1.50.0	host	USB	64	GET STATUS Response
> 
> Frame 46: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface usbmon1, id 0
> USB URB
>     [Source: 1.50.0]
>     [Destination: host]
>     URB id: 0xffff98b4383c8d80
>     URB type: URB_COMPLETE ('C')
>     URB transfer type: URB_CONTROL (0x02)
>     Endpoint: 0x80, Direction: IN
>     Device: 50
>     URB bus id: 1
>     Device setup request: not relevant ('-')
>     Data: present ('\0')
>     URB sec: 1672851450
>     URB usec: 569060
>     URB status: Success (0)
>     URB length [bytes]: 0
>     Data length [bytes]: 0
> -------------------------^
> This should be 2, and the device should send a 16-bit status word. Hm.
> 
>     [Request in: 45]
>     [Time from request: 0.000427000 seconds]
>     Unused Setup Header
>     Interval: 0
>     Start frame: 0
>     Copy of Transfer Flags: 0x00000200, Dir IN
>     Number of ISO descriptors: 0
> 
> While I do agree that the Samsung phone download mode USB stack
> implementation is crappy, multiple models and many users are affected. I
> wonder what would be a sensible workaround in heimdall and/or libusb...
> 
> Setting a global module parameter does not sound great.

Another option would be to create a short udev script that would write 
"on" to the power/control attribute file (thereby turning autosuspend 
off) whenever it sees a new USB device with the vendor and product IDs 
of your phone.  That seems like a very practical solution.

Alan Stern



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

  Powered by Linux