Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
S
sunxi64-linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Mobian
devices
sunxi64-linux
Commits
9d95f9b3
Commit
9d95f9b3
authored
3 years ago
by
Undef
Browse files
Options
Downloads
Patches
Plain Diff
d/patches: remove upstreamed SD suspend patch
parent
9b926187
No related branches found
No related tags found
2 merge requests
!71
prepare for 5.15.60+
,
!70
Rebase on 5.15.59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/common/0034-mmc-core-Wait-for-command-setting-Power-Off-Notifica.patch
+0
-56
0 additions, 56 deletions
...mc-core-Wait-for-command-setting-Power-Off-Notifica.patch
debian/patches/series
+0
-1
0 additions, 1 deletion
debian/patches/series
with
0 additions
and
57 deletions
debian/patches/common/0034-mmc-core-Wait-for-command-setting-Power-Off-Notifica.patch
deleted
100644 → 0
+
0
−
56
View file @
9b926187
From: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Date: Sat, 15 Jan 2022 13:14:22 +0300
Subject: [PATCH] mmc: core: Wait for command setting 'Power Off Notification'
bit to complete
SD card is allowed to signal busy on DAT0 up to 1s after the
CMD49. According to SD spec (version 6.0 section 5.8.1.3) first host
waits until busy of CMD49 is released and only then polls Power
Management Status register up to 1s until the card indicates ready to
power off.
Without waiting for busy before polling status register sometimes card
becomes unresponsive and system fails to suspend:
[ 205.907459] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 206.421274] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[ 206.421321] sunxi-mmc 1c0f000.mmc: send stop command failed
[ 206.421347] mmc0: error -110 reading status reg of PM func
[ 206.421366] PM: dpm_run_callback(): mmc_bus_suspend+0x0/0x74 returns -110
[ 206.421402] mmcblk mmc0:aaaa: PM: failed to suspend async: error -110
[ 206.437064] PM: Some devices failed to suspend, or early wake event detected
Tested with Sandisk Extreme PRO A2 64GB on Allwinner A64 system.
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
---
drivers/mmc/core/sd.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 4646b7a..e305096 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -66,7 +66,7 @@
static const unsigned int sd_au_size[] = {
__res & __mask; \
})
-#define SD_POWEROFF_NOTIFY_TIMEOUT_MS 2000
+#define SD_POWEROFF_NOTIFY_TIMEOUT_MS 1000
#define SD_WRITE_EXTR_SINGLE_TIMEOUT_MS 1000
struct sd_busy_data {
@@ -1663,6 +1663,13 @@
static int sd_poweroff_notify(struct mmc_card *card)
goto out;
}
+ /* Find out when the command is completed. */
+ err = mmc_poll_for_busy(card, SD_POWEROFF_NOTIFY_TIMEOUT_MS, false,
+ MMC_BUSY_EXTR_SINGLE);
+
+ if (err)
+ goto out;
+
cb_data.card = card;
cb_data.reg_buf = reg_buf;
err = __mmc_poll_for_busy(card, SD_POWEROFF_NOTIFY_TIMEOUT_MS,
This diff is collapsed.
Click to expand it.
debian/patches/series
+
0
−
1
View file @
9d95f9b3
...
...
@@ -31,7 +31,6 @@ common/0030-PM-devfreq-Add-a-driver-for-the-sun8i-sun50i-MBUS.patch
common/0031-clk-sunxi-ng-Export-CLK_DRAM-for-devfreq.patch
common/0032-arm64-dts-allwinner-a64-Update-MBUS-node.patch
common/0033-devfreq-sun8i-mbus-Set-default-minimum-frequency-for.patch
common/0034-mmc-core-Wait-for-command-setting-Power-Off-Notifica.patch
power/0035-power-supply-axp20x_battery-Fix-charging-done-detect.patch
power/0036-mfd-axp20x-Add-battery-IRQ-resources.patch
power/0037-power-supply-axp20x_battery-Send-uevents-for-status-.patch
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment