-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
soundwire: intel: Initialize clock stop timeout #3911
soundwire: intel: Initialize clock stop timeout #3911
Conversation
Can one of the admins verify this patch?
|
test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Goodness, this is one nice catch @sjoerdsimons. Many thanks indeed for the patch.
I completely agree with the need to initialize this variable, but suggested two improvements below. If you don't mind re-pushing a new version that would be great.
e4832ee
to
3ef2ce5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @sjoerdsimons
Happy Friday!
SOFCI TEST |
The bus->clk_stop_timeout member is only initialized to a non-zero value during the codec driver probe. This can lead to corner cases where this value remains pegged at zero when the bus suspends, which results in an endless loop in sdw_bus_wait_for_clk_prep_deprep(). Corner cases include configurations with no codecs described in the firmware, or delays in probing codec drivers. Initializing the default timeout to the smallest non-zero value avoid this problem and allows for the existing logic to be preserved: the bus->clk_stop_timeout is set as the maximum required by all codecs connected on the bus. Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
840bc2c
3ef2ce5
to
840bc2c
Compare
Fwiw repushed my commit to have < 75 characters on the commit messages as that caused checkpatch to fail |
SOFCI TEST |
@bardliao can you review, merge and send to Vinod ASAP? I think this should even be Cc: stable@vger.kernel.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout on CML_RVP_SDW is not related to this patch.
@plbossart @sjoerdsimons Do we need a |
Maybe 29a269c ("soundwire:` intel: move to auxiliary bus")? This problem existed since the beginning but the patch will not apply on earlier versions since we completely changed the structure of the code. |
I tested it and this patch doesn't apply to 29a269c ("soundwire:` intel: move to auxiliary bus") It can apply to 1f2dcf3 ("soundwire: intel: set dev_num_ida_min"). So, I will add
|
There is a small typo:
avoids |
too late, it's posted upstream now... |
This probably also fixes issue #4540, the one created for the Dell XPS 13 9315. |
The clk_stop_timeout field of the bus never got initialized leading to an endless loop when trying to stop the clock if it fails.
Signed-off-by: Sjoerd Simons sjoerd@collabora.com