Re: [PATCH] Revert "usb: Avoid unnecessary LPM enabling and disabling during suspend and resume"

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

 




> On Oct 3, 2019, at 22:26, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> On Thu, 3 Oct 2019, Kai-Heng Feng wrote:
> 
>>> On Oct 2, 2019, at 23:47, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>>> 
>>> On Wed, 2 Oct 2019, Kai-Heng Feng wrote:
>>> 
>>>> This reverts commit d590c23111505635e1beb01006612971e5ede8aa.
>>>> 
>>>> Dell WD15 dock has a topology like this:
>>>> /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
>>>>   |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/7p, 5000M
>>>>           |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
>>>> 
>>>> Their IDs:
>>>> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>>>> Bus 004 Device 002: ID 0424:5537 Standard Microsystems Corp.
>>>> Bus 004 Device 004: ID 0bda:8153 Realtek Semiconductor Corp.
>>>> 
>>>> Ethernet cannot be detected after plugging ethernet cable to the dock,
>>>> the hub and roothub get runtime resumed and runtime suspended
>>>> immediately:
>>>> ...
>>> 
>>>> After some trial and errors, the issue goes away if LPM on the SMSC hub
>>>> is disabled. Digging further, enabling and disabling LPM during runtime
>>>> resume and runtime suspend respectively can solve the issue.
>>>> 
>>>> So bring back the old LPM behavior, which the SMSC hub inside Dell WD15
>>>> depends on.
>>>> 
>>>> Fixes: d590c2311150 ("usb: Avoid unnecessary LPM enabling and disabling during suspend and resume")
>>>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@xxxxxxxxxxxxx>
>>> 
>>> Maybe it would be better to have a VID/PID-specific quirk for this?
>> 
>> Re-reading the spec, I think we need some clarification:
>> "If the value is 3, then host software wants to selectively suspend the
>> device connected to this port. The hub shall transition the link to U3
>> from any of the other U states using allowed link state transitions.
>> If the port is not already in the U0 state, then it shall transition the
>> port to the U0 state and then initiate the transition to U3."
>> 
>> The phrase "then it shall transition the port to the U0 state" what does "it" here refer to?
>> Is it the hub or the software?
>> If it's the former then it's indeed a buggy hub, but if it's the latter I think reverting the commit is the right thing to do.
> 
> In my opinion, "it" here refers to the hub.  This is because of the 
> parallel construction with the preceding sentence ("... shall 
> transition the link/port"), which indicates that the subjects should be 
> the same.

Hmm, okay, this is ambiguous to a non-native speaker like me.
I'll use a quirk instead.

Kai-Heng

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