RE: [PATCH v2] sdio: skip initialization on powered resume

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

 



Hi Zhangfei,

> -----Original Message-----
> From: zhangfei gao [mailto:zhangfei.gao@xxxxxxxxx]
> Sent: Friday, January 21, 2011 1:07 AM
> To: Nicolas Pitre; Bing Zhao
> Cc: Sahitya Tummala; linux-mmc@xxxxxxxxxxxxxxx; Michal Miroslaw; Chris Ball; Andrew Morton; Maxim
> Levitsky
> Subject: Re: [PATCH v2] sdio: skip initialization on powered resume
> 
> On Wed, Sep 15, 2010 at 10:26 PM, Nicolas Pitre <nico@xxxxxxxxxxx> wrote:
> > On Wed, 15 Sep 2010, Bing Zhao wrote:
> >
> >> If CMD7 is sent _before_ client driver's resume handler is called,
> >> while 8686 card is in sleep mode, it will fail. If CMD7 is sent
> >> _after_ client driver's resume handler is called, it should succeed.
> >
> > Maybe that's what we should do in the powered suspend case then.
> >
> >> By the way, a patch "mmc: fix all hangs related to mmc/sd card
> >> insert/removal during suspend/resume"
> >> (4c2ef25fe0b847d2ae818f74758ddb0be1c27d8e by Maxim Levitsky) has
> >> removed the call to mmc_detect_change() in mmc_resume_host().
> >
> > If a card is removed while the host is suspended, then this should be
> > detected.
> >
> >
> > Nicolas
> > --
> > 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
> >
> 
> Hi, Bing
> 
> Do you have any updated patch to skip mmc_sdio_init_card in resume back.
> We need such patch in enable host sleep feature for mrvl8787.

I posted a patch that skips mmc_sdio_init_card() with MMC_PM_SKIP_RESUME_PROBE flag earlier:

[PATCH v1] sdio: add MMC_PM_SKIP_RESUME_PROBE to workaround powered resume
http://marc.info/?l=linux-mmc&m=128294262424567&w=2

Nicolas commented that it's too hackish with this approach.
http://marc.info/?l=linux-mmc&m=128294738230151&w=2

Other than that, I couldn't think of a better way to solve the issue here:

In mmc_sdio_init_card() CIS device/vendor IDs are read to check if the card has been replaced or not when the system was suspended. But reading these IDs will cause CMD52 timeout if the card is in sleep state. The function driver can wake up the card by writing to certain card specific register, so that the followed SDIO commands (CMD52, CMD53, etc.) can go through. But the resume handler of the function driver won't be invoked until the IDs get validated.

Regards,

Bing

> 
> Thanks a lot.
--
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