[alsa-devel] [PATCH 1/6] soundwire: fix startup sequence for Intel/Cadence

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Mon Sep 16 20:14:12 CEST 2019


>>> @@ -1043,8 +1043,6 @@ static int intel_probe(struct platform_device 
>>> *pdev)
>>>       if (ret)
>>>           goto err_init;
>>> -    ret = sdw_cdns_enable_interrupt(&sdw->cdns);
>>> -
>>>       /* Read the PDI config and initialize cadence PDI */
>>>       intel_pdi_init(sdw, &config);
>>>       ret = sdw_cdns_pdi_init(&sdw->cdns, config);
>>> @@ -1062,6 +1060,18 @@ static int intel_probe(struct platform_device 
>>> *pdev)
>>>           goto err_init;
>>>       }
>>> +    ret = sdw_cdns_enable_interrupt(&sdw->cdns);
>>> +    if (ret < 0) {
>>> +        dev_err(sdw->cdns.dev, "cannot enable interrupts\n");
>>> +        goto err_init;
>>> +    }
>>> +
>>> +    ret = sdw_cdns_exit_reset(&sdw->cdns);
>>> +    if (ret < 0) {
>>> +        dev_err(sdw->cdns.dev, "unable to exit bus reset sequence\n");
>>> +        goto err_init;
>>
>> Don't you want to disable interrupts at least... before you return
>> error? err_init does bus cleanup and not controller one
> 
> yes good point, let me look at this.

The existing code has no interrupt disable sequence.

I will add this improved error handling in a follow-up patch, after the 
capability to disable interrupts is added.


More information about the Alsa-devel mailing list