Flexcan error on suspend

Started by Mirza Krak on May 15, 2015 · 5 messages from 3 authors · Last reply May 19, 2015

open the first message on its own page

Message details and related content
Hi.

I am running a 4.0.2 kernel on a Colibri VF61 SOM.

I wanted to test the "suspend to RAM" functionality when I got
following error during suspend:

root@mx4-v61-1000000:~# echo standby > /sys/power/state
[   40.390281] PM: Syncing filesystems ... done.
[   40.407716] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   40.416040] Freezing remaining freezable tasks ... (elapsed 0.001
seconds) done.
[   40.429099] mx4_io_spi spi1.0: Entering suspend state.
[   40.434692] mx4_io_spi spi1.0: Suspend succeeded after 0 retries
[   40.441408] Unhandled fault: external abort on non-linefetch
(0x1008) at 0x909a0000
[   40.449100] pgd = 8e200000
[   40.451825] [909a0000] *pgd=8e805811, *pte=400d4653, *ppte=400d4453
[   40.458173] Internal error: : 1008 [#1] ARM
[   40.462373] Modules linked in: mx4_pic(O)
[   40.466445] CPU: 0 PID: 278 Comm: sh Tainted: G           O
4.0.2-01554-g73efc16 #30
[   40.474473] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
[   40.480945] task: 8d832640 ti: 8e076000 task.ti: 8e076000
[   40.486383] PC is at flexcan_chip_disable+0x10/0xa8
[   40.491288] LR is at flexcan_suspend+0x18/0x88
[   40.495757] pc : [<802f4648>]    lr : [<802f4750>]    psr: a00f0013
[   40.495757] sp : 8e077d60  ip : 8e077d80  fp : 8e077d7c
[   40.507279] r10: 8061d86c  r9 : 00000000  r8 : 8e8b6a44
[   40.512530] r7 : 00000002  r6 : 8065dfe4  r5 : 8029c0dc  r4 : 909a0000
[   40.519086] r3 : 802f4738  r2 : 80498c04  r1 : 8e8b6a10  r0 : 8e943ca0
[   40.525641] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   40.532800] Control: 10c5387d  Table: 8e200059  DAC: 00000015
[   40.538567] Process sh (pid: 278, stack limit = 0x8e076208)
[   40.544164] Stack: (0x8e077d60 to 0x8e078000)
[   40.548556] 7d60: 802f4738 8e943800 8029c0dc 8065dfe4 8e077d94
8e077d80 802f4750 802f4644
[   40.556774] 7d80: 8e8b6a10 8029c0dc 8e077da4 8e077d98 8029c110
802f4744 8e077dc4 8e077da8
[   40.565025] 7da0: 802a3ae0 8029c0e8 8046c3b0 8046af84 8e8b6a10

113 more lines

Message details and related content
On 05/15/2015 02:15 PM, Mirza Krak wrote:
Hi.

I am running a 4.0.2 kernel on a Colibri VF61 SOM.

I wanted to test the "suspend to RAM" functionality when I got
following error during suspend:

root@mx4-v61-1000000:~# echo standby > /sys/power/state
[   40.390281] PM: Syncing filesystems ... done.
[   40.407716] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   40.416040] Freezing remaining freezable tasks ... (elapsed 0.001
seconds) done.
[   40.429099] mx4_io_spi spi1.0: Entering suspend state.
[   40.434692] mx4_io_spi spi1.0: Suspend succeeded after 0 retries
[   40.441408] Unhandled fault: external abort on non-linefetch
(0x1008) at 0x909a0000
[   40.449100] pgd = 8e200000
[   40.451825] [909a0000] *pgd=8e805811, *pte=400d4653, *ppte=400d4453
[   40.458173] Internal error: : 1008 [#1] ARM
[   40.462373] Modules linked in: mx4_pic(O)
[   40.466445] CPU: 0 PID: 278 Comm: sh Tainted: G           O
4.0.2-01554-g73efc16 #30
[   40.474473] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
[   40.480945] task: 8d832640 ti: 8e076000 task.ti: 8e076000
[   40.486383] PC is at flexcan_chip_disable+0x10/0xa8
[   40.491288] LR is at flexcan_suspend+0x18/0x88
[   40.495757] pc : [<802f4648>]    lr : [<802f4750>]    psr: a00f0013
[   40.495757] sp : 8e077d60  ip : 8e077d80  fp : 8e077d7c
[   40.507279] r10: 8061d86c  r9 : 00000000  r8 : 8e8b6a44
[   40.512530] r7 : 00000002  r6 : 8065dfe4  r5 : 8029c0dc  r4 : 909a0000
[   40.519086] r3 : 802f4738  r2 : 80498c04  r1 : 8e8b6a10  r0 : 8e943ca0
[   40.525641] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   40.532800] Control: 10c5387d  Table: 8e200059  DAC: 00000015
[   40.538567] Process sh (pid: 278, stack limit = 0x8e076208)
[   40.544164] Stack: (0x8e077d60 to 0x8e078000)
[   40.548556] 7d60: 802f4738 8e943800 8029c0dc 8065dfe4 8e077d94
8e077d80 802f4750 802f4644
[   40.556774] 7d80: 8e8b6a10 8029c0dc 8e077da4 8e077d98 8029c110
802f4744 8e077dc4 8e077da8
[   40.565025] 7da0: 802a3ae0 8029c0e8 8046c3b0 8046af84 8e8b6a10

98 more quoted lines

Sounds reasonable. I think we have to convert the flexcan driver to
proper runtime_pm.

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
Message details and related content
On 2015-05-15 14:31, Marc Kleine-Budde wrote:
On 05/15/2015 02:15 PM, Mirza Krak wrote:
quoted
Hi.

I am running a 4.0.2 kernel on a Colibri VF61 SOM.

I wanted to test the "suspend to RAM" functionality when I got
following error during suspend:

root@mx4-v61-1000000:~# echo standby > /sys/power/state
[   40.390281] PM: Syncing filesystems ... done.
[   40.407716] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   40.416040] Freezing remaining freezable tasks ... (elapsed 0.001
seconds) done.
[   40.429099] mx4_io_spi spi1.0: Entering suspend state.
[   40.434692] mx4_io_spi spi1.0: Suspend succeeded after 0 retries
[   40.441408] Unhandled fault: external abort on non-linefetch
(0x1008) at 0x909a0000
[   40.449100] pgd = 8e200000
[   40.451825] [909a0000] *pgd=8e805811, *pte=400d4653, *ppte=400d4453
[   40.458173] Internal error: : 1008 [#1] ARM
[   40.462373] Modules linked in: mx4_pic(O)
[   40.466445] CPU: 0 PID: 278 Comm: sh Tainted: G           O
4.0.2-01554-g73efc16 #30
[   40.474473] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
[   40.480945] task: 8d832640 ti: 8e076000 task.ti: 8e076000
[   40.486383] PC is at flexcan_chip_disable+0x10/0xa8
[   40.491288] LR is at flexcan_suspend+0x18/0x88
[   40.495757] pc : [<802f4648>]    lr : [<802f4750>]    psr: a00f0013
[   40.495757] sp : 8e077d60  ip : 8e077d80  fp : 8e077d7c
[   40.507279] r10: 8061d86c  r9 : 00000000  r8 : 8e8b6a44
[   40.512530] r7 : 00000002  r6 : 8065dfe4  r5 : 8029c0dc  r4 : 909a0000
[   40.519086] r3 : 802f4738  r2 : 80498c04  r1 : 8e8b6a10  r0 : 8e943ca0
[   40.525641] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   40.532800] Control: 10c5387d  Table: 8e200059  DAC: 00000015
[   40.538567] Process sh (pid: 278, stack limit = 0x8e076208)
[   40.544164] Stack: (0x8e077d60 to 0x8e078000)
[   40.548556] 7d60: 802f4738 8e943800 8029c0dc 8065dfe4 8e077d94
8e077d80 802f4750 802f4644
[   40.556774] 7d80: 8e8b6a10 8029c0dc 8e077da4 8e077d98 8029c110
802f4744 8e077dc4 8e077da8

102 more quoted lines

Hm, but we don't have runtime PM, so the question is why are they
actually disabled at that time? I guess its because the device has not
been opened or has already been closed at that point, in any case,
afaik, flexcan_chip_disable should not be required. Not sure how to
detect whether the chip is opened or not, but maybe just move the
flexcan_chip_disable within the netif_running if block?

--
Stefan
Message details and related content
On 05/15/2015 03:00 PM, Stefan Agner wrote:
On 2015-05-15 14:31, Marc Kleine-Budde wrote:
quoted
On 05/15/2015 02:15 PM, Mirza Krak wrote:
quoted
Hi.

I am running a 4.0.2 kernel on a Colibri VF61 SOM.

I wanted to test the "suspend to RAM" functionality when I got
following error during suspend:

root@mx4-v61-1000000:~# echo standby > /sys/power/state
[   40.390281] PM: Syncing filesystems ... done.
[   40.407716] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   40.416040] Freezing remaining freezable tasks ... (elapsed 0.001
seconds) done.
[   40.429099] mx4_io_spi spi1.0: Entering suspend state.
[   40.434692] mx4_io_spi spi1.0: Suspend succeeded after 0 retries
[   40.441408] Unhandled fault: external abort on non-linefetch
(0x1008) at 0x909a0000
[   40.449100] pgd = 8e200000
[   40.451825] [909a0000] *pgd=8e805811, *pte=400d4653, *ppte=400d4453
[   40.458173] Internal error: : 1008 [#1] ARM
[   40.462373] Modules linked in: mx4_pic(O)
[   40.466445] CPU: 0 PID: 278 Comm: sh Tainted: G           O
4.0.2-01554-g73efc16 #30
[   40.474473] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
[   40.480945] task: 8d832640 ti: 8e076000 task.ti: 8e076000
[   40.486383] PC is at flexcan_chip_disable+0x10/0xa8
[   40.491288] LR is at flexcan_suspend+0x18/0x88
[   40.495757] pc : [<802f4648>]    lr : [<802f4750>]    psr: a00f0013
[   40.495757] sp : 8e077d60  ip : 8e077d80  fp : 8e077d7c
[   40.507279] r10: 8061d86c  r9 : 00000000  r8 : 8e8b6a44
[   40.512530] r7 : 00000002  r6 : 8065dfe4  r5 : 8029c0dc  r4 : 909a0000
[   40.519086] r3 : 802f4738  r2 : 80498c04  r1 : 8e8b6a10  r0 : 8e943ca0
[   40.525641] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   40.532800] Control: 10c5387d  Table: 8e200059  DAC: 00000015
[   40.538567] Process sh (pid: 278, stack limit = 0x8e076208)
[   40.544164] Stack: (0x8e077d60 to 0x8e078000)
[   40.548556] 7d60: 802f4738 8e943800 8029c0dc 8065dfe4 8e077d94
8e077d80 802f4750 802f4644
[   40.556774] 7d80: 8e8b6a10 8029c0dc 8e077da4 8e077d98 8029c110

105 more quoted lines

This is why I asked to convert the driver to runtime_pm. There is the
same problem for the xilinx driver, see discussion on this list some
month ago.....the final xilinx patch was not sent, though.
actually disabled at that time? I guess its because the device has not
been opened or has already been closed at that point, in any case,
afaik, flexcan_chip_disable should not be required. Not sure how to
detect whether the chip is opened or not, but maybe just move the
flexcan_chip_disable within the netif_running if block?
Make use of runtime_pm, then you don't have to worry about
netif_runningm etc....

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
Message details and related content
2015-05-15 15:15 GMT+02:00 Marc Kleine-Budde [off-list ref]:
On 05/15/2015 03:00 PM, Stefan Agner wrote:
quoted
On 2015-05-15 14:31, Marc Kleine-Budde wrote:
quoted
On 05/15/2015 02:15 PM, Mirza Krak wrote:
quoted
Hi.

I am running a 4.0.2 kernel on a Colibri VF61 SOM.

I wanted to test the "suspend to RAM" functionality when I got
following error during suspend:

root@mx4-v61-1000000:~# echo standby > /sys/power/state
[   40.390281] PM: Syncing filesystems ... done.
[   40.407716] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   40.416040] Freezing remaining freezable tasks ... (elapsed 0.001
seconds) done.
[   40.429099] mx4_io_spi spi1.0: Entering suspend state.
[   40.434692] mx4_io_spi spi1.0: Suspend succeeded after 0 retries
[   40.441408] Unhandled fault: external abort on non-linefetch
(0x1008) at 0x909a0000
[   40.449100] pgd = 8e200000
[   40.451825] [909a0000] *pgd=8e805811, *pte=400d4653, *ppte=400d4453
[   40.458173] Internal error: : 1008 [#1] ARM
[   40.462373] Modules linked in: mx4_pic(O)
[   40.466445] CPU: 0 PID: 278 Comm: sh Tainted: G           O
4.0.2-01554-g73efc16 #30
[   40.474473] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
[   40.480945] task: 8d832640 ti: 8e076000 task.ti: 8e076000
[   40.486383] PC is at flexcan_chip_disable+0x10/0xa8
[   40.491288] LR is at flexcan_suspend+0x18/0x88
[   40.495757] pc : [<802f4648>]    lr : [<802f4750>]    psr: a00f0013
[   40.495757] sp : 8e077d60  ip : 8e077d80  fp : 8e077d7c
[   40.507279] r10: 8061d86c  r9 : 00000000  r8 : 8e8b6a44
[   40.512530] r7 : 00000002  r6 : 8065dfe4  r5 : 8029c0dc  r4 : 909a0000
[   40.519086] r3 : 802f4738  r2 : 80498c04  r1 : 8e8b6a10  r0 : 8e943ca0
[   40.525641] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   40.532800] Control: 10c5387d  Table: 8e200059  DAC: 00000015
[   40.538567] Process sh (pid: 278, stack limit = 0x8e076208)
[   40.544164] Stack: (0x8e077d60 to 0x8e078000)
[   40.548556] 7d60: 802f4738 8e943800 8029c0dc 8065dfe4 8e077d94
8e077d80 802f4750 802f4644

119 more quoted lines

While it would probably be great fun to convert flexcan driver to use
runtime_pm, but since my knowledge is limited when it comes to
runtime_pm this would be time consuming for me, time which I do not
have at the moment.

So will probably use Stefans suggestion, to move forward in current
project and maybe do the conversion to runtime_pm later (when everyone
else is on vacation :))
Marc

--
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


-- 
Med Vänliga Hälsningar / Best Regards

*******************************************************************
Mirza Krak
Host Mobility AB
mirza.krak@hostmobility.com
Anders Personsgatan 12, 416 64 Göteborg
Sweden
http://www.hostmobility.com
Direct: +46 31 31 32 704
Phone: +46 31 31 32 700
Fax: +46 31 80 67 51
Mobile: +46 730 28 06 22
*******************************************************************
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help