Re: [PATCH v2 1/1]mmc: check SDIO card wake up during suspending

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/11/19 Nicolas Pitre <nico@xxxxxxxxxxx>:
> On Thu, 18 Nov 2010, Jun Nie wrote:
>
>> >From 642b2e88fc4b6344290c88ce506fcda1bcc860a3 Mon Sep 17 00:00:00 2001
>> From: Jun Nie <njun@xxxxxxxxxxx>
>> Date: Fri, 12 Nov 2010 19:43:49 +0800
>> Subject: [PATCH] mmc: check SDIO card wake up during suspending
>>
>> It is possible that SDIO card send card interrupt to wake up
>> system just after SDIO func driver and SDIO card firmware commit
>> suspend state, while system is still in suspending process and
>> mmc interrupt is not release yet.
>>
>> Interrupt storm may happen if func driver does not notify firmware
>> to clear the wake up source. If func driver issue SDIO bus transaction
>> to have firmware clear the source and driver continue to handle the
>> wake up event, system may enter suspend before all transaction done.
>> In this case, SDIO card will not enter lower power mode never. But
>> system can not be wake up for only card insert/remove/interrupt irq are
>> listed in wake up source in SD spec. Data/command done irq can
>> not wake up system.
>>
>> This patch check SDIO card interrupt and stop system suspend if there
>> are card interrupt after func driver suspend.
>>
>> Signed-off-by: Jun Nie <njun@xxxxxxxxxxx>
>
> There is a structural problem with your patch.  Why do you have to dig
> into card specific data from sdhci_suspend_host()?  The fact that you
> need to include mmc/card.h into sdhci.c is a sign of layering
> violation, and all host drivers would have to be similarly modified,
> leading to unmaintainable code.  While the race might be real, there has
> to be another way to fix it.
>
>
> Nicolas
>

Ohad,
Thank you! I will look at the framework and submit new patch later.

Nicolas
Thanks to point out layer structure issue that I did not notice.

Jun
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux