MMC core:

- Apply SD quirks earlier during probe so they become relevant
 
 MMC host:
  - cqhci: Fix checking of CQHCI_HALT state
  - dw_mmc: Fix IDMAC operation with pages bigger than 4K
  - sdhci-of-aspeed: Fix module autoloading
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmba1YYXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjClMyA//WQkovwj5r+63djFS+HTp6+k8
 uW/goHNQknirggmNQibXsq99xOuys3E1Y0rmv9vuRYnqhRkAkEkgI3VmAl7uxmdM
 wjAB4/a81FRgW6IATIaxNpiH0MhUpETBZ0pS4XKX77adnEokPKgqHnUBiMvVbrDo
 xgu4a1nqA34gUK4B+QvmQiUMEoWmyq2oaBKInQIqAFAgTR6pjQx/bGHEkw+i7p/Q
 rs7nkbEylfb9motsOY4gqevD7ncO82AyrzjcY174EBuXHx6Lj7lhBL2nlzCMLSei
 mJiHbx5TkUib39EdvNbilg2e0h7Dbg4x5HJ+Mu76/tbkmtQDhaaoCSOa28BTZoke
 s7CJzG3HJqfbPMB5/qZH5dDkHkVSMRAfVwxj80NKjNPq2kvwwQJ5dS3s5vbSgeUy
 SZ2gaguZfv93qrJj86R2GWCtZvhTOwEgqQrS3kbDyPSBy7pipuwrAh2Du+nrDGO3
 zdt1GUGh+S8XlwcAIDtygxMmlVLvK9alEfVL6BsNzkSMYjm4h4Pb93wZESvf5aib
 Coe4jXijHW0+M2Qr74IkPfP1gCfoXVGkrP5U+s8Oo7hvrzbuMjMCEuy7dvVWgJ9v
 tlI95Tas2pM/cfhYo5taUpcZWUAZe27rvwcgUr4H0HtS0HEZO+xQr+YSSuR3rXTn
 bmbONlVOYFgdzLiRt8o=
 =/uql
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
 "MMC core:
   - Apply SD quirks earlier during probe so they become relevant

  MMC host:
   - cqhci: Fix checking of CQHCI_HALT state
   - dw_mmc: Fix IDMAC operation with pages bigger than 4K
   - sdhci-of-aspeed: Fix module autoloading"

* tag 'mmc-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: cqhci: Fix checking of CQHCI_HALT state
  mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K
  mmc: sdhci-of-aspeed: fix module autoloading
  mmc: core: apply SD quirks earlier during probe
This commit is contained in:
Linus Torvalds 2024-09-06 11:50:55 -07:00
commit c3af2256ad
5 changed files with 21 additions and 12 deletions

View File

@ -15,6 +15,19 @@
#include "card.h"
static const struct mmc_fixup __maybe_unused mmc_sd_fixups[] = {
/*
* Kingston Canvas Go! Plus microSD cards never finish SD cache flush.
* This has so far only been observed on cards from 11/2019, while new
* cards from 2023/05 do not exhibit this behavior.
*/
_FIXUP_EXT("SD64G", CID_MANFID_KINGSTON_SD, 0x5449, 2019, 11,
0, -1ull, SDIO_ANY_ID, SDIO_ANY_ID, add_quirk_sd,
MMC_QUIRK_BROKEN_SD_CACHE, EXT_CSD_REV_ANY),
END_FIXUP
};
static const struct mmc_fixup __maybe_unused mmc_blk_fixups[] = {
#define INAND_CMD38_ARG_EXT_CSD 113
#define INAND_CMD38_ARG_ERASE 0x00
@ -53,15 +66,6 @@ static const struct mmc_fixup __maybe_unused mmc_blk_fixups[] = {
MMC_FIXUP("MMC32G", CID_MANFID_TOSHIBA, CID_OEMID_ANY, add_quirk_mmc,
MMC_QUIRK_BLK_NO_CMD23),
/*
* Kingston Canvas Go! Plus microSD cards never finish SD cache flush.
* This has so far only been observed on cards from 11/2019, while new
* cards from 2023/05 do not exhibit this behavior.
*/
_FIXUP_EXT("SD64G", CID_MANFID_KINGSTON_SD, 0x5449, 2019, 11,
0, -1ull, SDIO_ANY_ID, SDIO_ANY_ID, add_quirk_sd,
MMC_QUIRK_BROKEN_SD_CACHE, EXT_CSD_REV_ANY),
/*
* Some SD cards lockup while using CMD23 multiblock transfers.
*/

View File

@ -26,6 +26,7 @@
#include "host.h"
#include "bus.h"
#include "mmc_ops.h"
#include "quirks.h"
#include "sd.h"
#include "sd_ops.h"
@ -1475,6 +1476,9 @@ retry:
goto free_card;
}
/* Apply quirks prior to card setup */
mmc_fixup_device(card, mmc_sd_fixups);
err = mmc_sd_setup_card(host, card, oldcard != NULL);
if (err)
goto free_card;

View File

@ -617,7 +617,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
cqhci_writel(cq_host, 0, CQHCI_CTL);
mmc->cqe_on = true;
pr_debug("%s: cqhci: CQE on\n", mmc_hostname(mmc));
if (cqhci_readl(cq_host, CQHCI_CTL) && CQHCI_HALT) {
if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT) {
pr_err("%s: cqhci: CQE failed to exit halt state\n",
mmc_hostname(mmc));
}

View File

@ -2957,8 +2957,8 @@ static int dw_mci_init_slot(struct dw_mci *host)
if (host->use_dma == TRANS_MODE_IDMAC) {
mmc->max_segs = host->ring_size;
mmc->max_blk_size = 65535;
mmc->max_seg_size = 0x1000;
mmc->max_req_size = mmc->max_seg_size * host->ring_size;
mmc->max_req_size = DW_MCI_DESC_DATA_LENGTH * host->ring_size;
mmc->max_seg_size = mmc->max_req_size;
mmc->max_blk_count = mmc->max_req_size / 512;
} else if (host->use_dma == TRANS_MODE_EDMAC) {
mmc->max_segs = 64;

View File

@ -510,6 +510,7 @@ static const struct of_device_id aspeed_sdhci_of_match[] = {
{ .compatible = "aspeed,ast2600-sdhci", .data = &ast2600_sdhci_pdata, },
{ }
};
MODULE_DEVICE_TABLE(of, aspeed_sdhci_of_match);
static struct platform_driver aspeed_sdhci_driver = {
.driver = {