mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
MMC core:
- Fix broken cache-flush support for Micron eMMCs - Revert "mmc: core: Capture correct oemid-bits for eMMC cards" MMC host: - sdhci_am654: Fix TAP value parsing for legacy speed mode - sdhci-pci-gli: Fix support for ASPM mode for GL9755/GL9750 - vub300: Fix an error path in probe -----BEGIN PGP SIGNATURE----- iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmVOIL8XHHVsZi5oYW5z c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCnv6w/9FxD7hl2XBeHEoiLnzB3lX4YO zcsn3cpOCBjJnslOsBwRxk+07YK18umCZIWBSeN6PnN2MXjacvPJHiMvdyX5N/4x QvxxKhC0k9vyuNAHMSk3myKNSIYcXm3xz1iLYesYnfPDOMRFZsN4LgWnYamgYfA6 cRooF3zSN8mY7ftTn6z0YTH7vUTA6m91qE2LpEDeCfOIcXRRG3diZ3VbKef5ugXw XdvfaQ0lZUvXxlNSQa+ZgtgIKmTbj8OOD0ZBsEfj+CgsFFe2D1EDQ665Zqtw9RDa 8Vq1RDzan4EbxJetPIkppGPPpQIxJQtRvo45aDxP4DaDxZcrPblVsTgPPSxO9q37 4m9q3dTabJZmVC1UehjTEGwHakf50S6S/seCjKvGVn9jPMY82uuOm/MdUzwik1cl Os0MPviSatJ/A1tVIDCVSX+Xn6RZOn0a3jjQ1fESyS+/65hXe82I8IFXT+ZM6ZK+ 2RBkfAfs6lfSY3LRCtMKgQDLBvYe83qRe91zD/0eqTDOY9396BoHZLdYvX8uP7Ah sBrFRvPkNSMktBth7WNEetU6l1VH6b/8PuoOBswKA+820Jm/3kvAS34bTce/WzPP QN5zgD1SchUO6qPH9dh1AdG1awXLev4+dxYhKZEMFbi8sVqXekVIb2Sh66D+FBJu svZrEpAg3KgAJALsjZQ= =EohY -----END PGP SIGNATURE----- Merge tag 'mmc-v6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix broken cache-flush support for Micron eMMCs - Revert 'mmc: core: Capture correct oemid-bits for eMMC cards' MMC host: - sdhci_am654: Fix TAP value parsing for legacy speed mode - sdhci-pci-gli: Fix support for ASPM mode for GL9755/GL9750 - vub300: Fix an error path in probe" * tag 'mmc-v6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-pci-gli: GL9750: Mask the replay timer timeout of AER mmc: sdhci-pci-gli: GL9755: Mask the replay timer timeout of AER Revert "mmc: core: Capture correct oemid-bits for eMMC cards" mmc: vub300: fix an error code mmc: Add quirk MMC_QUIRK_BROKEN_CACHE_FLUSH for Micron eMMC Q2J54A mmc: sdhci_am654: fix start loop index for TAP value parsing
This commit is contained in:
commit
b456259e15
@ -2381,8 +2381,10 @@ enum mmc_issued mmc_blk_mq_issue_rq(struct mmc_queue *mq, struct request *req)
|
||||
}
|
||||
ret = mmc_blk_cqe_issue_flush(mq, req);
|
||||
break;
|
||||
case REQ_OP_READ:
|
||||
case REQ_OP_WRITE:
|
||||
card->written_flag = true;
|
||||
fallthrough;
|
||||
case REQ_OP_READ:
|
||||
if (host->cqe_enabled)
|
||||
ret = mmc_blk_cqe_issue_rw_rq(mq, req);
|
||||
else
|
||||
|
@ -280,4 +280,8 @@ static inline int mmc_card_broken_sd_cache(const struct mmc_card *c)
|
||||
return c->quirks & MMC_QUIRK_BROKEN_SD_CACHE;
|
||||
}
|
||||
|
||||
static inline int mmc_card_broken_cache_flush(const struct mmc_card *c)
|
||||
{
|
||||
return c->quirks & MMC_QUIRK_BROKEN_CACHE_FLUSH;
|
||||
}
|
||||
#endif
|
||||
|
@ -104,7 +104,7 @@ static int mmc_decode_cid(struct mmc_card *card)
|
||||
case 3: /* MMC v3.1 - v3.3 */
|
||||
case 4: /* MMC v4 */
|
||||
card->cid.manfid = UNSTUFF_BITS(resp, 120, 8);
|
||||
card->cid.oemid = UNSTUFF_BITS(resp, 104, 8);
|
||||
card->cid.oemid = UNSTUFF_BITS(resp, 104, 16);
|
||||
card->cid.prod_name[0] = UNSTUFF_BITS(resp, 96, 8);
|
||||
card->cid.prod_name[1] = UNSTUFF_BITS(resp, 88, 8);
|
||||
card->cid.prod_name[2] = UNSTUFF_BITS(resp, 80, 8);
|
||||
@ -2086,13 +2086,17 @@ static int _mmc_flush_cache(struct mmc_host *host)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
if (mmc_card_broken_cache_flush(host->card) && !host->card->written_flag)
|
||||
return 0;
|
||||
|
||||
if (_mmc_cache_enabled(host)) {
|
||||
err = mmc_switch(host->card, EXT_CSD_CMD_SET_NORMAL,
|
||||
EXT_CSD_FLUSH_CACHE, 1,
|
||||
CACHE_FLUSH_TIMEOUT_MS);
|
||||
if (err)
|
||||
pr_err("%s: cache flush error %d\n",
|
||||
mmc_hostname(host), err);
|
||||
pr_err("%s: cache flush error %d\n", mmc_hostname(host), err);
|
||||
else
|
||||
host->card->written_flag = false;
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -110,11 +110,12 @@ static const struct mmc_fixup __maybe_unused mmc_blk_fixups[] = {
|
||||
MMC_QUIRK_TRIM_BROKEN),
|
||||
|
||||
/*
|
||||
* Micron MTFC4GACAJCN-1M advertises TRIM but it does not seems to
|
||||
* support being used to offload WRITE_ZEROES.
|
||||
* Micron MTFC4GACAJCN-1M supports TRIM but does not appear to support
|
||||
* WRITE_ZEROES offloading. It also supports caching, but the cache can
|
||||
* only be flushed after a write has occurred.
|
||||
*/
|
||||
MMC_FIXUP("Q2J54A", CID_MANFID_MICRON, 0x014e, add_quirk_mmc,
|
||||
MMC_QUIRK_TRIM_BROKEN),
|
||||
MMC_QUIRK_TRIM_BROKEN | MMC_QUIRK_BROKEN_CACHE_FLUSH),
|
||||
|
||||
/*
|
||||
* Kingston EMMC04G-M627 advertises TRIM but it does not seems to
|
||||
|
@ -28,6 +28,9 @@
|
||||
#define PCI_GLI_9750_PM_CTRL 0xFC
|
||||
#define PCI_GLI_9750_PM_STATE GENMASK(1, 0)
|
||||
|
||||
#define PCI_GLI_9750_CORRERR_MASK 0x214
|
||||
#define PCI_GLI_9750_CORRERR_MASK_REPLAY_TIMER_TIMEOUT BIT(12)
|
||||
|
||||
#define SDHCI_GLI_9750_CFG2 0x848
|
||||
#define SDHCI_GLI_9750_CFG2_L1DLY GENMASK(28, 24)
|
||||
#define GLI_9750_CFG2_L1DLY_VALUE 0x1F
|
||||
@ -152,6 +155,9 @@
|
||||
#define PCI_GLI_9755_PM_CTRL 0xFC
|
||||
#define PCI_GLI_9755_PM_STATE GENMASK(1, 0)
|
||||
|
||||
#define PCI_GLI_9755_CORRERR_MASK 0x214
|
||||
#define PCI_GLI_9755_CORRERR_MASK_REPLAY_TIMER_TIMEOUT BIT(12)
|
||||
|
||||
#define SDHCI_GLI_9767_GM_BURST_SIZE 0x510
|
||||
#define SDHCI_GLI_9767_GM_BURST_SIZE_AXI_ALWAYS_SET BIT(8)
|
||||
|
||||
@ -561,6 +567,11 @@ static void gl9750_hw_setting(struct sdhci_host *host)
|
||||
value &= ~PCI_GLI_9750_PM_STATE;
|
||||
pci_write_config_dword(pdev, PCI_GLI_9750_PM_CTRL, value);
|
||||
|
||||
/* mask the replay timer timeout of AER */
|
||||
pci_read_config_dword(pdev, PCI_GLI_9750_CORRERR_MASK, &value);
|
||||
value |= PCI_GLI_9750_CORRERR_MASK_REPLAY_TIMER_TIMEOUT;
|
||||
pci_write_config_dword(pdev, PCI_GLI_9750_CORRERR_MASK, value);
|
||||
|
||||
gl9750_wt_off(host);
|
||||
}
|
||||
|
||||
@ -770,6 +781,11 @@ static void gl9755_hw_setting(struct sdhci_pci_slot *slot)
|
||||
value &= ~PCI_GLI_9755_PM_STATE;
|
||||
pci_write_config_dword(pdev, PCI_GLI_9755_PM_CTRL, value);
|
||||
|
||||
/* mask the replay timer timeout of AER */
|
||||
pci_read_config_dword(pdev, PCI_GLI_9755_CORRERR_MASK, &value);
|
||||
value |= PCI_GLI_9755_CORRERR_MASK_REPLAY_TIMER_TIMEOUT;
|
||||
pci_write_config_dword(pdev, PCI_GLI_9755_CORRERR_MASK, value);
|
||||
|
||||
gl9755_wt_off(pdev);
|
||||
}
|
||||
|
||||
|
@ -598,7 +598,7 @@ static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = MMC_TIMING_MMC_HS; i <= MMC_TIMING_MMC_HS400; i++) {
|
||||
for (i = MMC_TIMING_LEGACY; i <= MMC_TIMING_MMC_HS400; i++) {
|
||||
|
||||
ret = device_property_read_u32(dev, td[i].otap_binding,
|
||||
&sdhci_am654->otap_del_sel[i]);
|
||||
|
@ -2309,6 +2309,7 @@ static int vub300_probe(struct usb_interface *interface,
|
||||
vub300->read_only =
|
||||
(0x0010 & vub300->system_port_status.port_flags) ? 1 : 0;
|
||||
} else {
|
||||
retval = -EINVAL;
|
||||
goto error5;
|
||||
}
|
||||
usb_set_intfdata(interface, vub300);
|
||||
|
@ -295,7 +295,9 @@ struct mmc_card {
|
||||
#define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */
|
||||
#define MMC_QUIRK_BROKEN_SD_DISCARD (1<<14) /* Disable broken SD discard support */
|
||||
#define MMC_QUIRK_BROKEN_SD_CACHE (1<<15) /* Disable broken SD cache support */
|
||||
#define MMC_QUIRK_BROKEN_CACHE_FLUSH (1<<16) /* Don't flush cache until the write has occurred */
|
||||
|
||||
bool written_flag; /* Indicates eMMC has been written since power on */
|
||||
bool reenable_cmdq; /* Re-enable Command Queue */
|
||||
|
||||
unsigned int erase_size; /* erase size in sectors */
|
||||
|
Loading…
Reference in New Issue
Block a user