lkml.org 
[lkml]   [2020]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 08/10] bus: mhi: core: Move to an error state on any firmware load failure
On 2020-10-09 09:42, Manivannan Sadhasivam wrote:
> On Fri, Sep 18, 2020 at 07:02:33PM -0700, Bhaumik Bhatt wrote:
>> Move MHI to a firmware download error state for a failure to find
>> the firmware files or to load SBL or EBL image using BHI/BHIe. This
>> helps detect an error state sooner and shortens the wait for a
>> synchronous power up timeout.
>>
>> Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
>> ---
>> drivers/bus/mhi/core/boot.c | 43
>> +++++++++++++++++++++++++------------------
>> 1 file changed, 25 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/bus/mhi/core/boot.c b/drivers/bus/mhi/core/boot.c
>> index 92b8dd3..fcc71f2 100644
>> --- a/drivers/bus/mhi/core/boot.c
>> +++ b/drivers/bus/mhi/core/boot.c
>
> [...]
>
>> -error_read:
>> +error_ready_state:
>> mhi_free_bhie_table(mhi_cntrl, mhi_cntrl->fbc_image);
>> mhi_cntrl->fbc_image = NULL;
>>
>> -error_alloc_fw_table:
>> - release_firmware(firmware);
>> +error_fw_load:
>> + write_lock_irq(&mhi_cntrl->pm_lock);
>> + mhi_cntrl->pm_state = MHI_PM_FW_DL_ERR;
>> + wake_up_all(&mhi_cntrl->state_event);
>
> Do you really need pm_lock for this?
>
> Thanks,
> Mani
>
Not really, the underlying usage does not matter if this lock is used or
not. We just want to error out so removing it.
>> + write_unlock_irq(&mhi_cntrl->pm_lock);
>> }
>> --
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
>> Forum,
>> a Linux Foundation Collaborative Project
>>

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum,
a Linux Foundation Collaborative Project

\
 
 \ /
  Last update: 2020-10-14 03:38    [W:0.076 / U:2.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site