mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* panda board crash when detecting usb devices
@ 2012-07-01 22:53 Belisko Marek
  2012-07-01 23:47 ` Belisko Marek
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Belisko Marek @ 2012-07-01 22:53 UTC (permalink / raw)
  To: barebox

In current next there is issue with usb command on panda board:

barebox@Texas Instrument's Panda:/ usb
USB: scanning bus for devices...
unable to handle NULL pointer dereference at address 0x00000004
pc : [<8f00ac10>]    lr : [<8f00a41c>]
sp : 8cfffde0  ip : 8d001ce8  fp : 00000000
r10: 00000000  r9 : 8cffff44  r8 : 8f033a34
r7 : 00100100  r6 : 00200200  r5 : 8d014160  r4 : 8d01416c
r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : 8d01416c
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
[<8f00ac10>] (ehci_init+0x1c/0x128) from [<8f00a41c>] (usb_rescan+0xa4/0xfc)
[<8f00a41c>] (usb_rescan+0xa4/0xfc) from [<8f01332c>] (do_usb+0x4c/0x64)
[<8f01332c>] (do_usb+0x4c/0x64) from [<8f0053e0>] (execute_command+0x38/0x7c)
[<8f0053e0>] (execute_command+0x38/0x7c) from [<8f001aac>]
(run_list_real+0x8b8/0x9b0)
[<8f001aac>] (run_list_real+0x8b8/0x9b0) from [<8f001cec>]
(parse_stream_outer+0x148/0x238)
[<8f001cec>] (parse_stream_outer+0x148/0x238) from [<8f002074>]
(run_shell+0x3c/0x7c)
[<8f002074>] (run_shell+0x3c/0x7c) from [<8f006a1c>] (start_barebox+0xd4/0x10c)
[<8f006a1c>] (start_barebox+0xd4/0x10c) from [<84081164>] (0x84081164)

[<8f023898>] (unwind_backtrace+0x0/0xa8) from [<8f0144bc>] (panic+0x28/0x48)
[<8f0144bc>] (panic+0x28/0x48) from [<8f023e38>] (do_exception+0x10/0x14)
[<8f023e38>] (do_exception+0x10/0x14) from [<8f023ec4>]
(do_data_abort+0x2c/0x38)
[<8f023ec4>] (do_data_abort+0x2c/0x38) from [<8f023ad0>] (data_abort+0x50/0x60)


It is crashing in ehci_halt() in first ehci_read call. IMO ehci_read
access wrong memory (that is reason do data_abort?)
I have rev. A2. Any ideas?

Thanks,

Marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: panda board crash when detecting usb devices
  2012-07-01 22:53 panda board crash when detecting usb devices Belisko Marek
@ 2012-07-01 23:47 ` Belisko Marek
  2012-07-02  8:01 ` Jan Lübbe
  2012-07-02  8:23 ` Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Belisko Marek @ 2012-07-01 23:47 UTC (permalink / raw)
  To: barebox

Similar issue when shutdown barebox (before kernel startup):

barebox@Texas Instrument's Panda:/ bootm /boot/uImage
   Image Name:   Linux-3.5.0-rc5-00035-g3a9049e-d
   OS:           Linux
   Architecture: ARM
   Type:         Kernel Image
   Compression:  uncompressed
   Data Size:    3868768 Bytes =  3.7 MB
   Load Address: 80008000
   Entry Point:  80008000
commandline: console=ttyO2,115200
arch_number: 2791
Here1.1
unable to handle NULL pointer dereference at address 0x00000004
pc : [<8f00ab84>]    lr : [<8f00ab74>]
sp : 8cfffd48  ip : 8d001ce8  fp : 8d00ffb0
r10: 00000000  r9 : 8d00e2dd  r8 : 8f03ba94
r7 : 8d00e2dd  r6 : 80000100  r5 : 00000000  r4 : 8d014160
r3 : 00000000  r2 : 00000000  r1 : 0000000a  r0 : 8f02820a
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
[<8f00ab84>] (ehci_halt+0x24/0x98) from [<8f00796c>]
(devices_shutdown+0x28/0x44)
[<8f00796c>] (devices_shutdown+0x28/0x44) from [<8f006a74>]
(shutdown_barebox+0x8/0x10)
[<8f006a74>] (shutdown_barebox+0x8/0x10) from [<8f022ef4>]
(start_linux+0x1dc/0x238)
[<8f022ef4>] (start_linux+0x1dc/0x238) from [<8f02313c>]
(__do_bootm_linux+0x198/0x1c4)
[<8f02313c>] (__do_bootm_linux+0x198/0x1c4) from [<8f00e668>]
(do_bootm+0x6dc/0x7f8)
[<8f00e668>] (do_bootm+0x6dc/0x7f8) from [<8f0053e0>]
(execute_command+0x38/0x7c)
[<8f0053e0>] (execute_command+0x38/0x7c) from [<8f001aac>]
(run_list_real+0x8b8/0x9b0)
[<8f001aac>] (run_list_real+0x8b8/0x9b0) from [<8f001cec>]
(parse_stream_outer+0x148/0x238)
[<8f001cec>] (parse_stream_outer+0x148/0x238) from [<8f002074>]
(run_shell+0x3c/0x7c)
[<8f002074>] (run_shell+0x3c/0x7c) from [<8f006a1c>] (start_barebox+0xd4/0x10c)
[<8f006a1c>] (start_barebox+0xd4/0x10c) from [<84081164>] (0x84081164)

[<8f0238f8>] (unwind_backtrace+0x0/0xa8) from [<8f014520>] (panic+0x28/0x48)
[<8f014520>] (panic+0x28/0x48) from [<8f023e98>] (do_exception+0x10/0x14)
[<8f023e98>] (do_exception+0x10/0x14) from [<8f023f24>]
(do_data_abort+0x2c/0x38)
[<8f023f24>] (do_data_abort+0x2c/0x38) from [<8f023b30>] (data_abort+0x50/0x60)


barebox 2012.06.0-00148-ga6e358b #0 Sun Jul 1 23:49:04 CEST 2012


On Mon, Jul 2, 2012 at 12:53 AM, Belisko Marek <marek.belisko@gmail.com> wrote:
> In current next there is issue with usb command on panda board:
>
> barebox@Texas Instrument's Panda:/ usb
> USB: scanning bus for devices...
> unable to handle NULL pointer dereference at address 0x00000004
> pc : [<8f00ac10>]    lr : [<8f00a41c>]
> sp : 8cfffde0  ip : 8d001ce8  fp : 00000000
> r10: 00000000  r9 : 8cffff44  r8 : 8f033a34
> r7 : 00100100  r6 : 00200200  r5 : 8d014160  r4 : 8d01416c
> r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : 8d01416c
> Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
> [<8f00ac10>] (ehci_init+0x1c/0x128) from [<8f00a41c>] (usb_rescan+0xa4/0xfc)
> [<8f00a41c>] (usb_rescan+0xa4/0xfc) from [<8f01332c>] (do_usb+0x4c/0x64)
> [<8f01332c>] (do_usb+0x4c/0x64) from [<8f0053e0>] (execute_command+0x38/0x7c)
> [<8f0053e0>] (execute_command+0x38/0x7c) from [<8f001aac>]
> (run_list_real+0x8b8/0x9b0)
> [<8f001aac>] (run_list_real+0x8b8/0x9b0) from [<8f001cec>]
> (parse_stream_outer+0x148/0x238)
> [<8f001cec>] (parse_stream_outer+0x148/0x238) from [<8f002074>]
> (run_shell+0x3c/0x7c)
> [<8f002074>] (run_shell+0x3c/0x7c) from [<8f006a1c>] (start_barebox+0xd4/0x10c)
> [<8f006a1c>] (start_barebox+0xd4/0x10c) from [<84081164>] (0x84081164)
>
> [<8f023898>] (unwind_backtrace+0x0/0xa8) from [<8f0144bc>] (panic+0x28/0x48)
> [<8f0144bc>] (panic+0x28/0x48) from [<8f023e38>] (do_exception+0x10/0x14)
> [<8f023e38>] (do_exception+0x10/0x14) from [<8f023ec4>]
> (do_data_abort+0x2c/0x38)
> [<8f023ec4>] (do_data_abort+0x2c/0x38) from [<8f023ad0>] (data_abort+0x50/0x60)
>
>
> It is crashing in ehci_halt() in first ehci_read call. IMO ehci_read
> access wrong memory (that is reason do data_abort?)
> I have rev. A2. Any ideas?
>
> Thanks,
>
> Marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com

Marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: panda board crash when detecting usb devices
  2012-07-01 22:53 panda board crash when detecting usb devices Belisko Marek
  2012-07-01 23:47 ` Belisko Marek
@ 2012-07-02  8:01 ` Jan Lübbe
  2012-07-02  8:23 ` Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Jan Lübbe @ 2012-07-02  8:01 UTC (permalink / raw)
  To: barebox

Hi,

On Mon, 2012-07-02 at 00:53 +0200, Belisko Marek wrote:
> In current next there is issue with usb command on panda board:
*snip*
> It is crashing in ehci_halt() in first ehci_read call. IMO ehci_read
> access wrong memory (that is reason do data_abort?)
> I have rev. A2. Any ideas?

I had a problem with USB on the BeagleBoard: 
Message-id: <20120623232159.GA30515@pengutronix.de>
Subject: Regression for the Beagle Board

For the BeagleBoard this change results in conflicting resource ranges.

Sascha added a check in a6e358b2f5b219fda18a7bc9348cb969043c19d5, maybe
a NULL return value from dev_request_mem_region is not handled correctly
in the driver?

Regards,
Jan

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: panda board crash when detecting usb devices
  2012-07-01 22:53 panda board crash when detecting usb devices Belisko Marek
  2012-07-01 23:47 ` Belisko Marek
  2012-07-02  8:01 ` Jan Lübbe
@ 2012-07-02  8:23 ` Sascha Hauer
  2012-07-02 16:52   ` Belisko Marek
  2 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2012-07-02  8:23 UTC (permalink / raw)
  To: Belisko Marek; +Cc: barebox

On Mon, Jul 02, 2012 at 12:53:06AM +0200, Belisko Marek wrote:
> In current next there is issue with usb command on panda board:
> 
> barebox@Texas Instrument's Panda:/ usb
> USB: scanning bus for devices...
> unable to handle NULL pointer dereference at address 0x00000004
> pc : [<8f00ac10>]    lr : [<8f00a41c>]
> sp : 8cfffde0  ip : 8d001ce8  fp : 00000000
> r10: 00000000  r9 : 8cffff44  r8 : 8f033a34
> r7 : 00100100  r6 : 00200200  r5 : 8d014160  r4 : 8d01416c
> r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : 8d01416c
> Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
> [<8f00ac10>] (ehci_init+0x1c/0x128) from [<8f00a41c>] (usb_rescan+0xa4/0xfc)
> [<8f00a41c>] (usb_rescan+0xa4/0xfc) from [<8f01332c>] (do_usb+0x4c/0x64)
> [<8f01332c>] (do_usb+0x4c/0x64) from [<8f0053e0>] (execute_command+0x38/0x7c)
> [<8f0053e0>] (execute_command+0x38/0x7c) from [<8f001aac>]
> (run_list_real+0x8b8/0x9b0)
> [<8f001aac>] (run_list_real+0x8b8/0x9b0) from [<8f001cec>]
> (parse_stream_outer+0x148/0x238)
> [<8f001cec>] (parse_stream_outer+0x148/0x238) from [<8f002074>]
> (run_shell+0x3c/0x7c)
> [<8f002074>] (run_shell+0x3c/0x7c) from [<8f006a1c>] (start_barebox+0xd4/0x10c)
> [<8f006a1c>] (start_barebox+0xd4/0x10c) from [<84081164>] (0x84081164)
> 
> [<8f023898>] (unwind_backtrace+0x0/0xa8) from [<8f0144bc>] (panic+0x28/0x48)
> [<8f0144bc>] (panic+0x28/0x48) from [<8f023e38>] (do_exception+0x10/0x14)
> [<8f023e38>] (do_exception+0x10/0x14) from [<8f023ec4>]
> (do_data_abort+0x2c/0x38)
> [<8f023ec4>] (do_data_abort+0x2c/0x38) from [<8f023ad0>] (data_abort+0x50/0x60)
> 
> 
> It is crashing in ehci_halt() in first ehci_read call. IMO ehci_read
> access wrong memory (that is reason do data_abort?)
> I have rev. A2. Any ideas?

My bad, sorry. Try the following patch.

Sascha

8<---------------------------------------------------------

ehci: Fix resource size

We now have a resource size for the ehci hccr register space. This
was assumed to be 0x40 in size. On OMAP though it is only 0x10 and
then the hccr resource conflicts with the hcor resource which results
in a non working ehci port on beagle and panda boards. This patch
adds a nonintrusive workaround, it limits the hccr resource to 0x10,
which then also works on OMAP.

Later we should drop the multiple resources for the ehci port and
make the resource as specified in the datasheets.

This is broken since:

commit 08845e41fba2b16dd3050b6b910c615e1bb8e57c
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Wed May 23 12:54:24 2012 +0200

    usb ehci: Add resource sizes

    add_usb_ehci_device registers resources with size 0. Fix this.

    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/base/resource.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/resource.c b/drivers/base/resource.c
index 347b2f0..9844d1a 100644
--- a/drivers/base/resource.c
+++ b/drivers/base/resource.c
@@ -113,7 +113,7 @@ struct device_d *add_usb_ehci_device(int id, resource_size_t hccr,
 
 	res = xzalloc(sizeof(struct resource) * 2);
 	res[0].start = hccr;
-	res[0].size = 0x40;
+	res[0].size = 0x10;
 	res[0].flags = IORESOURCE_MEM;
 	res[1].start = hcor;
 	res[1].size = 0xc0;
-- 
1.7.10

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: panda board crash when detecting usb devices
  2012-07-02  8:23 ` Sascha Hauer
@ 2012-07-02 16:52   ` Belisko Marek
  0 siblings, 0 replies; 5+ messages in thread
From: Belisko Marek @ 2012-07-02 16:52 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Mon, Jul 2, 2012 at 10:23 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, Jul 02, 2012 at 12:53:06AM +0200, Belisko Marek wrote:
>> In current next there is issue with usb command on panda board:
>>
>> barebox@Texas Instrument's Panda:/ usb
>> USB: scanning bus for devices...
>> unable to handle NULL pointer dereference at address 0x00000004
>> pc : [<8f00ac10>]    lr : [<8f00a41c>]
>> sp : 8cfffde0  ip : 8d001ce8  fp : 00000000
>> r10: 00000000  r9 : 8cffff44  r8 : 8f033a34
>> r7 : 00100100  r6 : 00200200  r5 : 8d014160  r4 : 8d01416c
>> r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : 8d01416c
>> Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
>> [<8f00ac10>] (ehci_init+0x1c/0x128) from [<8f00a41c>] (usb_rescan+0xa4/0xfc)
>> [<8f00a41c>] (usb_rescan+0xa4/0xfc) from [<8f01332c>] (do_usb+0x4c/0x64)
>> [<8f01332c>] (do_usb+0x4c/0x64) from [<8f0053e0>] (execute_command+0x38/0x7c)
>> [<8f0053e0>] (execute_command+0x38/0x7c) from [<8f001aac>]
>> (run_list_real+0x8b8/0x9b0)
>> [<8f001aac>] (run_list_real+0x8b8/0x9b0) from [<8f001cec>]
>> (parse_stream_outer+0x148/0x238)
>> [<8f001cec>] (parse_stream_outer+0x148/0x238) from [<8f002074>]
>> (run_shell+0x3c/0x7c)
>> [<8f002074>] (run_shell+0x3c/0x7c) from [<8f006a1c>] (start_barebox+0xd4/0x10c)
>> [<8f006a1c>] (start_barebox+0xd4/0x10c) from [<84081164>] (0x84081164)
>>
>> [<8f023898>] (unwind_backtrace+0x0/0xa8) from [<8f0144bc>] (panic+0x28/0x48)
>> [<8f0144bc>] (panic+0x28/0x48) from [<8f023e38>] (do_exception+0x10/0x14)
>> [<8f023e38>] (do_exception+0x10/0x14) from [<8f023ec4>]
>> (do_data_abort+0x2c/0x38)
>> [<8f023ec4>] (do_data_abort+0x2c/0x38) from [<8f023ad0>] (data_abort+0x50/0x60)
>>
>>
>> It is crashing in ehci_halt() in first ehci_read call. IMO ehci_read
>> access wrong memory (that is reason do data_abort?)
>> I have rev. A2. Any ideas?
>
> My bad, sorry. Try the following patch.
It's OK now. Seems it also in 2012.07. Thanks.
>
> Sascha
>
> 8<---------------------------------------------------------
>
> ehci: Fix resource size
>
> We now have a resource size for the ehci hccr register space. This
> was assumed to be 0x40 in size. On OMAP though it is only 0x10 and
> then the hccr resource conflicts with the hcor resource which results
> in a non working ehci port on beagle and panda boards. This patch
> adds a nonintrusive workaround, it limits the hccr resource to 0x10,
> which then also works on OMAP.
>
> Later we should drop the multiple resources for the ehci port and
> make the resource as specified in the datasheets.
>
> This is broken since:
>
> commit 08845e41fba2b16dd3050b6b910c615e1bb8e57c
> Author: Sascha Hauer <s.hauer@pengutronix.de>
> Date:   Wed May 23 12:54:24 2012 +0200
>
>     usb ehci: Add resource sizes
>
>     add_usb_ehci_device registers resources with size 0. Fix this.
>
>     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  drivers/base/resource.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/resource.c b/drivers/base/resource.c
> index 347b2f0..9844d1a 100644
> --- a/drivers/base/resource.c
> +++ b/drivers/base/resource.c
> @@ -113,7 +113,7 @@ struct device_d *add_usb_ehci_device(int id, resource_size_t hccr,
>
>         res = xzalloc(sizeof(struct resource) * 2);
>         res[0].start = hccr;
> -       res[0].size = 0x40;
> +       res[0].size = 0x10;
>         res[0].flags = IORESOURCE_MEM;
>         res[1].start = hcor;
>         res[1].size = 0xc0;
> --
> 1.7.10
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2012-07-02 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-01 22:53 panda board crash when detecting usb devices Belisko Marek
2012-07-01 23:47 ` Belisko Marek
2012-07-02  8:01 ` Jan Lübbe
2012-07-02  8:23 ` Sascha Hauer
2012-07-02 16:52   ` Belisko Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox