RE: USB suspend/resume

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

 



>> But there is this comment in the usb_suspend function,
>>  
>>  /* If udev is already suspended, we can skip this suspend and
>>   * we should also skip the upcoming system resume.  High-speed
>>   * root hubs are an exception; they need to resume whenever the
>>   * system wakes up in order for USB-PERSIST port handover to work
>>   * properly.
>>   */
>>  if (udev->state == USB_STATE_SUSPENDED) {
>>   if (udev->parent || udev->speed != USB_SPEED_HIGH)
>>    udev->skip_sys_resume = 1;
>>   return 0;
>>  }
>>  
>>  
>> My question is, if the host is connnecting to a high speed device,
>> what would be the impact to remove the condition "udev->speed != 
>> USB_SPEED_HIGH" in this function?

>Removing that test would cause full-speed root hubs (i.e., USB-1.1 root
>hubs) to be resumed unnecessarily.  This is true regardless of whether
the host is connected to a high-speed device.

I think I was confused by the logic :(, so for any non-high-speed udev,
skip_sys_resume would be set to 1, but for high speed udev,
skip_sys_resume would be set only if udev->parent is valid.

I'm still not sure how to interprete the comment "High-speed root hubs
are an exception; they need to resume whenever the system wakes up in
order for USB-PERSIST port handover to work properly". What is broken if
we set skip_sys_resume regardless of the speed?

Thanks,
Fei

--
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