ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards
@ 2022-03-21 11:50 Wolfram Sang
  2022-03-21 11:50 ` [RFC PATCH 02/10] ath10k: sdio: update to new MMC API for resetting cards Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wolfram Sang @ 2022-03-21 11:50 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, linux-kernel, Wolfram Sang, ath10k,
	bcm-kernel-feedback-list, brcm80211-dev-list.pdl, linux-amlogic,
	linux-arm-kernel, linux-mediatek, linux-rpi-kernel, linux-sunxi,
	linux-wireless, netdev, SHA-cyfmac-dev-list

As discussed in 2020 [1], Ulf and I agreed that it would be easier to
understand the {h|s}w_reset mechanisms if it was clear that they are for
cards. This RFC series implements that by adding 'card' to the function
names and changing the parameter to mmc_card where apropriate. Note that
I only changed the MMC core. The SDHCI driver still uses hw_reset in its
ops, I leave it to the SDHCI maintainers if they want to change that.
Also, I didn't convert CAP_HW_RESET to CAP_CARD_HW_RESET yet although it
should be done IMHO. However, we need an agreement on that first.
Finally, I also did not check if all the host drivers are really doing a
card reset or a controller reset. I tried but it was often not obvious
what is actually happening in these functions without proper manuals.

I tested it with my Renesas boards, so far no regressions. Buildbots are
currently checking the series. For this RFC, I sent this as one series
so people can get an overview and comment on that. For a proper release,
I think patches 1-5 should be one series, and 7-10 probably. Patch 6
could then be applied once patches 2-4 hit the net tree. That's my
proposal.

This series is based on mmc/next as of yesterday. A branch is here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/mmc/reset-api

Looking forward to comments. Happy hacking,

   Wolfram

[1] https://lore.kernel.org/all/20200916090121.2350-1-wsa+renesas@sang-engineering.com/

Wolfram Sang (10):
  mmc: core: improve API to make clear mmc_hw_reset is for cards
  ath10k: sdio: update to new MMC API for resetting cards
  brcmfmac: sdio: update to new MMC API for resetting cards
  mwifiex: sdio: update to new MMC API for resetting cards
  wlcore: sdio: update to new MMC API for resetting cards
  mmc: core: remove fallback for mmc_hw_reset()
  mmc: core: improve API to make clear that mmc_sw_reset is for cards
  mmc: core: improve API to make clear hw_reset from bus_ops is for
    cards
  mmc: core: improve API to make clear sw_reset from bus_ops is for
    cards
  mmc: improve API to make clear hw_reset callback is for cards

 drivers/mmc/core/block.c                      |  2 +-
 drivers/mmc/core/core.c                       | 31 ++++++++++---------
 drivers/mmc/core/core.h                       |  4 +--
 drivers/mmc/core/mmc.c                        | 10 +++---
 drivers/mmc/core/mmc_test.c                   |  3 +-
 drivers/mmc/core/sd.c                         |  8 ++---
 drivers/mmc/core/sdio.c                       | 12 ++++---
 drivers/mmc/host/bcm2835.c                    |  2 +-
 drivers/mmc/host/dw_mmc.c                     |  2 +-
 drivers/mmc/host/meson-mx-sdhc-mmc.c          |  2 +-
 drivers/mmc/host/mtk-sd.c                     |  2 +-
 drivers/mmc/host/sdhci.c                      |  2 +-
 drivers/mmc/host/sunxi-mmc.c                  |  2 +-
 drivers/mmc/host/uniphier-sd.c                |  2 +-
 drivers/net/wireless/ath/ath10k/sdio.c        |  2 +-
 .../broadcom/brcm80211/brcmfmac/sdio.c        |  2 +-
 drivers/net/wireless/marvell/mwifiex/sdio.c   |  2 +-
 drivers/net/wireless/ti/wlcore/sdio.c         |  2 +-
 include/linux/mmc/core.h                      |  4 +--
 include/linux/mmc/host.h                      |  2 +-
 20 files changed, 51 insertions(+), 47 deletions(-)

-- 
2.30.2


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RFC PATCH 02/10] ath10k: sdio: update to new MMC API for resetting cards
  2022-03-21 11:50 [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards Wolfram Sang
@ 2022-03-21 11:50 ` Wolfram Sang
  2022-03-22  6:43 ` [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards Wolfram Sang
  2022-04-01 16:25 ` Wolfram Sang
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2022-03-21 11:50 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, linux-kernel, Wolfram Sang, Kalle Valo,
	David S. Miller, Jakub Kicinski, ath10k, linux-wireless, netdev

No functional change, only the name and the argument type change to
avoid confusion between resetting a card and a host controller.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

RFC, please do not apply yet.

 drivers/net/wireless/ath/ath10k/sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
index 63e1c2d783c5..b6c9eb0ab9c8 100644
--- a/drivers/net/wireless/ath/ath10k/sdio.c
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -1633,7 +1633,7 @@ static void ath10k_sdio_hif_power_down(struct ath10k *ar)
 		return;
 	}
 
-	ret = mmc_hw_reset(ar_sdio->func->card->host);
+	ret = mmc_card_hw_reset(ar_sdio->func->card);
 	if (ret)
 		ath10k_warn(ar, "unable to reset sdio: %d\n", ret);
 
-- 
2.30.2


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards
  2022-03-21 11:50 [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards Wolfram Sang
  2022-03-21 11:50 ` [RFC PATCH 02/10] ath10k: sdio: update to new MMC API for resetting cards Wolfram Sang
@ 2022-03-22  6:43 ` Wolfram Sang
  2022-04-01 16:25 ` Wolfram Sang
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2022-03-22  6:43 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, linux-kernel, ath10k,
	bcm-kernel-feedback-list, brcm80211-dev-list.pdl, linux-amlogic,
	linux-arm-kernel, linux-mediatek, linux-rpi-kernel, linux-sunxi,
	linux-wireless, netdev, SHA-cyfmac-dev-list


[-- Attachment #1.1: Type: text/plain, Size: 143 bytes --]


> I tested it with my Renesas boards, so far no regressions. Buildbots are
> currently checking the series.

Update: buildbots are happy \o/


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards
  2022-03-21 11:50 [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards Wolfram Sang
  2022-03-21 11:50 ` [RFC PATCH 02/10] ath10k: sdio: update to new MMC API for resetting cards Wolfram Sang
  2022-03-22  6:43 ` [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards Wolfram Sang
@ 2022-04-01 16:25 ` Wolfram Sang
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2022-04-01 16:25 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, linux-kernel, ath10k,
	bcm-kernel-feedback-list, brcm80211-dev-list.pdl, linux-amlogic,
	linux-arm-kernel, linux-mediatek, linux-rpi-kernel, linux-sunxi,
	linux-wireless, netdev, SHA-cyfmac-dev-list


[-- Attachment #1.1: Type: text/plain, Size: 263 bytes --]


> I tested it with my Renesas boards, so far no regressions. Buildbots are

Wishful thinking, the patches crash now when booting. Still checking
what is the difference to when I send the patches out.

Still, looking forward to comments on the general approach.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-01 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 11:50 [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards Wolfram Sang
2022-03-21 11:50 ` [RFC PATCH 02/10] ath10k: sdio: update to new MMC API for resetting cards Wolfram Sang
2022-03-22  6:43 ` [RFC PATCH 00/10] mmc: improve API to make clear {h|s}w_reset is for cards Wolfram Sang
2022-04-01 16:25 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).