From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jonas Danielsson <jonas@orbital-systems.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Sasha Levin <sashal@kernel.org>,
linux-mmc@vger.kernel.org
Subject: [PATCH AUTOSEL 3.18 11/19] mmc: atmel-mci: do not assume idle after atmci_request_end
Date: Tue, 8 Jan 2019 14:35:23 -0500 [thread overview]
Message-ID: <20190108193534.124555-11-sashal@kernel.org> (raw)
In-Reply-To: <20190108193534.124555-1-sashal@kernel.org>
From: Jonas Danielsson <jonas@orbital-systems.com>
[ Upstream commit ae460c115b7aa50c9a36cf78fced07b27962c9d0 ]
On our AT91SAM9260 board we use the same sdio bus for wifi and for the
sd card slot. This caused the atmel-mci to give the following splat on
the serial console:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 538 at drivers/mmc/host/atmel-mci.c:859 atmci_send_command+0x24/0x44
Modules linked in:
CPU: 0 PID: 538 Comm: mmcqd/0 Not tainted 4.14.76 #14
Hardware name: Atmel AT91SAM9
[<c000fccc>] (unwind_backtrace) from [<c000d3dc>] (show_stack+0x10/0x14)
[<c000d3dc>] (show_stack) from [<c0017644>] (__warn+0xd8/0xf4)
[<c0017644>] (__warn) from [<c0017704>] (warn_slowpath_null+0x1c/0x24)
[<c0017704>] (warn_slowpath_null) from [<c033bb9c>] (atmci_send_command+0x24/0x44)
[<c033bb9c>] (atmci_send_command) from [<c033e984>] (atmci_start_request+0x1f4/0x2dc)
[<c033e984>] (atmci_start_request) from [<c033f3b4>] (atmci_request+0xf0/0x164)
[<c033f3b4>] (atmci_request) from [<c0327108>] (mmc_start_request+0x280/0x2d0)
[<c0327108>] (mmc_start_request) from [<c032800c>] (mmc_start_areq+0x230/0x330)
[<c032800c>] (mmc_start_areq) from [<c03366f8>] (mmc_blk_issue_rw_rq+0xc4/0x310)
[<c03366f8>] (mmc_blk_issue_rw_rq) from [<c03372c4>] (mmc_blk_issue_rq+0x118/0x5ac)
[<c03372c4>] (mmc_blk_issue_rq) from [<c033781c>] (mmc_queue_thread+0xc4/0x118)
[<c033781c>] (mmc_queue_thread) from [<c002daf8>] (kthread+0x100/0x118)
[<c002daf8>] (kthread) from [<c000a580>] (ret_from_fork+0x14/0x34)
---[ end trace 594371ddfa284bd6 ]---
This is:
WARN_ON(host->cmd);
This was fixed on our board by letting atmci_request_end determine what
state we are in. Instead of unconditionally setting it to STATE_IDLE on
STATE_END_REQUEST.
Signed-off-by: Jonas Danielsson <jonas@orbital-systems.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/mmc/host/atmel-mci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 6423083c5238..bacc0368db6b 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1838,13 +1838,14 @@ static void atmci_tasklet_func(unsigned long priv)
}
atmci_request_end(host, host->mrq);
- state = STATE_IDLE;
+ goto unlock; /* atmci_request_end() sets host->state */
break;
}
} while (state != prev_state);
host->state = state;
+unlock:
spin_unlock(&host->lock);
}
--
2.19.1
next prev parent reply other threads:[~2019-01-08 19:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 19:35 [PATCH AUTOSEL 3.18 01/19] MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 02/19] USB: serial: ftdi_sio: use rounding when calculating baud rate divisors Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 03/19] jffs2: Fix use of uninitialized delayed_work, lockdep breakage Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 04/19] pstore/ram: Do not treat empty buffers as valid Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 05/19] powerpc/pseries/cpuidle: Fix preempt warning Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 06/19] media: firewire: Fix app_info parameter type in avc_ca{,_app}_info Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 07/19] net: call sk_dst_reset when set SO_DONTROUTE Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 08/19] scsi: target: use consistent left-aligned ASCII INQUIRY data Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 09/19] clk: imx6q: reset exclusive gates on init Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 10/19] kconfig: fix memory leak when EOF is encountered in quotation Sasha Levin
2019-01-08 19:35 ` Sasha Levin [this message]
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 12/19] perf svghelper: Fix unchecked usage of strncpy() Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 13/19] perf parse-events: " Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 14/19] dm kcopyd: Fix bug causing workqueue stalls Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 15/19] dm snapshot: Fix excessive memory usage and " Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 16/19] ALSA: bebob: fix model-id of unit for Apogee Ensemble Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 17/19] sysfs: Disable lockdep for driver bind/unbind files Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 18/19] ocfs2: fix panic due to unrecovered local alloc Sasha Levin
2019-01-08 19:35 ` [PATCH AUTOSEL 3.18 19/19] mm, proc: be more verbose about unstable VMA flags in /proc/<pid>/smaps Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190108193534.124555-11-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=jonas@orbital-systems.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome