linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Crash in mtd_cls_suspend because mtd is NULL.
@ 2012-02-02 23:50 NeilBrown
  2012-02-03  4:58 ` Artem Bityutskiy
  0 siblings, 1 reply; 3+ messages in thread
From: NeilBrown @ 2012-02-02 23:50 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: David Woodhouse, lkml

[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]


Hi,
 I just tried to suspend my GTA04 (OMAP based mobile phone platform) running
3.3-rc2 and it crashed in mtd_cls_suspend because mtd was NULL.

So for me, it looks like the following patch is a regression.

Is there anything I can do to help find the correct resolution here.

(It has some flash memory but I am not using it at all).

Thanks,
NeilBrown




commit 079c985e7a6f4ce60f931cebfdd5ee3c38347e31
Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date:   Fri Dec 30 17:15:59 2011 +0200

    mtd: do not use mtd->suspend and mtd->resume directly
    
    Just call the 'mtd_suspend()' and 'mtd_resume()' - they will do nothing
    if the operation is not defined.
    
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 66494ee..6ae9ca0 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -119,10 +119,7 @@ static int mtd_cls_suspend(struct device *dev, pm_message_t
 {
        struct mtd_info *mtd = dev_get_drvdata(dev);
 
-       if (mtd && mtd->suspend)
-               return mtd_suspend(mtd);
-       else
-               return 0;
+       return mtd_suspend(mtd);
 }
 
 static int mtd_cls_resume(struct device *dev)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Crash in mtd_cls_suspend because mtd is NULL.
  2012-02-02 23:50 Crash in mtd_cls_suspend because mtd is NULL NeilBrown
@ 2012-02-03  4:58 ` Artem Bityutskiy
  2012-02-05 22:28   ` NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: Artem Bityutskiy @ 2012-02-03  4:58 UTC (permalink / raw)
  To: NeilBrown; +Cc: David Woodhouse, lkml

[-- Attachment #1: Type: text/plain, Size: 688 bytes --]

On Fri, 2012-02-03 at 10:50 +1100, NeilBrown wrote:
> Hi,
>  I just tried to suspend my GTA04 (OMAP based mobile phone platform) running
> 3.3-rc2 and it crashed in mtd_cls_suspend because mtd was NULL.
> 
> So for me, it looks like the following patch is a regression.
> 
> Is there anything I can do to help find the correct resolution here.
> 
> (It has some flash memory but I am not using it at all).

Neil, there is a fix:

http://git.infradead.org/users/dedekind/l2-mtd.git/commit/da50432777e184dd889f077cf06a74aa24cb80d9

I should just be merged upstream. It was discussed here:

http://patchwork.ozlabs.org/patch/138551/

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Crash in mtd_cls_suspend because mtd is NULL.
  2012-02-03  4:58 ` Artem Bityutskiy
@ 2012-02-05 22:28   ` NeilBrown
  0 siblings, 0 replies; 3+ messages in thread
From: NeilBrown @ 2012-02-05 22:28 UTC (permalink / raw)
  To: dedekind1; +Cc: David Woodhouse, lkml

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

On Fri, 03 Feb 2012 06:58:24 +0200 Artem Bityutskiy <dedekind1@gmail.com>
wrote:

> On Fri, 2012-02-03 at 10:50 +1100, NeilBrown wrote:
> > Hi,
> >  I just tried to suspend my GTA04 (OMAP based mobile phone platform) running
> > 3.3-rc2 and it crashed in mtd_cls_suspend because mtd was NULL.
> > 
> > So for me, it looks like the following patch is a regression.
> > 
> > Is there anything I can do to help find the correct resolution here.
> > 
> > (It has some flash memory but I am not using it at all).
> 
> Neil, there is a fix:
> 
> http://git.infradead.org/users/dedekind/l2-mtd.git/commit/da50432777e184dd889f077cf06a74aa24cb80d9
> 
> I should just be merged upstream. It was discussed here:
> 
> http://patchwork.ozlabs.org/patch/138551/
> 

Thanks!

I pulled in the  whole 'master' branch and it is much better....
(which is to say that suspend gets a bit further, and the thing that causes
it to break isn't MTD (it is libertas_sdio..)).

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-05 22:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-02 23:50 Crash in mtd_cls_suspend because mtd is NULL NeilBrown
2012-02-03  4:58 ` Artem Bityutskiy
2012-02-05 22:28   ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).