* [PATCH] mmc: core: Fixup Oops for SDIO shutdown
@ 2013-07-02 10:53 Ulf Hansson
2013-07-02 10:58 ` Jaehoon Chung
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ulf Hansson @ 2013-07-02 10:53 UTC (permalink / raw)
To: linux-mmc, Chris Ball
Cc: Stephen Warren, Tuomas Tynkkynen, Jaehoon Chung, Ulf Hansson
Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
Oops in the shutdown sequence for SDIO.
The drv pointer, does not exist for SDIO since the probing of the SDIO
card from the mmc_bus perspective is expected to fail by returning
-ENODEV.
This patch adds the proper check for the pointer before calling it.
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Reported-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/core/bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 4c0decf..d4b99bb 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -129,7 +129,8 @@ static void mmc_bus_shutdown(struct device *dev)
struct mmc_host *host = card->host;
int ret;
- drv->shutdown(card);
+ if (dev->driver && drv->shutdown)
+ drv->shutdown(card);
if (host->bus_ops->shutdown) {
ret = host->bus_ops->shutdown(host);
--
1.7.10
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: core: Fixup Oops for SDIO shutdown
2013-07-02 10:53 [PATCH] mmc: core: Fixup Oops for SDIO shutdown Ulf Hansson
@ 2013-07-02 10:58 ` Jaehoon Chung
2013-07-02 10:58 ` Tuomas Tynkkynen
2013-07-02 15:15 ` Stephen Warren
2 siblings, 0 replies; 7+ messages in thread
From: Jaehoon Chung @ 2013-07-02 10:58 UTC (permalink / raw)
To: Ulf Hansson
Cc: linux-mmc, Chris Ball, Stephen Warren, Tuomas Tynkkynen,
Jaehoon Chung
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
On 07/02/2013 07:53 PM, Ulf Hansson wrote:
> Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
> Oops in the shutdown sequence for SDIO.
>
> The drv pointer, does not exist for SDIO since the probing of the SDIO
> card from the mmc_bus perspective is expected to fail by returning
> -ENODEV.
>
> This patch adds the proper check for the pointer before calling it.
>
> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> Reported-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> drivers/mmc/core/bus.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index 4c0decf..d4b99bb 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -129,7 +129,8 @@ static void mmc_bus_shutdown(struct device *dev)
> struct mmc_host *host = card->host;
> int ret;
>
> - drv->shutdown(card);
> + if (dev->driver && drv->shutdown)
> + drv->shutdown(card);
>
> if (host->bus_ops->shutdown) {
> ret = host->bus_ops->shutdown(host);
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: core: Fixup Oops for SDIO shutdown
2013-07-02 10:53 [PATCH] mmc: core: Fixup Oops for SDIO shutdown Ulf Hansson
2013-07-02 10:58 ` Jaehoon Chung
@ 2013-07-02 10:58 ` Tuomas Tynkkynen
2013-07-02 15:15 ` Stephen Warren
2 siblings, 0 replies; 7+ messages in thread
From: Tuomas Tynkkynen @ 2013-07-02 10:58 UTC (permalink / raw)
To: Ulf Hansson
Cc: linux-mmc@vger.kernel.org, Chris Ball, Stephen Warren,
Jaehoon Chung
On 07/02/2013 01:53 PM, Ulf Hansson wrote:
> Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
> Oops in the shutdown sequence for SDIO.
>
> The drv pointer, does not exist for SDIO since the probing of the SDIO
> card from the mmc_bus perspective is expected to fail by returning
> -ENODEV.
>
> This patch adds the proper check for the pointer before calling it.
>
> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> Reported-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
Hi,
That fixes it, thanks.
Tested-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: core: Fixup Oops for SDIO shutdown
2013-07-02 10:53 [PATCH] mmc: core: Fixup Oops for SDIO shutdown Ulf Hansson
2013-07-02 10:58 ` Jaehoon Chung
2013-07-02 10:58 ` Tuomas Tynkkynen
@ 2013-07-02 15:15 ` Stephen Warren
2013-07-07 17:15 ` Olof Johansson
2 siblings, 1 reply; 7+ messages in thread
From: Stephen Warren @ 2013-07-02 15:15 UTC (permalink / raw)
To: Ulf Hansson; +Cc: linux-mmc, Chris Ball, Tuomas Tynkkynen, Jaehoon Chung
On 07/02/2013 04:53 AM, Ulf Hansson wrote:
> Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
> Oops in the shutdown sequence for SDIO.
>
> The drv pointer, does not exist for SDIO since the probing of the SDIO
> card from the mmc_bus perspective is expected to fail by returning
> -ENODEV.
>
> This patch adds the proper check for the pointer before calling it.
Tested-by: Stephen Warren <swarren@nvidia.com>
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: core: Fixup Oops for SDIO shutdown
2013-07-02 15:15 ` Stephen Warren
@ 2013-07-07 17:15 ` Olof Johansson
2013-07-07 17:25 ` Chris Ball
0 siblings, 1 reply; 7+ messages in thread
From: Olof Johansson @ 2013-07-07 17:15 UTC (permalink / raw)
To: Stephen Warren, Chris Ball
Cc: Ulf Hansson, linux-mmc@vger.kernel.org, Tuomas Tynkkynen,
Jaehoon Chung
On Tue, Jul 2, 2013 at 8:15 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 07/02/2013 04:53 AM, Ulf Hansson wrote:
>> Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
>> Oops in the shutdown sequence for SDIO.
>>
>> The drv pointer, does not exist for SDIO since the probing of the SDIO
>> card from the mmc_bus perspective is expected to fail by returning
>> -ENODEV.
>>
>> This patch adds the proper check for the pointer before calling it.
>
> Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
Chris, I hit this on the 0705 linux-next. Can you pick up this patch
soonish please? Thanks!
-Olof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: core: Fixup Oops for SDIO shutdown
2013-07-07 17:15 ` Olof Johansson
@ 2013-07-07 17:25 ` Chris Ball
2013-07-07 17:55 ` Olof Johansson
0 siblings, 1 reply; 7+ messages in thread
From: Chris Ball @ 2013-07-07 17:25 UTC (permalink / raw)
To: Olof Johansson
Cc: Stephen Warren, Ulf Hansson, linux-mmc@vger.kernel.org,
Tuomas Tynkkynen, Jaehoon Chung
Hi,
On Sun, Jul 07 2013, Olof Johansson wrote:
> On Tue, Jul 2, 2013 at 8:15 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 07/02/2013 04:53 AM, Ulf Hansson wrote:
>>> Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
>>> Oops in the shutdown sequence for SDIO.
>>>
>>> The drv pointer, does not exist for SDIO since the probing of the SDIO
>>> card from the mmc_bus perspective is expected to fail by returning
>>> -ENODEV.
>>>
>>> This patch adds the proper check for the pointer before calling it.
>>
>> Tested-by: Stephen Warren <swarren@nvidia.com>
>
> Acked-by: Olof Johansson <olof@lixom.net>
>
> Chris, I hit this on the 0705 linux-next. Can you pick up this patch
> soonish please? Thanks!
Sorry for the delay -- I merged this on Friday, so it'll be in
tonight's -next.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: core: Fixup Oops for SDIO shutdown
2013-07-07 17:25 ` Chris Ball
@ 2013-07-07 17:55 ` Olof Johansson
0 siblings, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2013-07-07 17:55 UTC (permalink / raw)
To: Chris Ball
Cc: Stephen Warren, Ulf Hansson, linux-mmc@vger.kernel.org,
Tuomas Tynkkynen, Jaehoon Chung
On Sun, Jul 7, 2013 at 10:25 AM, Chris Ball <cjb@laptop.org> wrote:
> Hi,
>
> On Sun, Jul 07 2013, Olof Johansson wrote:
>> On Tue, Jul 2, 2013 at 8:15 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 07/02/2013 04:53 AM, Ulf Hansson wrote:
>>>> Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
>>>> Oops in the shutdown sequence for SDIO.
>>>>
>>>> The drv pointer, does not exist for SDIO since the probing of the SDIO
>>>> card from the mmc_bus perspective is expected to fail by returning
>>>> -ENODEV.
>>>>
>>>> This patch adds the proper check for the pointer before calling it.
>>>
>>> Tested-by: Stephen Warren <swarren@nvidia.com>
>>
>> Acked-by: Olof Johansson <olof@lixom.net>
>>
>> Chris, I hit this on the 0705 linux-next. Can you pick up this patch
>> soonish please? Thanks!
>
> Sorry for the delay -- I merged this on Friday, so it'll be in
> tonight's -next.
Great, thanks!
-Olof
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-07-07 17:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 10:53 [PATCH] mmc: core: Fixup Oops for SDIO shutdown Ulf Hansson
2013-07-02 10:58 ` Jaehoon Chung
2013-07-02 10:58 ` Tuomas Tynkkynen
2013-07-02 15:15 ` Stephen Warren
2013-07-07 17:15 ` Olof Johansson
2013-07-07 17:25 ` Chris Ball
2013-07-07 17:55 ` Olof Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox