Skip to content

[SDW] rt711-sdca: timeout on INT1 and INT2 mask write #2627

Closed

Description

@plbossart

Intel internal test 1122 shows the following errors w/ rt711-sdca. There's obviously something wrong with SDCA interrupts.

[ 8446.911146] kernel: intel-sdw intel-sdw.0: IO transfer timed out, cmd 3 device 1 addr 5c len 1
[ 8446.911160] kernel: soundwire sdw-master-0: trf on Slave 1 failed:-110 write addr 5c count 0
[ 8447.414240] kernel: intel-sdw intel-sdw.0: IO transfer timed out, cmd 3 device 1 addr 5d len 1
[ 8447.414256] kernel: soundwire sdw-master-0: trf on Slave 1 failed:-110 write addr 5d count 0

#2622 suggests a first pass to revisit on SDCA interrupt handling.

Activity

  1. added
    SDWApplies to SoundWire bus for codec connection
    on Dec 11, 2020
  2. added
    bugSomething isn't working
    TGLApplies to Tiger Lake platform
    on Dec 14, 2020
  3. bardliao commented on Dec 17, 2020

    @bardliao
    Collaborator

    I can easily see the issue with the test_sdca_int.txt script

  4. bardliao commented on Dec 17, 2020

    @bardliao
    Collaborator

    The issue happens if regmap_cache_only is N when soc component is removed.
    The call trace is:

    [   77.309990]  regmap_write+0x39/0x60
    [   77.309994]  rt711_sdca_jack_init+0x1b1/0x1f0 [snd_soc_rt711_sdca]
    [   77.309996]  rt711_sdca_set_jack_detect+0x44/0x50 [snd_soc_rt711_sdca]
    [   77.310003]  snd_soc_component_set_jack+0x22/0x40 [snd_soc_core]
    [   77.310007]  soc_remove_component+0x1b/0x80 [snd_soc_core]
    [   77.310011]  soc_cleanup_card_resources+0xae/0x250 [snd_soc_core]
    [   77.310016]  snd_soc_unbind_card+0x65/0xe0 [snd_soc_core]
    [   77.310020]  snd_soc_unregister_card+0x1f/0x60 [snd_soc_core]
    

    The problem is that rt711_sdca_jack_init is called when sdw bus is suspended and we should not try to access sdw register at that moment.
    #2629 has same root cause, too. The reason why #2627 has higher reproduce rate is that we set regcache_cache_only(rt711->regmap, false); in rt711_sdca_update_status.
    Adding a snd_soc_component callback function and set cache only there should fix the issue.
    I will cook a PR for that and @shumingfan will refine rt711-sdca codec driver for the usage of regmap.

  5. mengdonglin commented on Dec 22, 2020

    @mengdonglin

    Fixed by PR #2640 and merged. No reproduced in recent daily test. Closing.

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

    SDWApplies to SoundWire bus for codec connectionTGLApplies to Tiger Lake platformbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions