* Re: [PATCH v2 1/2] mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe()
[not found] ` <20220103055152.GA3581@thinkpad>
@ 2022-01-06 17:24 ` Bryan O'Donoghue
2022-01-06 17:44 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Bryan O'Donoghue @ 2022-01-06 17:24 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: linux-arm-msm, linux-mtd, miquel.raynal, architt, bbrezillon,
absahu, baruch, stable@vger.kernel.org
On 03/01/2022 05:51, Manivannan Sadhasivam wrote:
> On Mon, Jan 03, 2022 at 03:03:15AM +0000, Bryan O'Donoghue wrote:
>> Interacting with a NAND chip on an IPQ6018 I found that the qcomsmem NAND
>> partition parser was returning -EPROBE_DEFER waiting for the main smem
>> driver to load.
>>
>> This caused the board to reset. Playing about with the probe() function
>> shows that the problem lies in the core clock being switched off before the
>> nandc_unalloc() routine has completed.
>>
>> If we look at how qcom_nandc_remove() tears down allocated resources we see
>> the expected order is
>>
>> qcom_nandc_unalloc(nandc);
>>
>> clk_disable_unprepare(nandc->aon_clk);
>> clk_disable_unprepare(nandc->core_clk);
>>
>> dma_unmap_resource(&pdev->dev, nandc->base_dma, resource_size(res),
>> DMA_BIDIRECTIONAL, 0);
>>
>> Tweaking probe() to both bring up and tear-down in that order removes the
>> reset if we end up deferring elsewhere.
>>
>> Fixes: c76b78d8ec05 ("mtd: nand: Qualcomm NAND controller driver")
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>
> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
>
> Can you please CC stable list for backporting?
>
> Thanks,
> Mani
>
NP.
+ cc stable
FWIW I believe Greg's scripts will pick up on Fixes: tags automatically
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe()
2022-01-06 17:24 ` [PATCH v2 1/2] mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe() Bryan O'Donoghue
@ 2022-01-06 17:44 ` Greg KH
2022-01-06 18:02 ` Bryan O'Donoghue
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2022-01-06 17:44 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Manivannan Sadhasivam, linux-arm-msm, linux-mtd, miquel.raynal,
architt, bbrezillon, absahu, baruch, stable@vger.kernel.org
On Thu, Jan 06, 2022 at 05:24:27PM +0000, Bryan O'Donoghue wrote:
> On 03/01/2022 05:51, Manivannan Sadhasivam wrote:
> > On Mon, Jan 03, 2022 at 03:03:15AM +0000, Bryan O'Donoghue wrote:
> > > Interacting with a NAND chip on an IPQ6018 I found that the qcomsmem NAND
> > > partition parser was returning -EPROBE_DEFER waiting for the main smem
> > > driver to load.
> > >
> > > This caused the board to reset. Playing about with the probe() function
> > > shows that the problem lies in the core clock being switched off before the
> > > nandc_unalloc() routine has completed.
> > >
> > > If we look at how qcom_nandc_remove() tears down allocated resources we see
> > > the expected order is
> > >
> > > qcom_nandc_unalloc(nandc);
> > >
> > > clk_disable_unprepare(nandc->aon_clk);
> > > clk_disable_unprepare(nandc->core_clk);
> > >
> > > dma_unmap_resource(&pdev->dev, nandc->base_dma, resource_size(res),
> > > DMA_BIDIRECTIONAL, 0);
> > >
> > > Tweaking probe() to both bring up and tear-down in that order removes the
> > > reset if we end up deferring elsewhere.
> > >
> > > Fixes: c76b78d8ec05 ("mtd: nand: Qualcomm NAND controller driver")
> > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> >
> > Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
> >
> > Can you please CC stable list for backporting?
> >
> > Thanks,
> > Mani
> >
>
> NP.
>
> + cc stable
>
> FWIW I believe Greg's scripts will pick up on Fixes: tags automatically
No, that is NOT the way to ensure that a patch will get picked up, that
is a "this might eventually get there".
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe()
2022-01-06 17:44 ` Greg KH
@ 2022-01-06 18:02 ` Bryan O'Donoghue
0 siblings, 0 replies; 3+ messages in thread
From: Bryan O'Donoghue @ 2022-01-06 18:02 UTC (permalink / raw)
To: Greg KH
Cc: Manivannan Sadhasivam, linux-arm-msm, linux-mtd, miquel.raynal,
architt, bbrezillon, absahu, baruch, stable@vger.kernel.org
On 06/01/2022 17:44, Greg KH wrote:
> On Thu, Jan 06, 2022 at 05:24:27PM +0000, Bryan O'Donoghue wrote:
>> On 03/01/2022 05:51, Manivannan Sadhasivam wrote:
>>> On Mon, Jan 03, 2022 at 03:03:15AM +0000, Bryan O'Donoghue wrote:
>>>> Interacting with a NAND chip on an IPQ6018 I found that the qcomsmem NAND
>>>> partition parser was returning -EPROBE_DEFER waiting for the main smem
>>>> driver to load.
>>>>
>>>> This caused the board to reset. Playing about with the probe() function
>>>> shows that the problem lies in the core clock being switched off before the
>>>> nandc_unalloc() routine has completed.
>>>>
>>>> If we look at how qcom_nandc_remove() tears down allocated resources we see
>>>> the expected order is
>>>>
>>>> qcom_nandc_unalloc(nandc);
>>>>
>>>> clk_disable_unprepare(nandc->aon_clk);
>>>> clk_disable_unprepare(nandc->core_clk);
>>>>
>>>> dma_unmap_resource(&pdev->dev, nandc->base_dma, resource_size(res),
>>>> DMA_BIDIRECTIONAL, 0);
>>>>
>>>> Tweaking probe() to both bring up and tear-down in that order removes the
>>>> reset if we end up deferring elsewhere.
>>>>
>>>> Fixes: c76b78d8ec05 ("mtd: nand: Qualcomm NAND controller driver")
>>>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>>
>>> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
>>>
>>> Can you please CC stable list for backporting?
>>>
>>> Thanks,
>>> Mani
>>>
>>
>> NP.
>>
>> + cc stable
>>
>> FWIW I believe Greg's scripts will pick up on Fixes: tags automatically
>
> No, that is NOT the way to ensure that a patch will get picked up, that
> is a "this might eventually get there".
>
> Please read:
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
>
> thanks,
>
> greg k-h
>
Good to know
I've just been using Fixes: for the most part
Thanks
---
bod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-06 18:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220103030316.58301-1-bryan.odonoghue@linaro.org>
[not found] ` <20220103030316.58301-2-bryan.odonoghue@linaro.org>
[not found] ` <20220103055152.GA3581@thinkpad>
2022-01-06 17:24 ` [PATCH v2 1/2] mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe() Bryan O'Donoghue
2022-01-06 17:44 ` Greg KH
2022-01-06 18:02 ` Bryan O'Donoghue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).