From: "Pali Rohár" <pali@kernel.org>
To: Jerome Pouiller <Jerome.Pouiller@silabs.com>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
Kalle Valo <kvalo@codeaurora.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"David S . Miller" <davem@davemloft.net>,
linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH 2/2] staging: wfx: apply the necessary SDIO quirks for the Silabs WF200
Date: Wed, 16 Feb 2022 10:51:39 +0100 [thread overview]
Message-ID: <20220216095139.2oulgq2vwvpsmnan@pali> (raw)
In-Reply-To: <20220216093112.92469-3-Jerome.Pouiller@silabs.com>
On Wednesday 16 February 2022 10:31:12 Jerome Pouiller wrote:
> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
>
> Until now, the SDIO quirks are applied directly from the driver.
> However, it is better to apply the quirks before driver probing. So,
> this patch relocate the quirks in the MMC framework.
>
> Note that the WF200 has no valid SDIO VID/PID. Therefore, we match DT
> rather than on the SDIO VID/PID.
>
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Reviewed-by: Pali Rohár <pali@kernel.org>
> ---
> drivers/mmc/core/quirks.h | 5 +++++
> drivers/staging/wfx/bus_sdio.c | 3 ---
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h
> index 20f568727277..f879dc63d936 100644
> --- a/drivers/mmc/core/quirks.h
> +++ b/drivers/mmc/core/quirks.h
> @@ -149,6 +149,11 @@ static const struct mmc_fixup __maybe_unused sdio_fixup_methods[] = {
> static const struct mmc_fixup __maybe_unused sdio_card_init_methods[] = {
> SDIO_FIXUP_COMPATIBLE("ti,wl1251", wl1251_quirk, 0),
>
> + SDIO_FIXUP_COMPATIBLE("silabs,wf200", add_quirk,
> + MMC_QUIRK_BROKEN_BYTE_MODE_512 |
> + MMC_QUIRK_LENIENT_FN0 |
> + MMC_QUIRK_BLKSZ_FOR_BYTE_MODE),
> +
> END_FIXUP
> };
>
> diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c
> index 312d2d391a24..51a0d58a9070 100644
> --- a/drivers/staging/wfx/bus_sdio.c
> +++ b/drivers/staging/wfx/bus_sdio.c
> @@ -216,9 +216,6 @@ static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *i
> bus->func = func;
> bus->of_irq = irq_of_parse_and_map(np, 0);
> sdio_set_drvdata(func, bus);
> - func->card->quirks |= MMC_QUIRK_LENIENT_FN0 |
> - MMC_QUIRK_BLKSZ_FOR_BYTE_MODE |
> - MMC_QUIRK_BROKEN_BYTE_MODE_512;
>
> sdio_claim_host(func);
> ret = sdio_enable_func(func);
> --
> 2.34.1
>
next prev parent reply other threads:[~2022-02-16 9:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 9:31 [PATCH 0/2] staging: wfx: apply SDIO suggestions Jerome Pouiller
2022-02-16 9:31 ` [PATCH 1/2] staging: wfx: WF200 has no official SDIO IDs Jerome Pouiller
2022-02-16 9:50 ` Pali Rohár
2022-02-16 9:31 ` [PATCH 2/2] staging: wfx: apply the necessary SDIO quirks for the Silabs WF200 Jerome Pouiller
2022-02-16 9:51 ` Pali Rohár [this message]
2022-02-17 9:59 ` Kalle Valo
2022-02-17 14:54 ` Ulf Hansson
2022-02-17 15:04 ` Kalle Valo
2022-02-17 15:41 ` Jérôme Pouiller
2022-02-17 15:58 ` Greg Kroah-Hartman
2022-02-16 10:35 ` [PATCH 0/2] staging: wfx: apply SDIO suggestions Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220216095139.2oulgq2vwvpsmnan@pali \
--to=pali@kernel.org \
--cc=Jerome.Pouiller@silabs.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox