mbox series

[SRU,Focal/Eoan/OEM-B-OSP1,0/5] Fix hang issue if sof fails to load firmware

Message ID 20200221090053.9982-1-hui.wang@canonical.com
Headers show
Series Fix hang issue if sof fails to load firmware | expand

Message

Hui Wang Feb. 21, 2020, 9 a.m. UTC
BugLink: http://bugs.launchpad.net/bugs/1861837

If the sof driver fails to load the firmware, it doesn't release the
resource, then it make the system hang when suspending and resuming.

After this patchset is applied, please also apply the patchset we
just reverted 2 weeks ago, since this patchset is the fixing patches
for the patches we reverted (#1857409). If need me to resend the
reverted patches, I will resend them.


[Impact]
The machine hangs during suspend/resume if the sof driver fails to
load firmware.

[Fix]
This bug is fixed in the mainline kernel v5.6-rc1, now backported
those patches to ubuntu kernel

[Test Case]
sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
then suspend and resume, the system will not hang anymore

And if the sof driver load the firmware successfully, the audio
functions all worked well as before.

[Regression Risk]
Low, the patches are backported from upstream kernel, and I tested
these patches on Lenovo and Dell dmic machines.


Kai Vehmanen (2):
  ASoC: hdac_hda: Fix error in driver removal after failed probe
  ASoC: SOF: trace: fix unconditional free in trace release

Pierre-Louis Bossart (2):
  ASoC: SOF: core: free trace on errors
  ASoC: SOF: core: release resources on errors in probe_continue

Ranjani Sridharan (1):
  ASoC: SOF: Introduce state machine for FW boot

 sound/soc/codecs/hdac_hda.c          |  4 +-
 sound/soc/sof/core.c                 | 86 ++++++++++++++++++++--------
 sound/soc/sof/intel/hda-loader-skl.c |  1 -
 sound/soc/sof/intel/hda-loader.c     |  1 -
 sound/soc/sof/intel/hda.c            |  4 +-
 sound/soc/sof/ipc.c                  | 17 ++----
 sound/soc/sof/loader.c               | 19 ++++--
 sound/soc/sof/pm.c                   | 25 +++++++-
 sound/soc/sof/sof-priv.h             | 11 +++-
 sound/soc/sof/trace.c                |  7 ++-
 10 files changed, 125 insertions(+), 50 deletions(-)

Comments

Timo Aaltonen Feb. 21, 2020, 11:23 a.m. UTC | #1
On 21.2.2020 11.00, Hui Wang wrote:
> BugLink: http://bugs.launchpad.net/bugs/1861837
> 
> If the sof driver fails to load the firmware, it doesn't release the
> resource, then it make the system hang when suspending and resuming.
> 
> After this patchset is applied, please also apply the patchset we
> just reverted 2 weeks ago, since this patchset is the fixing patches
> for the patches we reverted (#1857409). If need me to resend the
> reverted patches, I will resend them.
> 
> 
> [Impact]
> The machine hangs during suspend/resume if the sof driver fails to
> load firmware.
> 
> [Fix]
> This bug is fixed in the mainline kernel v5.6-rc1, now backported
> those patches to ubuntu kernel
> 
> [Test Case]
> sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
> then suspend and resume, the system will not hang anymore
> 
> And if the sof driver load the firmware successfully, the audio
> functions all worked well as before.
> 
> [Regression Risk]
> Low, the patches are backported from upstream kernel, and I tested
> these patches on Lenovo and Dell dmic machines.
> 
> 
> Kai Vehmanen (2):
>   ASoC: hdac_hda: Fix error in driver removal after failed probe
>   ASoC: SOF: trace: fix unconditional free in trace release
> 
> Pierre-Louis Bossart (2):
>   ASoC: SOF: core: free trace on errors
>   ASoC: SOF: core: release resources on errors in probe_continue
> 
> Ranjani Sridharan (1):
>   ASoC: SOF: Introduce state machine for FW boot
> 
>  sound/soc/codecs/hdac_hda.c          |  4 +-
>  sound/soc/sof/core.c                 | 86 ++++++++++++++++++++--------
>  sound/soc/sof/intel/hda-loader-skl.c |  1 -
>  sound/soc/sof/intel/hda-loader.c     |  1 -
>  sound/soc/sof/intel/hda.c            |  4 +-
>  sound/soc/sof/ipc.c                  | 17 ++----
>  sound/soc/sof/loader.c               | 19 ++++--
>  sound/soc/sof/pm.c                   | 25 +++++++-
>  sound/soc/sof/sof-priv.h             | 11 +++-
>  sound/soc/sof/trace.c                |  7 ++-
>  10 files changed, 125 insertions(+), 50 deletions(-)

applied to osp1 oem-next, thanks
Hui Wang Feb. 24, 2020, 1:59 a.m. UTC | #2
On 2020/2/21 下午7:23, Timo Aaltonen wrote:
> On 21.2.2020 11.00, Hui Wang wrote:
>> BugLink: http://bugs.launchpad.net/bugs/1861837
>>
>> If the sof driver fails to load the firmware, it doesn't release the
>> resource, then it make the system hang when suspending and resuming.
>>
>> After this patchset is applied, please also apply the patchset we
>> just reverted 2 weeks ago, since this patchset is the fixing patches
>> for the patches we reverted (#1857409). If need me to resend the
>> reverted patches, I will resend them.
>>
>>
>> [Impact]
>> The machine hangs during suspend/resume if the sof driver fails to
>> load firmware.
>>
>> [Fix]
>> This bug is fixed in the mainline kernel v5.6-rc1, now backported
>> those patches to ubuntu kernel
>>
>> [Test Case]
>> sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
>> then suspend and resume, the system will not hang anymore
>>
>> And if the sof driver load the firmware successfully, the audio
>> functions all worked well as before.
>>
>> [Regression Risk]
>> Low, the patches are backported from upstream kernel, and I tested
>> these patches on Lenovo and Dell dmic machines.
>>
>>
>> Kai Vehmanen (2):
>>    ASoC: hdac_hda: Fix error in driver removal after failed probe
>>    ASoC: SOF: trace: fix unconditional free in trace release
>>
>> Pierre-Louis Bossart (2):
>>    ASoC: SOF: core: free trace on errors
>>    ASoC: SOF: core: release resources on errors in probe_continue
>>
>> Ranjani Sridharan (1):
>>    ASoC: SOF: Introduce state machine for FW boot
>>
>>   sound/soc/codecs/hdac_hda.c          |  4 +-
>>   sound/soc/sof/core.c                 | 86 ++++++++++++++++++++--------
>>   sound/soc/sof/intel/hda-loader-skl.c |  1 -
>>   sound/soc/sof/intel/hda-loader.c     |  1 -
>>   sound/soc/sof/intel/hda.c            |  4 +-
>>   sound/soc/sof/ipc.c                  | 17 ++----
>>   sound/soc/sof/loader.c               | 19 ++++--
>>   sound/soc/sof/pm.c                   | 25 +++++++-
>>   sound/soc/sof/sof-priv.h             | 11 +++-
>>   sound/soc/sof/trace.c                |  7 ++-
>>   10 files changed, 125 insertions(+), 50 deletions(-)
> applied to osp1 oem-next, thanks

And after applying this patchset, we could reapply the patches we 
reverted before. (#1857409)

If need me to resend the patches,  just let me know.

Thanks,

Hui.

>
Seth Forshee Feb. 26, 2020, 2:36 a.m. UTC | #3
On Fri, Feb 21, 2020 at 05:00:39PM +0800, Hui Wang wrote:
> BugLink: http://bugs.launchpad.net/bugs/1861837
> 
> If the sof driver fails to load the firmware, it doesn't release the
> resource, then it make the system hang when suspending and resuming.
> 
> After this patchset is applied, please also apply the patchset we
> just reverted 2 weeks ago, since this patchset is the fixing patches
> for the patches we reverted (#1857409). If need me to resend the
> reverted patches, I will resend them.
> 
> 
> [Impact]
> The machine hangs during suspend/resume if the sof driver fails to
> load firmware.
> 
> [Fix]
> This bug is fixed in the mainline kernel v5.6-rc1, now backported
> those patches to ubuntu kernel
> 
> [Test Case]
> sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
> then suspend and resume, the system will not hang anymore
> 
> And if the sof driver load the firmware successfully, the audio
> functions all worked well as before.
> 
> [Regression Risk]
> Low, the patches are backported from upstream kernel, and I tested
> these patches on Lenovo and Dell dmic machines.

Applied to focal/master-next, thanks!
Seth Forshee Feb. 26, 2020, 2:42 a.m. UTC | #4
On Tue, Feb 25, 2020 at 08:36:10PM -0600, Seth Forshee wrote:
> On Fri, Feb 21, 2020 at 05:00:39PM +0800, Hui Wang wrote:
> > BugLink: http://bugs.launchpad.net/bugs/1861837
> > 
> > If the sof driver fails to load the firmware, it doesn't release the
> > resource, then it make the system hang when suspending and resuming.
> > 
> > After this patchset is applied, please also apply the patchset we
> > just reverted 2 weeks ago, since this patchset is the fixing patches
> > for the patches we reverted (#1857409). If need me to resend the
> > reverted patches, I will resend them.
> > 
> > 
> > [Impact]
> > The machine hangs during suspend/resume if the sof driver fails to
> > load firmware.
> > 
> > [Fix]
> > This bug is fixed in the mainline kernel v5.6-rc1, now backported
> > those patches to ubuntu kernel
> > 
> > [Test Case]
> > sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
> > then suspend and resume, the system will not hang anymore
> > 
> > And if the sof driver load the firmware successfully, the audio
> > functions all worked well as before.
> > 
> > [Regression Risk]
> > Low, the patches are backported from upstream kernel, and I tested
> > these patches on Lenovo and Dell dmic machines.
> 
> Applied to focal/master-next, thanks!

Forgot to mention, I actually only applied patch 4 as 1-3 had already
come in from upstream stable. Patch 1 at least was not completely
identical to the upstream stable patch, so you may want to check to make
sure it does what you need (I didn't really look into how they were
different, possibly it is just comment/whitespace differences).
Hui Wang Feb. 26, 2020, 3:48 a.m. UTC | #5
On 2020/2/26 上午10:42, Seth Forshee wrote:
> On Tue, Feb 25, 2020 at 08:36:10PM -0600, Seth Forshee wrote:
>> On Fri, Feb 21, 2020 at 05:00:39PM +0800, Hui Wang wrote:
>>> BugLink: http://bugs.launchpad.net/bugs/1861837
>>>
>>> If the sof driver fails to load the firmware, it doesn't release the
>>> resource, then it make the system hang when suspending and resuming.
>>>
>>> After this patchset is applied, please also apply the patchset we
>>> just reverted 2 weeks ago, since this patchset is the fixing patches
>>> for the patches we reverted (#1857409). If need me to resend the
>>> reverted patches, I will resend them.
>>>
>>>
>>> [Impact]
>>> The machine hangs during suspend/resume if the sof driver fails to
>>> load firmware.
>>>
>>> [Fix]
>>> This bug is fixed in the mainline kernel v5.6-rc1, now backported
>>> those patches to ubuntu kernel
>>>
>>> [Test Case]
>>> sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
>>> then suspend and resume, the system will not hang anymore
>>>
>>> And if the sof driver load the firmware successfully, the audio
>>> functions all worked well as before.
>>>
>>> [Regression Risk]
>>> Low, the patches are backported from upstream kernel, and I tested
>>> these patches on Lenovo and Dell dmic machines.
>> Applied to focal/master-next, thanks!
> Forgot to mention, I actually only applied patch 4 as 1-3 had already
> come in from upstream stable. Patch 1 at least was not completely
> identical to the upstream stable patch, so you may want to check to make
> sure it does what you need (I didn't really look into how they were
> different, possibly it is just comment/whitespace differences).

Checked, no functional difference.

Thx.

Hui.
Kleber Sacilotto de Souza March 10, 2020, 2:41 p.m. UTC | #6
On 21.02.20 10:00, Hui Wang wrote:
> BugLink: http://bugs.launchpad.net/bugs/1861837
> 
> If the sof driver fails to load the firmware, it doesn't release the
> resource, then it make the system hang when suspending and resuming.
> 
> After this patchset is applied, please also apply the patchset we
> just reverted 2 weeks ago, since this patchset is the fixing patches
> for the patches we reverted (#1857409). If need me to resend the
> reverted patches, I will resend them.
> 
> 
> [Impact]
> The machine hangs during suspend/resume if the sof driver fails to
> load firmware.
> 
> [Fix]
> This bug is fixed in the mainline kernel v5.6-rc1, now backported
> those patches to ubuntu kernel
> 
> [Test Case]
> sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
> then suspend and resume, the system will not hang anymore
> 
> And if the sof driver load the firmware successfully, the audio
> functions all worked well as before.
> 
> [Regression Risk]
> Low, the patches are backported from upstream kernel, and I tested
> these patches on Lenovo and Dell dmic machines.
> 
> 
> Kai Vehmanen (2):
>   ASoC: hdac_hda: Fix error in driver removal after failed probe
>   ASoC: SOF: trace: fix unconditional free in trace release
> 
> Pierre-Louis Bossart (2):
>   ASoC: SOF: core: free trace on errors
>   ASoC: SOF: core: release resources on errors in probe_continue
> 
> Ranjani Sridharan (1):
>   ASoC: SOF: Introduce state machine for FW boot
> 
>  sound/soc/codecs/hdac_hda.c          |  4 +-
>  sound/soc/sof/core.c                 | 86 ++++++++++++++++++++--------
>  sound/soc/sof/intel/hda-loader-skl.c |  1 -
>  sound/soc/sof/intel/hda-loader.c     |  1 -
>  sound/soc/sof/intel/hda.c            |  4 +-
>  sound/soc/sof/ipc.c                  | 17 ++----
>  sound/soc/sof/loader.c               | 19 ++++--
>  sound/soc/sof/pm.c                   | 25 +++++++-
>  sound/soc/sof/sof-priv.h             | 11 +++-
>  sound/soc/sof/trace.c                |  7 ++-
>  10 files changed, 125 insertions(+), 50 deletions(-)
> 

For Eoan:

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Stefan Bader March 12, 2020, 2:30 p.m. UTC | #7
On 21.02.20 10:00, Hui Wang wrote:
> BugLink: http://bugs.launchpad.net/bugs/1861837
> 
> If the sof driver fails to load the firmware, it doesn't release the
> resource, then it make the system hang when suspending and resuming.
> 
> After this patchset is applied, please also apply the patchset we
> just reverted 2 weeks ago, since this patchset is the fixing patches
> for the patches we reverted (#1857409). If need me to resend the
> reverted patches, I will resend them.
> 
> 
> [Impact]
> The machine hangs during suspend/resume if the sof driver fails to
> load firmware.
> 
> [Fix]
> This bug is fixed in the mainline kernel v5.6-rc1, now backported
> those patches to ubuntu kernel
> 
> [Test Case]
> sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
> then suspend and resume, the system will not hang anymore
> 
> And if the sof driver load the firmware successfully, the audio
> functions all worked well as before.
> 
> [Regression Risk]
> Low, the patches are backported from upstream kernel, and I tested
> these patches on Lenovo and Dell dmic machines.
> 
> 
> Kai Vehmanen (2):
>   ASoC: hdac_hda: Fix error in driver removal after failed probe
>   ASoC: SOF: trace: fix unconditional free in trace release
> 
> Pierre-Louis Bossart (2):
>   ASoC: SOF: core: free trace on errors
>   ASoC: SOF: core: release resources on errors in probe_continue
> 
> Ranjani Sridharan (1):
>   ASoC: SOF: Introduce state machine for FW boot
> 
>  sound/soc/codecs/hdac_hda.c          |  4 +-
>  sound/soc/sof/core.c                 | 86 ++++++++++++++++++++--------
>  sound/soc/sof/intel/hda-loader-skl.c |  1 -
>  sound/soc/sof/intel/hda-loader.c     |  1 -
>  sound/soc/sof/intel/hda.c            |  4 +-
>  sound/soc/sof/ipc.c                  | 17 ++----
>  sound/soc/sof/loader.c               | 19 ++++--
>  sound/soc/sof/pm.c                   | 25 +++++++-
>  sound/soc/sof/sof-priv.h             | 11 +++-
>  sound/soc/sof/trace.c                |  7 ++-
>  10 files changed, 125 insertions(+), 50 deletions(-)
> 
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Khalid Elmously March 13, 2020, 3:18 a.m. UTC | #8
The bug status implies that this is NOT applied in Focal (despite the email)

On 2020-02-21 17:00:39 , Hui Wang wrote:
> BugLink: http://bugs.launchpad.net/bugs/1861837
> 
> If the sof driver fails to load the firmware, it doesn't release the
> resource, then it make the system hang when suspending and resuming.
> 
> After this patchset is applied, please also apply the patchset we
> just reverted 2 weeks ago, since this patchset is the fixing patches
> for the patches we reverted (#1857409). If need me to resend the
> reverted patches, I will resend them.
> 
> 
> [Impact]
> The machine hangs during suspend/resume if the sof driver fails to
> load firmware.
> 
> [Fix]
> This bug is fixed in the mainline kernel v5.6-rc1, now backported
> those patches to ubuntu kernel
> 
> [Test Case]
> sudo mv /lib/firmware/intel/sof /lib/firmware/intel/sof-bak, reboot
> then suspend and resume, the system will not hang anymore
> 
> And if the sof driver load the firmware successfully, the audio
> functions all worked well as before.
> 
> [Regression Risk]
> Low, the patches are backported from upstream kernel, and I tested
> these patches on Lenovo and Dell dmic machines.
> 
> 
> Kai Vehmanen (2):
>   ASoC: hdac_hda: Fix error in driver removal after failed probe
>   ASoC: SOF: trace: fix unconditional free in trace release
> 
> Pierre-Louis Bossart (2):
>   ASoC: SOF: core: free trace on errors
>   ASoC: SOF: core: release resources on errors in probe_continue
> 
> Ranjani Sridharan (1):
>   ASoC: SOF: Introduce state machine for FW boot
> 
>  sound/soc/codecs/hdac_hda.c          |  4 +-
>  sound/soc/sof/core.c                 | 86 ++++++++++++++++++++--------
>  sound/soc/sof/intel/hda-loader-skl.c |  1 -
>  sound/soc/sof/intel/hda-loader.c     |  1 -
>  sound/soc/sof/intel/hda.c            |  4 +-
>  sound/soc/sof/ipc.c                  | 17 ++----
>  sound/soc/sof/loader.c               | 19 ++++--
>  sound/soc/sof/pm.c                   | 25 +++++++-
>  sound/soc/sof/sof-priv.h             | 11 +++-
>  sound/soc/sof/trace.c                |  7 ++-
>  10 files changed, 125 insertions(+), 50 deletions(-)
> 
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team