Re: pxa_camera: Oops in pxa_camera_probe.

2009-07-04 Thread Antonio Ospite
On Sat, 04 Jul 2009 21:35:22 +0200
Robert Jarzmik robert.jarz...@free.fr wrote:

   The offending dev_driver_str() here is the one in the dev_warn() call in
   mclk_get_divisor().
   
   This is what is happening: in struct pxacamera_platform_data I have:
.mclk_10khz = 5000,
   
   which makes the  test in mclk_get_divisor() succeed calling dev_warn
   to report that the clock has been limited, but pcdev-soc_host.dev is
   still uninitialized at this time.

 Antonio,
 
 Would you check [1] and see if your stack does correspond to the one I 
 reported
 some time ago ? As this is fresh in your memory, you'll be far quicker that 
 me.

...
 [1] http://osdir.com/ml/linux-media/2009-04/msg00874.html

Yes, I think that is it. The offsets are different of course but the
call stack is pretty much the same.

Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


pgpl24u7bRtMt.pgp
Description: PGP signature


Re: pxa_camera: Oops in pxa_camera_probe.

2009-07-03 Thread Antonio Ospite
On Wed, 1 Jul 2009 20:43:25 +0200
Antonio Ospite osp...@studenti.unina.it wrote:

 Hi,
 
 I get this with pxa-camera in mainline linux (from today).
 I haven't touched my board code which used to work in 2.6.30


I think I've tracked down the cause. The board code is triggering a
bug in pxa_camera. The same should apply to mioa701 as well.

 Linux video capture interface: v2.00
 Unable to handle kernel NULL pointer dereference at virtual address 0060
 pgd = c0004000
 [0060] *pgd=
 Internal error: Oops: f5 [#1] PREEMPT
 Modules linked in:
 CPU: 0Tainted: GW   (2.6.31-rc1-ezxdev #1)
 PC is at dev_driver_string+0x0/0x38
 LR is at pxa_camera_probe+0x144/0x428

The offending dev_driver_str() here is the one in the dev_warn() call in
mclk_get_divisor().

This is what is happening: in struct pxacamera_platform_data I have:
.mclk_10khz = 5000,

which makes the  test in mclk_get_divisor() succeed calling dev_warn
to report that the clock has been limited, but pcdev-soc_host.dev is
still uninitialized at this time.

I could lower the value in my platform data and avoid the bug, but it
would be good to have this fixed ASAP anyway.

The attached rough patch fixes the problem, but you will surely come
out with a better one :)

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
mclk_get_divisor uses pcdev-soc_host.dev, make sure it is initialized.

Signed-off-by: Antonio Ospite osp...@studenti.unina.it

diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index 46e0d8a..e048d25 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1579,6 +1579,7 @@ static int __devinit pxa_camera_probe(struct platform_device *pdev)
 		pcdev-mclk = 2000;
 	}
 
+	pcdev-soc_host.dev = pdev-dev;
 	pcdev-mclk_divisor = mclk_get_divisor(pcdev);
 
 	INIT_LIST_HEAD(pcdev-capture);
@@ -1644,7 +1645,6 @@ static int __devinit pxa_camera_probe(struct platform_device *pdev)
 	pcdev-soc_host.drv_name	= PXA_CAM_DRV_NAME;
 	pcdev-soc_host.ops		= pxa_soc_camera_host_ops;
 	pcdev-soc_host.priv		= pcdev;
-	pcdev-soc_host.dev		= pdev-dev;
 	pcdev-soc_host.nr		= pdev-id;
 
 	err = soc_camera_host_register(pcdev-soc_host);


pgpFWUTYnD6jS.pgp
Description: PGP signature


Re: pxa_camera: Oops in pxa_camera_probe.

2009-07-03 Thread Guennadi Liakhovetski
On Fri, 3 Jul 2009, Antonio Ospite wrote:

 On Wed, 1 Jul 2009 20:43:25 +0200
 Antonio Ospite osp...@studenti.unina.it wrote:
 
  Hi,
  
  I get this with pxa-camera in mainline linux (from today).
  I haven't touched my board code which used to work in 2.6.30
 
 
 I think I've tracked down the cause. The board code is triggering a
 bug in pxa_camera. The same should apply to mioa701 as well.
 
  Linux video capture interface: v2.00
  Unable to handle kernel NULL pointer dereference at virtual address 0060
  pgd = c0004000
  [0060] *pgd=
  Internal error: Oops: f5 [#1] PREEMPT
  Modules linked in:
  CPU: 0Tainted: GW   (2.6.31-rc1-ezxdev #1)
  PC is at dev_driver_string+0x0/0x38
  LR is at pxa_camera_probe+0x144/0x428
 
 The offending dev_driver_str() here is the one in the dev_warn() call in
 mclk_get_divisor().
 
 This is what is happening: in struct pxacamera_platform_data I have:
   .mclk_10khz = 5000,
 
 which makes the  test in mclk_get_divisor() succeed calling dev_warn
 to report that the clock has been limited, but pcdev-soc_host.dev is
 still uninitialized at this time.
 
 I could lower the value in my platform data and avoid the bug, but it
 would be good to have this fixed ASAP anyway.
 
 The attached rough patch fixes the problem, but you will surely come
 out with a better one :)

Why should I? Your patch seems correct to me so far, thanks. I'll push it 
for 2.6.31. Please, next time inline your patch as described in 
Documentation/SubmittingPatches.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: pxa_camera: Oops in pxa_camera_probe.

2009-07-03 Thread Antonio Ospite
On Fri, 3 Jul 2009 22:03:27 +0200 (CEST)
Guennadi Liakhovetski g.liakhovet...@gmx.de wrote:

 On Fri, 3 Jul 2009, Antonio Ospite wrote:
 
   Linux video capture interface: v2.00
   Unable to handle kernel NULL pointer dereference at virtual address 
   0060
   pgd = c0004000
   [0060] *pgd=
   Internal error: Oops: f5 [#1] PREEMPT
   Modules linked in:
   CPU: 0Tainted: GW   (2.6.31-rc1-ezxdev #1)
   PC is at dev_driver_string+0x0/0x38
   LR is at pxa_camera_probe+0x144/0x428
  
  The offending dev_driver_str() here is the one in the dev_warn() call in
  mclk_get_divisor().
  
  This is what is happening: in struct pxacamera_platform_data I have:
  .mclk_10khz = 5000,
  
  which makes the  test in mclk_get_divisor() succeed calling dev_warn
  to report that the clock has been limited, but pcdev-soc_host.dev is
  still uninitialized at this time.
  
  I could lower the value in my platform data and avoid the bug, but it
  would be good to have this fixed ASAP anyway.
  
  The attached rough patch fixes the problem, but you will surely come
  out with a better one :)
 
 Why should I? Your patch seems correct to me so far, thanks. I'll push it 
 for 2.6.31. Please, next time inline your patch as described in 
 Documentation/SubmittingPatches.


Well, it should be correct, I just thought it could be considered
unpretty with the pcdev-soc_host initializations scattered here and
there, that's what I was referring to.
But, if this is ok to you, it's ok to me too :)

Ciao,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


pgpA5hJKv0j2w.pgp
Description: PGP signature


pxa_camera: Oops in pxa_camera_probe.

2009-07-01 Thread Antonio Ospite
Hi,

I get this with pxa-camera in linux-2.6.31-rc1.
If this could be useful, I haven't converted my board code to the new 
platform_data
style yet.

i2c /dev entries driver
Linux video capture interface: v2.00
Unable to handle kernel NULL pointer dereference at virtual address 0060
pgd = c0004000
[0060] *pgd=
Internal error: Oops: f5 [#1] PREEMPT
Modules linked in:
CPU: 0Tainted: GW   (2.6.31-rc1-ezxdev #34)
PC is at dev_driver_string+0x0/0x38
LR is at pxa_camera_probe+0x144/0x428
pc : [c0167fa8]lr : [c028d440]psr: 2013
sp : cc81feb0  ip : cc81e000  fp : c0382400
r10: c0381dc0  r9 :   r8 : c0381dc8
r7 : 0632ea00  r6 : 018cba80  r5 : 02faf080  r4 : cc878a60
r3 : 0020  r2 : 28a0  r1 : 0632ea00  r0 : 
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 397f  Table: a0004000  DAC: 0017
Process swapper (pid: 1, stack limit = 0xcc81e278)
Stack: (0xcc81feb0 to 0xcc82)
fea0: 0001 c00e5528 cc871878 0021 
fec0:  c0381dc8 c039bb08 c039bb08 c039bb08   c0398d28 
fee0:  c016c4a0 c039bb08 c016b658 c0381dc8 c039bb08 c0381dfc c016b76c 
ff00:  cc81ff10 c016b70c c016aa70 cc823eb4 cc865b8c  c039bb08 
ff20: c039bb08 cc9784c0  c016b030 c0312ba0 c012e0f8 c039bb08  
ff40:    0001 c001cb98 c016ba68  c03a4eec 
ff60:     c001cb98 c00282d4  cc81ff88 
ff80: c00de0a0 c028ec24 cc81ffc6 c03190e8 c0888f00 0140 cc81ffc6 cc847140 
ffa0: cc81ffc6 00b8 c0888f94 c00de200 c00754d0 cc8471c0 c038dff4 c00754f0 
ffc0:  38312c20 0034  c00245ac    
ffe0:    c00086fc  c0029e7c 41e5ced4 c1a4d9f9 
[c0167fa8] (dev_driver_string+0x0/0x38) from [c028d440] 
(pxa_camera_probe+0x144/0x428)
[c028d440] (pxa_camera_probe+0x144/0x428) from [c016c4a0] 
(platform_drv_probe+0x1c/0x24)
[c016c4a0] (platform_drv_probe+0x1c/0x24) from [c016b658] 
(driver_probe_device+0xc0/0x174)
[c016b658] (driver_probe_device+0xc0/0x174) from [c016b76c] 
(__driver_attach+0x60/0x84)
[c016b76c] (__driver_attach+0x60/0x84) from [c016aa70] 
(bus_for_each_dev+0x48/0x80)
[c016aa70] (bus_for_each_dev+0x48/0x80) from [c016b030] 
(bus_add_driver+0xa0/0x224)
[c016b030] (bus_add_driver+0xa0/0x224) from [c016ba68] 
(driver_register+0xac/0x138)
[c016ba68] (driver_register+0xac/0x138) from [c00282d4] 
(do_one_initcall+0x4c/0x184)
[c00282d4] (do_one_initcall+0x4c/0x184) from [c00086fc] 
(kernel_init+0x8c/0x104)
[c00086fc] (kernel_init+0x8c/0x104) from [c0029e7c] 
(kernel_thread_exit+0x0/0x8)
Code: e8bd80f0 2710 0001a36e 000f423f (e5903060) 
---[ end trace 1b75b31a2719ed1d ]---

Regards,
   Antonio

-- 
A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001


pgpmFTfyuUzir.pgp
Description: PGP signature


pxa_camera: Oops in pxa_camera_probe.

2009-07-01 Thread Antonio Ospite
Hi,

I get this with pxa-camera in mainline linux (from today).
I haven't touched my board code which used to work in 2.6.30

Linux video capture interface: v2.00
Unable to handle kernel NULL pointer dereference at virtual address 0060
pgd = c0004000
[0060] *pgd=
Internal error: Oops: f5 [#1] PREEMPT
Modules linked in:
CPU: 0Tainted: GW   (2.6.31-rc1-ezxdev #1)
PC is at dev_driver_string+0x0/0x38
LR is at pxa_camera_probe+0x144/0x428
pc : [c0168090]lr : [c028d598]psr: 2013
sp : cc81feb0  ip : cc81e000  fp : c0382360
r10: c0381d20  r9 :   r8 : c0381d28
r7 : 0632ea00  r6 : 018cba80  r5 : 02faf080  r4 : cc8dea60
r3 : 0020  r2 : 28a0  r1 : 0632ea00  r0 : 
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 397f  Table: a0004000  DAC: 0017
Process swapper (pid: 1, stack limit = 0xcc81e278)
Stack: (0xcc81feb0 to 0xcc82)
fea0: 0001 c00e55e4 cc84f878 0021 
fec0:  c0381d28 c039ba68 c039ba68 c039ba68   c0398c88 
fee0:  c016c588 c039ba68 c016b740 c0381d28 c039ba68 c0381d5c c016b854 
ff00:  cc81ff10 c016b7f4 c016ab58 cc823eb4 cc865b8c  c039ba68 
ff20: c039ba68 cc9204c0  c016b118 c0312e28 c012e1d8 c039ba68  
ff40:    0001 c001cb98 c016bb50  c03a4e4c 
ff60:     c001cb98 c00282f4  cc81ff88 
ff80: c00de15c c028ed7c cc81ffc6 c0319370 c0888e00 0140 cc81ffc6 cc847140 
ffa0: cc81ffc6 00b8 c0888ef4 c00de2bc c00754f0 cc8471c0 c038df54 c0075510 
ffc0:  38312c20 0034  c00245ac    
ffe0:    c00086fc  c0029e9c 55aa55aa 55aa55aa 
[c0168090] (dev_driver_string+0x0/0x38) from [c028d598] 
(pxa_camera_probe+0x144/0x428)
[c028d598] (pxa_camera_probe+0x144/0x428) from [c016c588] 
(platform_drv_probe+0x1c/0x24)
[c016c588] (platform_drv_probe+0x1c/0x24) from [c016b740] 
(driver_probe_device+0xc0/0x174)
[c016b740] (driver_probe_device+0xc0/0x174) from [c016b854] 
(__driver_attach+0x60/0x84)
[c016b854] (__driver_attach+0x60/0x84) from [c016ab58] 
(bus_for_each_dev+0x48/0x80)
[c016ab58] (bus_for_each_dev+0x48/0x80) from [c016b118] 
(bus_add_driver+0xa0/0x224)
[c016b118] (bus_add_driver+0xa0/0x224) from [c016bb50] 
(driver_register+0xac/0x138)
[c016bb50] (driver_register+0xac/0x138) from [c00282f4] 
(do_one_initcall+0x4c/0x184)
[c00282f4] (do_one_initcall+0x4c/0x184) from [c00086fc] 
(kernel_init+0x8c/0x104)
[c00086fc] (kernel_init+0x8c/0x104) from [c0029e9c] 
(kernel_thread_exit+0x0/0x8)
Code: e8bd80f0 2710 0001a36e 000f423f (e5903060) 
---[ end trace 1b75b31a2719ed1d ]---

Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


pgpD5x3OjLhW4.pgp
Description: PGP signature