lkml.org 
[lkml]   [2014]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: One bug of SDHCI driver

Hi,

Why add "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" ? How to fix this bug?

Could you please give out some idea about this bug?


Thanks,
Zhonghui


On 2014/7/6 23:19, Fu, Zhonghui wrote:
> Yes, "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" of "sdhci_add_host" function in host/sdhci.c file make oops.
>
> "sdio_card_irq_get" function in core/sdio_irq.c file:
> if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) { /* the condition is false */
> atomic_set(&host->sdio_irq_thread_abort, 0);
> host->sdio_irq_thread =
> kthread_run(sdio_irq_thread, host,
> "ksdioirqd/%s", mmc_hostname(host));
>
>
> This will make "host->sdio_irq_thread" a NULL pointer in "mmc_sdio_resume" functon of core/sdio.c file.
>
>
>
> Thanks,
> Zhonghui
>
>
>
> On 2014/7/4 10:40, Jaehoon Chung wrote:
>> Hi,
>>
>> just use the MMC_CAP2_SDIO_IRQ_NOTHREAD?
>>
>> if (!err && host->sdio_irq && !(host->quirks & MMC_CAP2_SDIO_IRQ_NOTHREAD))
>> wake_up_process(host->sdio_irq_thread);
>>
>> I didn't test this..but i believe that it will be fixed.
>>
>> Best Regards,
>> Jaehoon Chung
>>
>> On 07/04/2014 12:47 AM, Fu, Zhonghui wrote:
>>> Hi, all
>>>
>>> The statement "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" is added in "sdhci_add_host" function in host/sdhci.c file. In some cases, this will make "host->sdio_irq_thread" a NULL pointer in "mmc_sdio_resume" functon of core/sdio.c file and lead to resume failure. Could you please give me some advice how to fix this bug?
>>>
>>>
>>>
>>> Thanks,
>>> Zhonghui
>>>
>>>
>>>
>>>
>>>
>>>



\
 
 \ /
  Last update: 2014-07-08 18:41    [W:0.116 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site