Skip to content

[SDW] IO timeout when stopping clock after S2idle suspend/resume #1609

Closed

Description

@plbossart

code: PR #1586 and configuration with no amplifier on link-2

options snd-sof-intel-hda-common sdw_clock_stop_quirks=0x8

modprobe snd-sof-pci

wait for the DSP to be suspended

rtcwake -m mem -s 3

The dmesg log shows an IO timeout when stopping the clock the second time, but when looking at the logs the clock stop command is retried and will succeed when re-issued by do_transfer()

This makes me think the state is not properly restored when doing a system resume after a clock stop done in pm_runtime suspend

master-2 traces
[   18.739518] intel-sdw sdw-master-2: intel_suspend_runtime start
[   18.739527] intel-sdw sdw-master-2: sdw_cdns_clock_stop: start
[   18.739534] intel-sdw sdw-master-2: sdw_cdns_clock_stop: slave attached 0
[   18.739738] intel-sdw sdw-master-2: Msg ignored for Slave 15
[   18.739741] intel-sdw sdw-master-2: ClockStopNow Broadcast msg ignored -61
[   18.739745] intel-sdw sdw-master-2: sdw_cdns_clock_stop: end
[   18.739754] intel-sdw sdw-master-2: intel_suspend_runtime done
[   27.807913] intel-sdw sdw-master-2: intel_suspend start
[   27.807916] intel-sdw sdw-master-2: intel_suspend: pm_runtime status: suspended
[   32.466649] intel-sdw sdw-master-2: intel_resume start
[   32.466649] intel-sdw sdw-master-2: intel_resume: pm_runtime status was suspended, forcing active
[   32.467293] intel-sdw sdw-master-2: intel_resume done
[   35.477551] intel-sdw sdw-master-2: intel_suspend_runtime start
[   35.477568] intel-sdw sdw-master-2: sdw_cdns_clock_stop: start
[   35.477576] intel-sdw sdw-master-2: sdw_cdns_clock_stop: slave attached 0
[   37.491749] intel-sdw sdw-master-2: IO transfer timed out, cmd 3 device 15 addr 44 len 1
[   37.491768] intel-sdw sdw-master-2: sdw_cdns_clock_stop: end
[   37.491782] intel-sdw sdw-master-2: intel_suspend_runtime done

timeout.log

Activity

  1. RanderWang commented on Dec 10, 2019

    @RanderWang

    @plbossart yes, it is caused by FIFO_LEVEL register setting. the detail:
    CDNS_MCP_FIFOLEVEL was set to 2, and after S2idle, we send cmd with count =1 & msg_count = 1, so we don't set this register correctly. I will check it later.

    	if (cdns->msg_count != count) {
    		cdns_writel(cdns, CDNS_MCP_FIFOLEVEL, count);
    		cdns->msg_count = count;
    	}
    
  2. RanderWang commented on Dec 11, 2019

    @RanderWang
  3. added
    bugSomething isn't working
    CMLApplies to Comet Lake platform
    SDWApplies to SoundWire bus for codec connection
    on Dec 11, 2019
  4. RanderWang commented on Dec 11, 2019

    @RanderWang

    a PR for branch soundwire-bug-fixes is #1618

  5. YvonneYang2 commented on Dec 11, 2019

    @YvonneYang2

    Tested it with integretion/soundwire-latest(e375909) + #1586 + #1618 , issue cannot be reproduced.

  6. RanderWang commented on Dec 12, 2019

    @RanderWang

    Fixed by PR #1618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CMLApplies to Comet Lake platformSDWApplies to SoundWire bus for codec connectionbugSomething isn't workingsuspend resumeIssues related to suspend resume (e.g. rtcwake)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions