All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: Daniel Mack <zonque@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>,
	David Woodhouse <David.Woodhouse@intel.com>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Lei Wen <leiwen@marvell.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	linux-mtd@lists.infradead.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/4] MTD: pxa3xx_nand: enable multiple chip select support
Date: Mon, 11 Jul 2011 21:19:56 +0300	[thread overview]
Message-ID: <4E1B3ECC.5080308@compulab.co.il> (raw)
In-Reply-To: <CACTFLAOmRMDH_6qo_WkndoWX-HPw9RTqbtsURDfw22sWEFS2wg@mail.gmail.com>

On 07/11/11 17:49, Daniel Mack wrote:
> On Wed, Jul 6, 2011 at 9:41 AM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>> Daniel,
>>
>> have you tested the suspend/resume with this patch?
>> (and keep_config on?)
> We did now test this with keep_config=1 and it seems that we indeed
> have a problem with suspend/resume after this patch. Affected machines
> show the following after wake up:
>
>
> [ 1295.458958] PM: resume of devices complete after 296.228 msecs
> [ 1295.717773] Restarting tasks ...
> [ 1295.729639] UBI error: ubi_io_write: error -5 while writing 2048
> bytes to PEB 19:59392, written 0 bytes
> [ 1295.761672] done.
> [ 1295.772706] UBI warning: ubi_eba_write_leb: failed to write data to PEB 19
> [ 1295.782492] UBI: recover PEB 19, move data to PEB 405
> [ 1295.849084] mmc0: new SDIO card at address 0001
> [ 1295.978045] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1295.983153] UBI warning: ubi_io_read_vid_hdr: no VID header found
> at PEB 19, only 0xFF bytes
> [ 1296.015382] UBI: run torture test for PEB 405
> [ 1296.024375] UBI warning: ubi_ro_mode: switch to read-only mode
> [ 1296.032321] UBI error: do_sync_erase: read-only mode
> [ 1296.037296] UBI error: erase_worker: failed to erase PEB 405, error -30
> [ 1296.058363] UBIFS error (pid 1303): ubifs_wbuf_write_nolock: cannot
> write 424 bytes to LEB 317:55296, error -5
> [ 1296.080917] UBIFS error (pid 1092): ubifs_wbuf_write_nolock: cannot
> write 416 bytes to LEB 317:55296, error -30
> [ 1296.094470] UBIFS warning (pid 1303): ubifs_ro_mode: switched to
> read-only mode, error -5
> [ 1296.106183] UBIFS error (pid 1092): ubifs_create: cannot create
> regular file, error -30
> [ 1296.118007] UBI error: do_work: work failed with error code -30
> [ 1296.123915] UBI error: ubi_thread: ubi_bgt0d: work failed with error code -30
> [ 1296.742934] libertas_sdio mmc0:0001:1: (unregistered net_device):
> 00:19:88:11:db:67, fw 9.70.7p0, cap 0x00000303
> [ 1296.779845] libertas_sdio mmc0:0001:1: wlan0: Marvell WLAN 802.11 adapter
> [ 1296.847141] ADDRCONF(NETDEV_UP): wlan0: link is not ready
> [ 1298.041988] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> [ 1300.957951] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.157810] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.357874] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.557924] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.563064] UBIFS error (pid 1260): ubifs_read_node: bad node type
> (255 but expected 1)
> [ 1301.573526] UBIFS error (pid 1260): ubifs_read_node: bad node at
> LEB 112:18808, LEB mapping status 1
> [ 1301.583586] UBIFS error (pid 1260): do_readpage: cannot read page 3
> of inode 10295, error -22
> [ 1301.787877] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.987891] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1302.187878] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1302.387878] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1302.393866] UBIFS error (pid 1260): ubifs_read_node: bad node type
> (255 but expected 1)
> [ 1302.403452] UBIFS error (pid 1260): ubifs_read_node: bad node at
> LEB 112:18808, LEB mapping status 1
> [ 1302.413507] UBIFS error (pid 1260): do_readpage: cannot read page 3
> of inode 10295, error -22
>
>
> The UBIFS is very likely toast after this.

Heh, so I'm still sane... ;)

> Lei, any ideas, can you reproduce this? To avoid further regressions
> of this driver, you really should have a system on which you can test
> suspend and resume after each commit.

I think the problem is that on PXA3xx resume from S2/S3 involves bootloader.
If I remember correctly, the BootROM reads the bootloader from the boot device
regardless of the reset cause (S2/S3 resume is kind a reset for PXA3xx).
Then the bootloader must decide what should be done according to the reset cause.
This means, that the BootROM already configures the NAND flash
(if it is the boot device) and pxa3xx_nand driver should just get on with it
and don't try to reconfigure?

Am I still sane? ;)

-- 
Regards,
Igor.

WARNING: multiple messages have this Message-ID (diff)
From: grinberg@compulab.co.il (Igor Grinberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] MTD: pxa3xx_nand: enable multiple chip select support
Date: Mon, 11 Jul 2011 21:19:56 +0300	[thread overview]
Message-ID: <4E1B3ECC.5080308@compulab.co.il> (raw)
In-Reply-To: <CACTFLAOmRMDH_6qo_WkndoWX-HPw9RTqbtsURDfw22sWEFS2wg@mail.gmail.com>

On 07/11/11 17:49, Daniel Mack wrote:
> On Wed, Jul 6, 2011 at 9:41 AM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>> Daniel,
>>
>> have you tested the suspend/resume with this patch?
>> (and keep_config on?)
> We did now test this with keep_config=1 and it seems that we indeed
> have a problem with suspend/resume after this patch. Affected machines
> show the following after wake up:
>
>
> [ 1295.458958] PM: resume of devices complete after 296.228 msecs
> [ 1295.717773] Restarting tasks ...
> [ 1295.729639] UBI error: ubi_io_write: error -5 while writing 2048
> bytes to PEB 19:59392, written 0 bytes
> [ 1295.761672] done.
> [ 1295.772706] UBI warning: ubi_eba_write_leb: failed to write data to PEB 19
> [ 1295.782492] UBI: recover PEB 19, move data to PEB 405
> [ 1295.849084] mmc0: new SDIO card at address 0001
> [ 1295.978045] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1295.983153] UBI warning: ubi_io_read_vid_hdr: no VID header found
> at PEB 19, only 0xFF bytes
> [ 1296.015382] UBI: run torture test for PEB 405
> [ 1296.024375] UBI warning: ubi_ro_mode: switch to read-only mode
> [ 1296.032321] UBI error: do_sync_erase: read-only mode
> [ 1296.037296] UBI error: erase_worker: failed to erase PEB 405, error -30
> [ 1296.058363] UBIFS error (pid 1303): ubifs_wbuf_write_nolock: cannot
> write 424 bytes to LEB 317:55296, error -5
> [ 1296.080917] UBIFS error (pid 1092): ubifs_wbuf_write_nolock: cannot
> write 416 bytes to LEB 317:55296, error -30
> [ 1296.094470] UBIFS warning (pid 1303): ubifs_ro_mode: switched to
> read-only mode, error -5
> [ 1296.106183] UBIFS error (pid 1092): ubifs_create: cannot create
> regular file, error -30
> [ 1296.118007] UBI error: do_work: work failed with error code -30
> [ 1296.123915] UBI error: ubi_thread: ubi_bgt0d: work failed with error code -30
> [ 1296.742934] libertas_sdio mmc0:0001:1: (unregistered net_device):
> 00:19:88:11:db:67, fw 9.70.7p0, cap 0x00000303
> [ 1296.779845] libertas_sdio mmc0:0001:1: wlan0: Marvell WLAN 802.11 adapter
> [ 1296.847141] ADDRCONF(NETDEV_UP): wlan0: link is not ready
> [ 1298.041988] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> [ 1300.957951] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.157810] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.357874] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.557924] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.563064] UBIFS error (pid 1260): ubifs_read_node: bad node type
> (255 but expected 1)
> [ 1301.573526] UBIFS error (pid 1260): ubifs_read_node: bad node at
> LEB 112:18808, LEB mapping status 1
> [ 1301.583586] UBIFS error (pid 1260): do_readpage: cannot read page 3
> of inode 10295, error -22
> [ 1301.787877] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1301.987891] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1302.187878] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1302.387878] pxa3xx-nand pxa3xx-nand: Wait time out!!!
> [ 1302.393866] UBIFS error (pid 1260): ubifs_read_node: bad node type
> (255 but expected 1)
> [ 1302.403452] UBIFS error (pid 1260): ubifs_read_node: bad node at
> LEB 112:18808, LEB mapping status 1
> [ 1302.413507] UBIFS error (pid 1260): do_readpage: cannot read page 3
> of inode 10295, error -22
>
>
> The UBIFS is very likely toast after this.

Heh, so I'm still sane... ;)

> Lei, any ideas, can you reproduce this? To avoid further regressions
> of this driver, you really should have a system on which you can test
> suspend and resume after each commit.

I think the problem is that on PXA3xx resume from S2/S3 involves bootloader.
If I remember correctly, the BootROM reads the bootloader from the boot device
regardless of the reset cause (S2/S3 resume is kind a reset for PXA3xx).
Then the bootloader must decide what should be done according to the reset cause.
This means, that the BootROM already configures the NAND flash
(if it is the boot device) and pxa3xx_nand driver should just get on with it
and don't try to reconfigure?

Am I still sane? ;)

-- 
Regards,
Igor.

  reply	other threads:[~2011-07-11 18:19 UTC|newest]

Thread overview: 162+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  3:17 [PATCH] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-08 16:00 ` Lei Wen
2011-06-22 11:39 ` Daniel Mack
2011-06-22 11:39   ` Daniel Mack
2011-06-22 12:21   ` Lei Wen
2011-07-08 17:38     ` Lei Wen
2011-06-22 13:06     ` Daniel Mack
2011-06-22 13:06       ` Daniel Mack
2011-06-23  6:22       ` Lei Wen
2011-06-23  6:22         ` Lei Wen
2011-06-22 13:45 ` Igor Grinberg
2011-07-08 16:09   ` Igor Grinberg
2011-06-23  6:35   ` Lei Wen
2011-07-08 15:26     ` Lei Wen
2011-06-23 10:44     ` Igor Grinberg
2011-06-23 10:44       ` Igor Grinberg
2011-06-25 11:17       ` Lei Wen
2011-06-25 11:17         ` Lei Wen
2011-06-25 12:32         ` Daniel Mack
2011-06-25 12:32           ` Daniel Mack
2011-06-25 12:51           ` Lei Wen
2011-06-25 12:51             ` Lei Wen
2011-06-27 13:22         ` Igor Grinberg
2011-06-27 13:22           ` Igor Grinberg
2011-06-28  7:32         ` Artem Bityutskiy
2011-06-28  7:32           ` Artem Bityutskiy
2011-06-28 15:12           ` Lei Wen
2011-06-28 15:12             ` Lei Wen
2011-06-29  3:51           ` [PATCH V3 0/9] pxa3xx_nand: add two " Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  9:00             ` Igor Grinberg
2011-06-29  9:00               ` Igor Grinberg
2011-06-29 10:20               ` Artem Bityutskiy
2011-06-29 10:20                 ` Artem Bityutskiy
2011-07-04  9:27                 ` Lei Wen
2011-07-04  9:27                   ` Lei Wen
2011-07-04  9:25             ` [PATCH V4 0/4] " Lei Wen
2011-07-04  9:25               ` Lei Wen
2011-07-08  3:34               ` [PATCH V5 0/3] " Lei Wen
2011-07-08  3:34                 ` Lei Wen
2011-07-12 10:28                 ` [PATCH V6 0/4] " Lei Wen
2011-07-12 10:28                   ` Lei Wen
2011-07-12 14:35                   ` [PATCH V7 " Lei Wen
2011-07-12 14:35                     ` Lei Wen
2011-07-15  3:44                     ` [PATCH V8 " Lei Wen
2011-07-15  3:44                       ` Lei Wen
2011-07-20  4:51                       ` Artem Bityutskiy
2011-07-20  4:51                         ` Artem Bityutskiy
2011-07-15  3:44                     ` [PATCH V8 1/4] MTD: pxa3xx_nand: enhance suspend and resume routine Lei Wen
2011-07-15  3:44                       ` Lei Wen
2011-07-15  3:44                     ` [PATCH V8 2/4] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-15  3:44                       ` Lei Wen
2011-07-15  3:44                     ` [PATCH V8 3/4] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-15  3:44                       ` Lei Wen
2011-07-15  3:44                     ` [PATCH V8 4/4] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-15  3:44                       ` Lei Wen
2011-07-12 14:35                   ` [PATCH V7 1/4] MTD: pxa3xx_nand: enhance suspend and resume routine Lei Wen
2011-07-12 14:35                     ` Lei Wen
2011-07-13 10:53                     ` Sergei Shtylyov
2011-07-13 10:53                       ` Sergei Shtylyov
2011-07-12 14:35                   ` [PATCH V7 2/4] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-12 14:35                     ` Lei Wen
2011-07-13 10:57                     ` Sergei Shtylyov
2011-07-13 10:57                       ` Sergei Shtylyov
2011-07-13 12:41                       ` Lei Wen
2011-07-13 12:41                         ` Lei Wen
2011-07-13 14:35                         ` Sergei Shtylyov
2011-07-13 14:35                           ` Sergei Shtylyov
2011-07-12 14:35                   ` [PATCH V7 3/4] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-12 14:35                     ` Lei Wen
2011-07-12 14:35                   ` [PATCH V7 4/4] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-12 14:35                     ` Lei Wen
2011-07-12 10:28                 ` [PATCH V6 1/4] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-12 10:28                   ` Lei Wen
2011-07-12 10:28                 ` [PATCH V6 2/4] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-12 10:28                   ` Lei Wen
2011-07-12 10:28                 ` [PATCH V6 3/4] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-12 10:28                   ` Lei Wen
2011-07-12 10:28                 ` [PATCH V6 4/4] MTD: pxa3xx_nand: enhance suspend and resume routine Lei Wen
2011-07-12 10:28                   ` Lei Wen
2011-07-12 11:39                   ` Daniel Mack
2011-07-12 11:39                     ` Daniel Mack
2011-07-12 12:02                     ` Daniel Mack
2011-07-12 12:02                       ` Daniel Mack
2011-07-12 15:56                       ` Igor Grinberg
2011-07-12 15:56                         ` Igor Grinberg
2011-07-12 17:35                         ` Daniel Mack
2011-07-12 17:35                           ` Daniel Mack
2011-07-08  3:34               ` [PATCH 1/3] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-08  3:34                 ` Lei Wen
2011-07-08  3:34               ` [PATCH 2/3] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-08  3:34                 ` Lei Wen
2011-07-08  3:34               ` [PATCH 3/3] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-08  3:34                 ` Lei Wen
2011-07-04  9:25             ` [PATCH 1/4] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-04  9:25               ` Lei Wen
2011-07-04  9:25             ` [PATCH 2/4] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-04  9:25               ` Lei Wen
2011-07-06  7:29               ` Igor Grinberg
2011-07-06  7:29                 ` Igor Grinberg
2011-07-04  9:25             ` [PATCH 3/4] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-04  9:25               ` Lei Wen
2011-07-06  6:53               ` Artem Bityutskiy
2011-07-06  6:53                 ` Artem Bityutskiy
2011-07-06  6:54                 ` Lei Wen
2011-07-06  6:54                   ` Lei Wen
2011-07-06  7:07                   ` Artem Bityutskiy
2011-07-06  7:07                     ` Artem Bityutskiy
2011-07-06  7:41               ` Igor Grinberg
2011-07-06  7:41                 ` Igor Grinberg
2011-07-07  6:26                 ` Lei Wen
2011-07-07  6:26                   ` Lei Wen
2011-07-07  8:59                   ` Igor Grinberg
2011-07-07  8:59                     ` Igor Grinberg
2011-07-07  9:06                     ` Lei Wen
2011-07-07  9:06                       ` Lei Wen
2011-07-07 11:23                       ` Igor Grinberg
2011-07-07 11:23                         ` Igor Grinberg
2011-07-11 14:49                 ` Daniel Mack
2011-07-11 14:49                   ` Daniel Mack
2011-07-11 18:19                   ` Igor Grinberg [this message]
2011-07-11 18:19                     ` Igor Grinberg
2011-07-11 18:53                     ` Daniel Mack
2011-07-11 18:53                       ` Daniel Mack
2011-07-11 19:25                       ` Igor Grinberg
2011-07-11 19:25                         ` Igor Grinberg
2011-07-12  9:40                         ` Lei Wen
2011-07-12  9:40                           ` Lei Wen
2011-07-12  9:57                           ` Daniel Mack
2011-07-12  9:57                             ` Daniel Mack
2011-07-12 10:29                             ` Lei Wen
2011-07-12 10:29                               ` Lei Wen
2011-07-12 12:05                               ` Daniel Mack
2011-07-12 12:05                                 ` Daniel Mack
2011-07-12 12:48                         ` Daniel Mack
2011-07-12 12:48                           ` Daniel Mack
2011-07-12 15:49                           ` Igor Grinberg
2011-07-12 15:49                             ` Igor Grinberg
2011-07-04  9:25             ` [PATCH 4/4] ARM: mmp/pxa: fix nand platform data Lei Wen
2011-07-04  9:25               ` Lei Wen
2011-06-29  3:51           ` [PATCH 1/9] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  3:51           ` [PATCH 2/9] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  7:11             ` Artem Bityutskiy
2011-06-29  7:11               ` Artem Bityutskiy
2011-06-29  7:16               ` Lei Wen
2011-06-29  7:16                 ` Lei Wen
2011-06-29  3:51           ` [PATCH 3/9] ARM: aspenite: fix nand platform data Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  3:51           ` [PATCH 4/9] ARM: cm-x300: " Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  3:51           ` [PATCH 5/9] ARM: colibri-pxa3xx: " Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  3:51           ` [PATCH 6/9] ARM: littleton: " Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  3:51           ` [PATCH 7/9] ARM: mxm8x10: " Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  3:51           ` [PATCH 8/9] ARM: raumfeld: " Lei Wen
2011-06-29  3:51             ` Lei Wen
2011-06-29  3:51           ` [PATCH 9/9] ARM: zylonite: " Lei Wen
2011-06-29  3:51             ` Lei Wen

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=4E1B3ECC.5080308@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=David.Woodhouse@intel.com \
    --cc=dedekind1@gmail.com \
    --cc=eric.y.miao@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=leiwen@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=zonque@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.