Re: [RFT] mmc: tmio: reset device on timeout, too

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

 



On Sun, 30 Aug 2020 at 15:04, Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>
> > This isn't how mmc_hw_reset() is intended to be used. Instead, the
> > idea is that it should be called by upper layer code, when some error
> > path is triggered for an I/O request.
>
> Hmm, there are some wireless drivers using it as well. I am confused, is
> this considered "upper layer"?
>
> drivers/net/wireless/ath/ath10k/sdio.c: ret = mmc_hw_reset(ar_sdio->func->card->host);
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:        mmc_hw_reset(sdiodev->func1->card->host);
> drivers/net/wireless/marvell/mwifiex/sdio.c:    ret = mmc_hw_reset(func->card->host);
> drivers/net/wireless/ti/wlcore/sdio.c:  mmc_hw_reset(card->host);

Correct, these are "upper layers". The same applies for the mmc block
device driver.

In this way there is a guarantee that the struct mmc_card is still present.

>
> I'd like to understand, so I can add some docs. Because the intended use
> is nowhere documented to the best of my knowledge.

That would be great. I appreciate all kinds of improvements on the doc parts.

>
> > However, let me think a bit about this.
>
> Sure, thanks for the help!

Thinking more about this.

Perhaps a better option is to return a specific error code for the
last request, that makes the core run mmc_hw_reset(). Or potentially,
add a host cap and let the core treat some error code, specifically
for hosts like tmio.

Kind regards
Uffe



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux