Skip to contentSkip to conversation

mmc: meson-gx: Remove setting of CMD_CFG_ERROR

PATCH In review Rong.Chen 3 participants 3 messages Oct 26, 2023 – Oct 27, 2023

Subsystems (2)
lore
Share & tools
lore

Rong.Chen

author
#0 lore raw

PATCH v2 1/1 mmc: meson-gx: Remove setting of CMD_CFG_ERROR

From: Rong Chen <[email protected]>

For the t7 and older SoC families, the CMD_CFG_ERROR has no effect. Starting from SoC family C3, setting this bit without SG LINK data address will cause the controller to generate an IRQ and stop working.

To fix it, don't set the bit CMD_CFG_ERROR anymore.

Fixes 18f92bc02f17 ("mmc: meson-gx: make sure the descriptor is stopped on errors")
---
 drivers/mmc/host/meson-gx-mmc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mmc/host/meson-gx-mmc.c +0 -1
index 9837dab096e6..c7c067b9415a 100644
@@ -801,7 +801,6 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd)
 
 	cmd_cfg |= FIELD_PREP(CMD_CFG_CMD_INDEX_MASK, cmd->opcode);
 	cmd_cfg |= CMD_CFG_OWNER;  /* owned by CPU */
-	cmd_cfg |= CMD_CFG_ERROR; /* stop in case of error */
 
 	meson_mmc_set_response_bits(cmd, &cmd_cfg);
 
Signature · 1 line
2.42.0
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 19 lines · Rong.Chen

From: Rong Chen <[email protected]>

For the t7 and older SoC families, the CMD_CFG_ERROR has no effect. Starting from SoC family C3, setting this bit without SG LINK data address will cause the controller to generate an IRQ and stop working.

To fix it, don't set the bit CMD_CFG_ERROR anymore.

Fixes 18f92bc02f17 ("mmc: meson-gx: make sure the descriptor is stopped on errors")
---
 drivers/mmc/host/meson-gx-mmc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mmc/host/meson-gx-mmc.c +0 -0
index 9837dab096e6..c7c067b9415a 100644

drivers/mmc/host/meson-gx-mmc.c static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd) · line 805

Quoted 6 lines
drivers/mmc/host/meson-gx-mmc.c +0 -1
@@ -801,7 +801,6 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd)
 
 	cmd_cfg |= FIELD_PREP(CMD_CFG_CMD_INDEX_MASK, cmd->opcode);
 	cmd_cfg |= CMD_CFG_OWNER;  /* owned by CPU */
-	cmd_cfg |= CMD_CFG_ERROR; /* stop in case of error */
 
 	meson_mmc_set_response_bits(cmd, &cmd_cfg);
#2 lore raw
In reply to Rong.Chen
Quoted 11 lines · Rong.Chen

From: Rong Chen <[email protected]>

For the t7 and older SoC families, the CMD_CFG_ERROR has no effect. Starting from SoC family C3, setting this bit without SG LINK data address will cause the controller to generate an IRQ and stop working.

To fix it, don't set the bit CMD_CFG_ERROR anymore.

Fixes 18f92bc02f17 ("mmc: meson-gx: make sure the descriptor is stopped on errors")

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe

Quoted 19 lines
---
 drivers/mmc/host/meson-gx-mmc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mmc/host/meson-gx-mmc.c +0 -2
index 9837dab096e6..c7c067b9415a 100644
@@ -801,7 +801,6 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd)
 
        cmd_cfg |= FIELD_PREP(CMD_CFG_CMD_INDEX_MASK, cmd->opcode);
        cmd_cfg |= CMD_CFG_OWNER;  /* owned by CPU */
-       cmd_cfg |= CMD_CFG_ERROR; /* stop in case of error */
 
        meson_mmc_set_response_bits(cmd, &cmd_cfg);
 
--

2.42.0