All of lore.kernel.org
 help / color / mirror / Atom feed
* cx231xx: DMA problem on ARM
@ 2011-09-21 11:56 Thomas Petazzoni
  2011-09-21 12:04 ` Devin Heitmueller
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2011-09-21 11:56 UTC (permalink / raw)
  To: linux-media, srinivasa.deevi; +Cc: Maxime Ripard

Hello,

On an x86 platform, we have managed to use a Hauppauge USB Live 2
capture device with the cx231xx on a 3.0 kernel with the patch at [1].
Things work nicely.

However, using a similar 3.0 kernel with the exact same device on an
ARM platform (BeagleBoard-XM), starting a V4L application to capture
the video immediately triggers the following BUG_ON in
arch/arm/mm/dma-mapping.c:

429 void ___dma_single_cpu_to_dev(const void *kaddr, size_t size,
430         enum dma_data_direction dir)
431 {
432         unsigned long paddr;
433 
434         BUG_ON(!virt_addr_valid(kaddr) || !virt_addr_valid(kaddr + size - 1));

This problem looks similar to the problem fixed on the gspca driver by:

commit 882787ff8fdeb0be790547ee9b22b281095e95da
Author: Jason Wang <jason77.wang@gmail.com>
Date:   Fri Sep 3 06:57:19 2010 -0300

    V4L/DVB: gspca - main: Fix a crash of some webcams on ARM arch
    
    When plugging some webcams on ARM, the system crashes.
    This is because we alloc buffer for an urb through usb_buffer_alloc,
    the alloced buffer is already in DMA coherent region, so we should
    set the flag of this urb to URB_NO_TRANSFER_DMA_MAP, otherwise when
    we submit this urb, the hcd core will handle this address as an
    non-DMA address and call dma_map_single/sg to map it. On arm
    architecture, dma_map_single a DMA coherent address will be catched
    by a BUG_ON().
    
    Signed-off-by: Jason Wang <jason77.wang@gmail.com>
    Signed-off-by: Jean-François Moine <moinejf@free.fr>
    Cc: stable@kernel.org
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

I guess the cx231xx driver is trying to DMA-map buffers whose location
is not appropriate for DMA-mapping, because they are already in an DMA
coherent region. Is the fix just to add the same
URB_NO_TRANSFER_DMA_MAP to the urb->transfer_flags ? Or is it something
completely different ?

Thanks!

Thomas

[1]
https://github.com/torvalds/linux/commit/992299e84a4891275ea5924e30b66ce39a701e5e#drivers/media/video/cx231xx
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-21 11:56 cx231xx: DMA problem on ARM Thomas Petazzoni
@ 2011-09-21 12:04 ` Devin Heitmueller
  2011-09-21 19:17   ` Thomas Petazzoni
  2011-09-22 14:45   ` Thomas Petazzoni
  0 siblings, 2 replies; 15+ messages in thread
From: Devin Heitmueller @ 2011-09-21 12:04 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: linux-media, srinivasa.deevi, Maxime Ripard

On Wed, Sep 21, 2011 at 7:56 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On an x86 platform, we have managed to use a Hauppauge USB Live 2
> capture device with the cx231xx on a 3.0 kernel with the patch at [1].
> Things work nicely.
>
> However, using a similar 3.0 kernel with the exact same device on an
> ARM platform (BeagleBoard-XM), starting a V4L application to capture
> the video immediately triggers the following BUG_ON in
> arch/arm/mm/dma-mapping.c:
>
> 429 void ___dma_single_cpu_to_dev(const void *kaddr, size_t size,
> 430         enum dma_data_direction dir)
> 431 {
> 432         unsigned long paddr;
> 433
> 434         BUG_ON(!virt_addr_valid(kaddr) || !virt_addr_valid(kaddr + size - 1));
>
> This problem looks similar to the problem fixed on the gspca driver by:
>
> commit 882787ff8fdeb0be790547ee9b22b281095e95da
> Author: Jason Wang <jason77.wang@gmail.com>
> Date:   Fri Sep 3 06:57:19 2010 -0300
>
>    V4L/DVB: gspca - main: Fix a crash of some webcams on ARM arch
>
>    When plugging some webcams on ARM, the system crashes.
>    This is because we alloc buffer for an urb through usb_buffer_alloc,
>    the alloced buffer is already in DMA coherent region, so we should
>    set the flag of this urb to URB_NO_TRANSFER_DMA_MAP, otherwise when
>    we submit this urb, the hcd core will handle this address as an
>    non-DMA address and call dma_map_single/sg to map it. On arm
>    architecture, dma_map_single a DMA coherent address will be catched
>    by a BUG_ON().
>
>    Signed-off-by: Jason Wang <jason77.wang@gmail.com>
>    Signed-off-by: Jean-François Moine <moinejf@free.fr>
>    Cc: stable@kernel.org
>    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> I guess the cx231xx driver is trying to DMA-map buffers whose location
> is not appropriate for DMA-mapping, because they are already in an DMA
> coherent region. Is the fix just to add the same
> URB_NO_TRANSFER_DMA_MAP to the urb->transfer_flags ? Or is it something
> completely different ?

Hi Thomas,

I ran into the same issue on em28xx in the past (which is what those
parts of cx231xx are based on).  Yes, just adding
URB_NO_TRANSFER_DMA_MAP should result in it starting to work.  Please
try that out, and assuming it works feel free to submit a patch which
can be included upstream.

Regards,

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-21 12:04 ` Devin Heitmueller
@ 2011-09-21 19:17   ` Thomas Petazzoni
  2011-09-22 14:45   ` Thomas Petazzoni
  1 sibling, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2011-09-21 19:17 UTC (permalink / raw)
  To: Devin Heitmueller; +Cc: linux-media, srinivasa.deevi, Maxime Ripard

Hello Devin,

Thanks for your quick reply.

Le Wed, 21 Sep 2011 08:04:52 -0400,
Devin Heitmueller <dheitmueller@kernellabs.com> a écrit :

> I ran into the same issue on em28xx in the past (which is what those
> parts of cx231xx are based on).  Yes, just adding
> URB_NO_TRANSFER_DMA_MAP should result in it starting to work.  Please
> try that out, and assuming it works feel free to submit a patch which
> can be included upstream.

Ok, we'll try this out and report the results, and if those are
positive, the corresponding patch.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-21 12:04 ` Devin Heitmueller
  2011-09-21 19:17   ` Thomas Petazzoni
@ 2011-09-22 14:45   ` Thomas Petazzoni
  2011-09-22 15:09     ` Devin Heitmueller
  1 sibling, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2011-09-22 14:45 UTC (permalink / raw)
  To: Devin Heitmueller; +Cc: linux-media, srinivasa.deevi, Maxime Ripard

Hello,

Le Wed, 21 Sep 2011 08:04:52 -0400,
Devin Heitmueller <dheitmueller@kernellabs.com> a écrit :

> I ran into the same issue on em28xx in the past (which is what those
> parts of cx231xx are based on).  Yes, just adding
> URB_NO_TRANSFER_DMA_MAP should result in it starting to work.  Please
> try that out, and assuming it works feel free to submit a patch which
> can be included upstream.

So, we did try with URB_NO_TRANSFER_DMA_MAP, and now, we don't have the
BUG_ON() assertion anymore, but instead a large set of error messages:

[  325.856231] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  325.858398] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  325.860656] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  326.144073] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  326.151245] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
[  326.151763] cx231xx #0: cx231xx_start_stream():: ep_mask = 8
[  396.907318] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  396.912048] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  396.977355] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  396.987091] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
[  456.665252] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  456.675292] cx231xx #0: cannot change alt number to 3 (error=-71)
[  456.714508] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.718811] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.719635] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  456.729522] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
[  456.750427] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  456.756317] cx231xx #0: cannot change alt number to 3 (error=-71)
[  456.778625] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.782745] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.786987] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.791381] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.795501] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.795532] cx231xx #0: cx231xx_set_decoder_video_input: adjust_ref_count :Failed to setAFE input mux - errCode [-71]!
[  456.841491] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.845642] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.849792] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.854003] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.858123] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.862274] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.866394] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.870513] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.875030] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.879150] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.883239] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.887390] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.891632] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.895751] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.899993] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.904174] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.914825] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.919036] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.924499] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.936920] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.941131] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.946655] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.960144] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.968658] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.984344] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.999572] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.004577] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.015014] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.019561] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.029083] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.033264] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.039031] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.043121] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.047332] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.051513] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.059631] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.066467] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.071624] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.084686] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.088897] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.093658] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.097747] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.102050] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.106109] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.110229] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.114318] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.118469] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.122589] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.126708] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.130828] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.134979] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.139068] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.139099] cx231xx #0: video_mux : 0
[  457.139099] cx231xx #0: do_mode_ctrl_overrides : 0xb000
[  457.143218] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.143249] cx231xx #0: do_mode_ctrl_overrides NTSC
[  457.147308] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.151519] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.156250] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.163269] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.169647] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.175415] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.179779] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.183898] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.183929] cx25840 4-0044: 720x480 is not a valid size!
[  457.228576] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  457.238769] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
[  457.251892] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.256011] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  519.125091] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  519.137359] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)

The exact same device, connected to a x86 machine running the 3.0
kernel works just fine. We have diff'ed the cx231xx driver of both
kernels, and they are exactly the same, except for the
URB_NO_TRANSFER_DMA_MAP, which isn't strictly needed on x86.

Here is the patch that we apply on the cx231xx driver of the 3.0
kernel. The dont_use_port_3 part is a backport of a later kernel
version (commit 992299e84a4891275ea5924e30b66ce39a701e5e).

diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 2270381..7c7354d 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -387,6 +387,7 @@ struct cx231xx_board cx231xx_boards[] = {
 		.norm = V4L2_STD_NTSC,
 		.no_alt_vanc = 1,
 		.external_av = 1,
+		.dont_use_port_3 = 1,
 		.input = {{
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers/media/video/cx231xx/cx231xx-core.c
index abe500f..11761dd 100644
--- a/drivers/media/video/cx231xx/cx231xx-core.c
+++ b/drivers/media/video/cx231xx/cx231xx-core.c
@@ -1069,7 +1069,7 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets,
 				 sb_size, cx231xx_isoc_irq_callback, dma_q, 1);
 
 		urb->number_of_packets = max_packets;
-		urb->transfer_flags = URB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
 
 		k = 0;
 		for (j = 0; j < max_packets; j++) {
@@ -1180,7 +1180,7 @@ int cx231xx_init_bulk(struct cx231xx *dev, int max_packets,
 			return -ENOMEM;
 		}
 		dev->video_mode.bulk_ctl.urb[i] = urb;
-		urb->transfer_flags = 0;
+		urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
 
 		dev->video_mode.bulk_ctl.transfer_buffer[i] =
 		    usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL,

Do you have any idea of where to look at for the above problems?

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-22 14:45   ` Thomas Petazzoni
@ 2011-09-22 15:09     ` Devin Heitmueller
  2011-09-22 15:29       ` Thomas Petazzoni
  0 siblings, 1 reply; 15+ messages in thread
From: Devin Heitmueller @ 2011-09-22 15:09 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: linux-media, srinivasa.deevi, Maxime Ripard

On Thu, Sep 22, 2011 at 10:45 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> Le Wed, 21 Sep 2011 08:04:52 -0400,
> Devin Heitmueller <dheitmueller@kernellabs.com> a écrit :
>
>> I ran into the same issue on em28xx in the past (which is what those
>> parts of cx231xx are based on).  Yes, just adding
>> URB_NO_TRANSFER_DMA_MAP should result in it starting to work.  Please
>> try that out, and assuming it works feel free to submit a patch which
>> can be included upstream.
>
> So, we did try with URB_NO_TRANSFER_DMA_MAP, and now, we don't have the
> BUG_ON() assertion anymore, but instead a large set of error messages:
>
> [  325.856231] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  325.858398] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  325.860656] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  326.144073] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  326.151245] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
> [  326.151763] cx231xx #0: cx231xx_start_stream():: ep_mask = 8
> [  396.907318] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  396.912048] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  396.977355] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  396.987091] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
> [  456.665252] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  456.675292] cx231xx #0: cannot change alt number to 3 (error=-71)
> [  456.714508] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.718811] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.719635] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  456.729522] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
> [  456.750427] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  456.756317] cx231xx #0: cannot change alt number to 3 (error=-71)
> [  456.778625] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.782745] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.786987] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.791381] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.795501] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.795532] cx231xx #0: cx231xx_set_decoder_video_input: adjust_ref_count :Failed to setAFE input mux - errCode [-71]!
> [  456.841491] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.845642] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.849792] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.854003] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.858123] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.862274] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.866394] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.870513] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.875030] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.879150] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.883239] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.887390] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.891632] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.895751] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.899993] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.904174] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.914825] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.919036] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.924499] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.936920] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.941131] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.946655] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.960144] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.968658] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.984344] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.999572] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.004577] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.015014] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.019561] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.029083] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.033264] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.039031] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.043121] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.047332] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.051513] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.059631] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.066467] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.071624] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.084686] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.088897] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.093658] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.097747] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.102050] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.106109] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.110229] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.114318] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.118469] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.122589] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.126708] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.130828] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.134979] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.139068] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.139099] cx231xx #0: video_mux : 0
> [  457.139099] cx231xx #0: do_mode_ctrl_overrides : 0xb000
> [  457.143218] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.143249] cx231xx #0: do_mode_ctrl_overrides NTSC
> [  457.147308] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.151519] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.156250] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.163269] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.169647] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.175415] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.179779] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.183898] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.183929] cx25840 4-0044: 720x480 is not a valid size!
> [  457.228576] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  457.238769] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
> [  457.251892] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.256011] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  519.125091] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  519.137359] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
>
> The exact same device, connected to a x86 machine running the 3.0
> kernel works just fine. We have diff'ed the cx231xx driver of both
> kernels, and they are exactly the same, except for the
> URB_NO_TRANSFER_DMA_MAP, which isn't strictly needed on x86.
>
> Here is the patch that we apply on the cx231xx driver of the 3.0
> kernel. The dont_use_port_3 part is a backport of a later kernel
> version (commit 992299e84a4891275ea5924e30b66ce39a701e5e).

Hi Thomas,

Ok, that is a good start.  I would definitely submit that as a patch
(including your Signed-off-by line).

Regarding the outstanding issue, I believe I did see that and fixed
it.  Please look the history for the various cx231xx files surrounding
the time of the ".dont_use_port_3 = 1" fix.  If I recall, that patch
was actually part of a series of two or three patches which were
required for that device to work properly.  I believe the other patch
needed included an extra 10ms msleep call to ensure the hardware is
powered up fully before issuing certain i2c commands (which are what
are causing the -71 errors).

If you cannot find it, let me know and I will dig around my archives
and find it for you (I'm actually at work right now so it would be
inopportune for me to do it right this minute).

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-22 15:09     ` Devin Heitmueller
@ 2011-09-22 15:29       ` Thomas Petazzoni
  2011-09-23 12:04         ` Thomas Petazzoni
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2011-09-22 15:29 UTC (permalink / raw)
  To: Devin Heitmueller; +Cc: linux-media, srinivasa.deevi, Maxime Ripard

Le Thu, 22 Sep 2011 11:09:22 -0400,
Devin Heitmueller <dheitmueller@kernellabs.com> a écrit :

> Ok, that is a good start.  I would definitely submit that as a patch
> (including your Signed-off-by line).

Sure, we will definitely do this.

> Regarding the outstanding issue, I believe I did see that and fixed
> it.  Please look the history for the various cx231xx files surrounding
> the time of the ".dont_use_port_3 = 1" fix.  If I recall, that patch
> was actually part of a series of two or three patches which were
> required for that device to work properly.  I believe the other patch
> needed included an extra 10ms msleep call to ensure the hardware is
> powered up fully before issuing certain i2c commands (which are what
> are causing the -71 errors).

I guess you're talking about 44ecf1df9493e6684cd1bb34abb107a0ffe1078a,
which ensures a 10ms msleep call. We don't have this patch, but as with
CONFIG_HZ=100, msleep() calls are anyway rounded up to 10ms, so I'm not
sure this patch will have a huge impact. But we will try.

Then, there is also de99d5328c6d54694471da28711a05adec708c3b, but it
doesn't seem to be related to our problem. But we will also try with
that one.

> If you cannot find it, let me know and I will dig around my archives
> and find it for you (I'm actually at work right now so it would be
> inopportune for me to do it right this minute).

 :-)

Thanks for your very quick feedback!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-22 15:29       ` Thomas Petazzoni
@ 2011-09-23 12:04         ` Thomas Petazzoni
  2011-09-23 12:26           ` Sri Deevi
  2011-09-24  2:15           ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2011-09-23 12:04 UTC (permalink / raw)
  To: Devin Heitmueller
  Cc: Thomas Petazzoni, linux-media, srinivasa.deevi, Maxime Ripard

Hello Devin,

Le Thu, 22 Sep 2011 17:29:29 +0200,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :

> I guess you're talking about 44ecf1df9493e6684cd1bb34abb107a0ffe1078a,
> which ensures a 10ms msleep call. We don't have this patch, but as with
> CONFIG_HZ=100, msleep() calls are anyway rounded up to 10ms, so I'm not
> sure this patch will have a huge impact. But we will try.
> 
> Then, there is also de99d5328c6d54694471da28711a05adec708c3b, but it
> doesn't seem to be related to our problem. But we will also try with
> that one.

So, we have now tried with Linux 3.0 and the following additional
patches:

 * 992299e84a4891275ea5924e30b66ce39a701e5e (Fix regression
   introduced which broke the Hauppauge USBLive 2)
 * 44ecf1df9493e6684cd1bb34abb107a0ffe1078a (cx231xx: Fix power ramping
   issue)
 * de99d5328c6d54694471da28711a05adec708c3b (cx231xx: Provide
   signal lock status in G_INPUT)
 * the DMA fix

And still the result is the same: we get a first frame, and then
nothing more, and we have a large number of error messages in the
kernel logs.

[   18.833587] cx231xx v4l2 driver loaded.
[   18.833831] cx231xx #0: New device Hauppauge Hauppauge Device @ 480 Mbps (2040:c200) with 5 interfaces
[   18.833862] cx231xx #0: registering interface 1
[   18.854492] cx231xx #0: can't change interface 3 alt no. to 3: Max. Pkt size = 0
[   19.185943] cx231xx #0: can't change interface 4 alt no. to 1: Max. Pkt size = 0
[   19.405700] cx231xx #0: Identified as Hauppauge USB Live 2 (card=9)
[   19.692993] cx231xx #0: cx231xx_dif_set_standard: setStandard to ffffffff
[   20.238159] cx25840 4-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0)
[   20.333740] cx25840 4-0044:  Firmware download size changed to 16 bytes max length
[   21.783569] smsc95xx 1-2.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
[   22.921936] cx25840 4-0044: loaded v4l-cx231xx-avcore-01.fw firmware (16382 bytes)
[   22.960815] cx231xx #0: cx231xx #0: v4l2 driver version 0.0.1
[   22.989715] cx231xx #0: cx231xx_dif_set_standard: setStandard to ffffffff
[   23.042663] cx231xx #0: video_mux : 0
[   23.042694] cx231xx #0: do_mode_ctrl_overrides : 0xb000
[   23.043548] cx231xx #0: do_mode_ctrl_overrides NTSC
[   23.056213] cx231xx #0: cx231xx #0/0: registered device video0 [v4l2]
[   23.061035] cx231xx #0: cx231xx #0/0: registered device vbi0
[   23.061065] cx231xx #0: V4L2 device registered as video0 and vbi0
[   23.061096] cx231xx #0: EndPoint Addr 0x84, Alternate settings: 5
[   23.061096] cx231xx #0: Alternate setting 0, max size= 512
[   23.061126] cx231xx #0: Alternate setting 1, max size= 184
[   23.061126] cx231xx #0: Alternate setting 2, max size= 728
[   23.061157] cx231xx #0: Alternate setting 3, max size= 2892
[   23.061157] cx231xx #0: Alternate setting 4, max size= 1800
[   23.061187] cx231xx #0: EndPoint Addr 0x85, Alternate settings: 2
[   23.061187] cx231xx #0: Alternate setting 0, max size= 512
[   23.061218] cx231xx #0: Alternate setting 1, max size= 512
[   23.061218] cx231xx #0: EndPoint Addr 0x86, Alternate settings: 2
[   23.061248] cx231xx #0: Alternate setting 0, max size= 512
[   23.061248] cx231xx #0: Alternate setting 1, max size= 576
[   23.067108] usbcore: registered new interface driver cx231xx
[   23.360412] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[   23.365905] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[   23.367156] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[   23.872253] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usbaudio
[   23.875762] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3
[   23.875793] cx231xx #0: Alternate setting 0, max size= 512
[   23.875793] cx231xx #0: Alternate setting 1, max size= 28
[   23.875823] cx231xx #0: Alternate setting 2, max size= 52
[   23.875823] cx231xx: Cx231xx Audio Extension initialized
[   24.794891] lp: driver loaded but no devices found
[   24.880157] ppdev: user-space parallel port driver
[   30.872589] eth0: no IPv6 routers present
[  183.789154] omap_device: omap-mcbsp.2: new worst case activate latency 0: 30517
[  183.829803] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 30517
[  184.355712] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 61035
[  186.400878] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.401855] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.404571] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.405578] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.408050] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.409332] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.412109] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.414306] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.416961] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.418060] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.427520] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.498504] cx231xx #0: cx231xx_init_audio_isoc: Starting ISO AUDIO transfers
[  194.358123] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  393.839813] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  393.842834] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  393.844024] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  394.126953] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  394.133605] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
[  394.134094] cx231xx #0: cx231xx_start_stream():: ep_mask = 8
[  559.661468] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  559.665985] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  559.721374] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  559.731079] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
[  942.321258] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  942.325469] cx231xx #0: cannot change alt number to 3 (error=-71)
[  942.414031] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  942.418243] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  942.426574] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  942.436218] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  942.440032] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  942.486846] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
[  954.314727] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  954.319030] cx231xx #0: cannot change alt number to 3 (error=-71)
[  954.333618] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  954.337860] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  954.342315] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  954.348052] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  955.153045] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  955.162963] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
[  955.172302] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  955.176788] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  977.247924] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  977.252502] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  977.329895] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  977.339508] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)

We will try to increase PWR_SLEEP_INTERVAL even further (up to 50
msec), but if you have other ideas to try, we would definitely be
interested. For the record, the same driver works just fine on x86,
those problems are seen on an OMAP3 based ARM platform.

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* RE: cx231xx: DMA problem on ARM
  2011-09-23 12:04         ` Thomas Petazzoni
@ 2011-09-23 12:26           ` Sri Deevi
  2011-09-24 18:04             ` Thomas Petazzoni
  2011-09-24  2:15           ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 15+ messages in thread
From: Sri Deevi @ 2011-09-23 12:26 UTC (permalink / raw)
  To: Thomas Petazzoni, Devin Heitmueller; +Cc: linux-media, Maxime Ripard

Hi Thomas,

Do you have USB Analyzer (hardware) ? If so, Is it possible to take a trace and compare it with x86 trace to see for any obvious differences ? 
I am actually confused why set interface fails in the log. The device is very simple one with no firmware and is totally controlled by hardware itself. So far we had never seen any issue, though never tried with any other ARM based devices. Not sure if anybody had tried already. 

Hope that helps,
Thanks
Sri

-----Original Message-----
From: Thomas Petazzoni [mailto:thomas.petazzoni@free-electrons.com] 
Sent: Friday, September 23, 2011 5:04 AM
To: Devin Heitmueller
Cc: Thomas Petazzoni; linux-media@vger.kernel.org; Sri Deevi; Maxime Ripard
Subject: Re: cx231xx: DMA problem on ARM

Hello Devin,

Le Thu, 22 Sep 2011 17:29:29 +0200,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :

> I guess you're talking about 44ecf1df9493e6684cd1bb34abb107a0ffe1078a,
> which ensures a 10ms msleep call. We don't have this patch, but as with
> CONFIG_HZ=100, msleep() calls are anyway rounded up to 10ms, so I'm not
> sure this patch will have a huge impact. But we will try.
> 
> Then, there is also de99d5328c6d54694471da28711a05adec708c3b, but it
> doesn't seem to be related to our problem. But we will also try with
> that one.

So, we have now tried with Linux 3.0 and the following additional
patches:

 * 992299e84a4891275ea5924e30b66ce39a701e5e (Fix regression
   introduced which broke the Hauppauge USBLive 2)
 * 44ecf1df9493e6684cd1bb34abb107a0ffe1078a (cx231xx: Fix power ramping
   issue)
 * de99d5328c6d54694471da28711a05adec708c3b (cx231xx: Provide
   signal lock status in G_INPUT)
 * the DMA fix

And still the result is the same: we get a first frame, and then
nothing more, and we have a large number of error messages in the
kernel logs.

[   18.833587] cx231xx v4l2 driver loaded.
[   18.833831] cx231xx #0: New device Hauppauge Hauppauge Device @ 480 Mbps (2040:c200) with 5 interfaces
[   18.833862] cx231xx #0: registering interface 1
[   18.854492] cx231xx #0: can't change interface 3 alt no. to 3: Max. Pkt size = 0
[   19.185943] cx231xx #0: can't change interface 4 alt no. to 1: Max. Pkt size = 0
[   19.405700] cx231xx #0: Identified as Hauppauge USB Live 2 (card=9)
[   19.692993] cx231xx #0: cx231xx_dif_set_standard: setStandard to ffffffff
[   20.238159] cx25840 4-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0)
[   20.333740] cx25840 4-0044:  Firmware download size changed to 16 bytes max length
[   21.783569] smsc95xx 1-2.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
[   22.921936] cx25840 4-0044: loaded v4l-cx231xx-avcore-01.fw firmware (16382 bytes)
[   22.960815] cx231xx #0: cx231xx #0: v4l2 driver version 0.0.1
[   22.989715] cx231xx #0: cx231xx_dif_set_standard: setStandard to ffffffff
[   23.042663] cx231xx #0: video_mux : 0
[   23.042694] cx231xx #0: do_mode_ctrl_overrides : 0xb000
[   23.043548] cx231xx #0: do_mode_ctrl_overrides NTSC
[   23.056213] cx231xx #0: cx231xx #0/0: registered device video0 [v4l2]
[   23.061035] cx231xx #0: cx231xx #0/0: registered device vbi0
[   23.061065] cx231xx #0: V4L2 device registered as video0 and vbi0
[   23.061096] cx231xx #0: EndPoint Addr 0x84, Alternate settings: 5
[   23.061096] cx231xx #0: Alternate setting 0, max size= 512
[   23.061126] cx231xx #0: Alternate setting 1, max size= 184
[   23.061126] cx231xx #0: Alternate setting 2, max size= 728
[   23.061157] cx231xx #0: Alternate setting 3, max size= 2892
[   23.061157] cx231xx #0: Alternate setting 4, max size= 1800
[   23.061187] cx231xx #0: EndPoint Addr 0x85, Alternate settings: 2
[   23.061187] cx231xx #0: Alternate setting 0, max size= 512
[   23.061218] cx231xx #0: Alternate setting 1, max size= 512
[   23.061218] cx231xx #0: EndPoint Addr 0x86, Alternate settings: 2
[   23.061248] cx231xx #0: Alternate setting 0, max size= 512
[   23.061248] cx231xx #0: Alternate setting 1, max size= 576
[   23.067108] usbcore: registered new interface driver cx231xx
[   23.360412] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[   23.365905] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[   23.367156] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[   23.872253] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usbaudio
[   23.875762] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3
[   23.875793] cx231xx #0: Alternate setting 0, max size= 512
[   23.875793] cx231xx #0: Alternate setting 1, max size= 28
[   23.875823] cx231xx #0: Alternate setting 2, max size= 52
[   23.875823] cx231xx: Cx231xx Audio Extension initialized
[   24.794891] lp: driver loaded but no devices found
[   24.880157] ppdev: user-space parallel port driver
[   30.872589] eth0: no IPv6 routers present
[  183.789154] omap_device: omap-mcbsp.2: new worst case activate latency 0: 30517
[  183.829803] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 30517
[  184.355712] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 61035
[  186.400878] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.401855] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.404571] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.405578] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.408050] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.409332] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.412109] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.414306] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.416961] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.418060] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  186.427520] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
[  186.498504] cx231xx #0: cx231xx_init_audio_isoc: Starting ISO AUDIO transfers
[  194.358123] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
[  393.839813] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  393.842834] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  393.844024] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  394.126953] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  394.133605] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
[  394.134094] cx231xx #0: cx231xx_start_stream():: ep_mask = 8
[  559.661468] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  559.665985] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  559.721374] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  559.731079] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
[  942.321258] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  942.325469] cx231xx #0: cannot change alt number to 3 (error=-71)
[  942.414031] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  942.418243] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  942.426574] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  942.436218] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  942.440032] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  942.486846] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
[  954.314727] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  954.319030] cx231xx #0: cannot change alt number to 3 (error=-71)
[  954.333618] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  954.337860] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  954.342315] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  954.348052] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  955.153045] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  955.162963] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
[  955.172302] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  955.176788] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  977.247924] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  977.252502] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  977.329895] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  977.339508] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)

We will try to increase PWR_SLEEP_INTERVAL even further (up to 50
msec), but if you have other ideas to try, we would definitely be
interested. For the record, the same driver works just fine on x86,
those problems are seen on an OMAP3 based ARM platform.

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------


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

* Re: cx231xx: DMA problem on ARM
  2011-09-23 12:04         ` Thomas Petazzoni
  2011-09-23 12:26           ` Sri Deevi
@ 2011-09-24  2:15           ` Mauro Carvalho Chehab
  2011-09-26  8:13             ` Thomas Petazzoni
  1 sibling, 1 reply; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2011-09-24  2:15 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Devin Heitmueller, linux-media, srinivasa.deevi, Maxime Ripard

Em 23-09-2011 09:04, Thomas Petazzoni escreveu:
> Hello Devin,
> 
> Le Thu, 22 Sep 2011 17:29:29 +0200,
> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :
> 
>> I guess you're talking about 44ecf1df9493e6684cd1bb34abb107a0ffe1078a,
>> which ensures a 10ms msleep call. We don't have this patch, but as with
>> CONFIG_HZ=100, msleep() calls are anyway rounded up to 10ms, so I'm not
>> sure this patch will have a huge impact. But we will try.
>>
>> Then, there is also de99d5328c6d54694471da28711a05adec708c3b, but it
>> doesn't seem to be related to our problem. But we will also try with
>> that one.
> 
> So, we have now tried with Linux 3.0 and the following additional
> patches:
> 
>  * 992299e84a4891275ea5924e30b66ce39a701e5e (Fix regression
>    introduced which broke the Hauppauge USBLive 2)
>  * 44ecf1df9493e6684cd1bb34abb107a0ffe1078a (cx231xx: Fix power ramping
>    issue)
>  * de99d5328c6d54694471da28711a05adec708c3b (cx231xx: Provide
>    signal lock status in G_INPUT)
>  * the DMA fix
> 
> And still the result is the same: we get a first frame, and then
> nothing more, and we have a large number of error messages in the
> kernel logs.

I don't think that this is related to the power manager anymore. It can
be related to cache coherency and/or to iommu support.

> 
> [   18.833587] cx231xx v4l2 driver loaded.
> [   18.833831] cx231xx #0: New device Hauppauge Hauppauge Device @ 480 Mbps (2040:c200) with 5 interfaces
> [   18.833862] cx231xx #0: registering interface 1
> [   18.854492] cx231xx #0: can't change interface 3 alt no. to 3: Max. Pkt size = 0
> [   19.185943] cx231xx #0: can't change interface 4 alt no. to 1: Max. Pkt size = 0
> [   19.405700] cx231xx #0: Identified as Hauppauge USB Live 2 (card=9)
> [   19.692993] cx231xx #0: cx231xx_dif_set_standard: setStandard to ffffffff
> [   20.238159] cx25840 4-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0)
> [   20.333740] cx25840 4-0044:  Firmware download size changed to 16 bytes max length
> [   21.783569] smsc95xx 1-2.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
> [   22.921936] cx25840 4-0044: loaded v4l-cx231xx-avcore-01.fw firmware (16382 bytes)
> [   22.960815] cx231xx #0: cx231xx #0: v4l2 driver version 0.0.1
> [   22.989715] cx231xx #0: cx231xx_dif_set_standard: setStandard to ffffffff
> [   23.042663] cx231xx #0: video_mux : 0
> [   23.042694] cx231xx #0: do_mode_ctrl_overrides : 0xb000
> [   23.043548] cx231xx #0: do_mode_ctrl_overrides NTSC
> [   23.056213] cx231xx #0: cx231xx #0/0: registered device video0 [v4l2]
> [   23.061035] cx231xx #0: cx231xx #0/0: registered device vbi0
> [   23.061065] cx231xx #0: V4L2 device registered as video0 and vbi0
> [   23.061096] cx231xx #0: EndPoint Addr 0x84, Alternate settings: 5
> [   23.061096] cx231xx #0: Alternate setting 0, max size= 512
> [   23.061126] cx231xx #0: Alternate setting 1, max size= 184
> [   23.061126] cx231xx #0: Alternate setting 2, max size= 728
> [   23.061157] cx231xx #0: Alternate setting 3, max size= 2892
> [   23.061157] cx231xx #0: Alternate setting 4, max size= 1800
> [   23.061187] cx231xx #0: EndPoint Addr 0x85, Alternate settings: 2
> [   23.061187] cx231xx #0: Alternate setting 0, max size= 512
> [   23.061218] cx231xx #0: Alternate setting 1, max size= 512
> [   23.061218] cx231xx #0: EndPoint Addr 0x86, Alternate settings: 2
> [   23.061248] cx231xx #0: Alternate setting 0, max size= 512
> [   23.061248] cx231xx #0: Alternate setting 1, max size= 576
> [   23.067108] usbcore: registered new interface driver cx231xx
> [   23.360412] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [   23.365905] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [   23.367156] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [   23.872253] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usbaudio
> [   23.875762] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3
> [   23.875793] cx231xx #0: Alternate setting 0, max size= 512
> [   23.875793] cx231xx #0: Alternate setting 1, max size= 28
> [   23.875823] cx231xx #0: Alternate setting 2, max size= 52
> [   23.875823] cx231xx: Cx231xx Audio Extension initialized
> [   24.794891] lp: driver loaded but no devices found
> [   24.880157] ppdev: user-space parallel port driver
> [   30.872589] eth0: no IPv6 routers present
> [  183.789154] omap_device: omap-mcbsp.2: new worst case activate latency 0: 30517
> [  183.829803] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 30517
> [  184.355712] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 61035
> [  186.400878] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
> [  186.401855] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
> [  186.404571] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
> [  186.405578] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
> [  186.408050] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
> [  186.409332] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
> [  186.412109] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
> [  186.414306] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
> [  186.416961] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
> [  186.418060] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
> [  186.427520] cx231xx #0: cx231xx_start_stream():: ep_mask = 4
> [  186.498504] cx231xx #0: cx231xx_init_audio_isoc: Starting ISO AUDIO transfers
> [  194.358123] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4
> [  393.839813] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  393.842834] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  393.844024] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  394.126953] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  394.133605] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
> [  394.134094] cx231xx #0: cx231xx_start_stream():: ep_mask = 8
> [  559.661468] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  559.665985] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  559.721374] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  559.731079] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
> [  942.321258] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  942.325469] cx231xx #0: cannot change alt number to 3 (error=-71)
> [  942.414031] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  942.418243] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  942.426574] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  942.436218] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  942.440032] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  942.486846] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
> [  954.314727] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  954.319030] cx231xx #0: cannot change alt number to 3 (error=-71)
> [  954.333618] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  954.337860] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  954.342315] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  954.348052] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  955.153045] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  955.162963] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
> [  955.172302] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  955.176788] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  977.247924] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  977.252502] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  977.329895] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  977.339508] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
> 
> We will try to increase PWR_SLEEP_INTERVAL even further (up to 50
> msec), but if you have other ideas to try, we would definitely be
> interested. For the record, the same driver works just fine on x86,
> those problems are seen on an OMAP3 based ARM platform.
> 
> Thanks!
> 
> Thomas


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

* Re: cx231xx: DMA problem on ARM
  2011-09-23 12:26           ` Sri Deevi
@ 2011-09-24 18:04             ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2011-09-24 18:04 UTC (permalink / raw)
  To: Sri Deevi; +Cc: Devin Heitmueller, linux-media, Maxime Ripard

Hello Srinivasa,

Le Fri, 23 Sep 2011 05:26:07 -0700,
"Sri Deevi" <Srinivasa.Deevi@conexant.com> a écrit :

> Do you have USB Analyzer (hardware) ? If so, Is it possible to take a
> trace and compare it with x86 trace to see for any obvious
> differences ?

Unfortunately, I don't have an hardware USB analyzer to do such a
comparison.

> I am actually confused why set interface fails in the
> log. The device is very simple one with no firmware and is totally
> controlled by hardware itself. So far we had never seen any issue,
> though never tried with any other ARM based devices. Not sure if
> anybody had tried already. 

Seems like nobody ever tried to use this device on an ARM platform,
unfortunately.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-24  2:15           ` Mauro Carvalho Chehab
@ 2011-09-26  8:13             ` Thomas Petazzoni
  2011-09-26 17:32               ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2011-09-26  8:13 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Devin Heitmueller, linux-media, srinivasa.deevi, Maxime Ripard

Hello Mauro,

Le Fri, 23 Sep 2011 23:15:54 -0300,
Mauro Carvalho Chehab <mchehab@redhat.com> a écrit :

> > And still the result is the same: we get a first frame, and then
> > nothing more, and we have a large number of error messages in the
> > kernel logs.
> 
> I don't think that this is related to the power manager anymore. It can
> be related to cache coherency and/or to iommu support.

As you suspected, increasing PWR_SLEEP_INTERVAL didn't change anything.
What do you suggest to track down the potential cache coherency issues ?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-26  8:13             ` Thomas Petazzoni
@ 2011-09-26 17:32               ` Mauro Carvalho Chehab
  2011-09-26 19:02                 ` Laurent Pinchart
  0 siblings, 1 reply; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2011-09-26 17:32 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Devin Heitmueller, linux-media, srinivasa.deevi, Maxime Ripard

Em 26-09-2011 05:13, Thomas Petazzoni escreveu:
> Hello Mauro,
> 
> Le Fri, 23 Sep 2011 23:15:54 -0300,
> Mauro Carvalho Chehab <mchehab@redhat.com> a écrit :
> 
>>> And still the result is the same: we get a first frame, and then
>>> nothing more, and we have a large number of error messages in the
>>> kernel logs.
>>
>> I don't think that this is related to the power manager anymore. It can
>> be related to cache coherency and/or to iommu support.
> 
> As you suspected, increasing PWR_SLEEP_INTERVAL didn't change anything.
> What do you suggest to track down the potential cache coherency issues ?

Take a look at the ML. The SoC people discussed a lot about cache
coherency problems and how to solve it. Videobuf2 has a better support
on embedded world. I would take a look on it and see what it does different
than other drivers. Maybe Jonathan Corbet patches for the ccic driver may
help you.

It is probably a good idea to change cx231xx to use videobuf2, in order to
fix this issue.

Thanks,
Mauro
> 
> Best regards,
> 
> Thomas


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

* Re: cx231xx: DMA problem on ARM
  2011-09-26 17:32               ` Mauro Carvalho Chehab
@ 2011-09-26 19:02                 ` Laurent Pinchart
  2011-09-26 19:59                   ` Thomas Petazzoni
  0 siblings, 1 reply; 15+ messages in thread
From: Laurent Pinchart @ 2011-09-26 19:02 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Thomas Petazzoni, Devin Heitmueller, linux-media,
	srinivasa.deevi, Maxime Ripard

On Monday 26 September 2011 19:32:47 Mauro Carvalho Chehab wrote:
> Em 26-09-2011 05:13, Thomas Petazzoni escreveu:
> > Le Fri, 23 Sep 2011 23:15:54 -0300, Mauro Carvalho Chehab a écrit:
> >>> And still the result is the same: we get a first frame, and then
> >>> nothing more, and we have a large number of error messages in the
> >>> kernel logs.
> >> 
> >> I don't think that this is related to the power manager anymore. It can
> >> be related to cache coherency and/or to iommu support.
> > 
> > As you suspected, increasing PWR_SLEEP_INTERVAL didn't change anything.
> > What do you suggest to track down the potential cache coherency issues ?

Are you using the MMAP or USERPTR capture method ? If using MMAP, can you try 
(as a test only) to unmap the buffer before queueing it and to remap it after 
dequeuing it ?

> Take a look at the ML. The SoC people discussed a lot about cache
> coherency problems and how to solve it. Videobuf2 has a better support
> on embedded world. I would take a look on it and see what it does different
> than other drivers. Maybe Jonathan Corbet patches for the ccic driver may
> help you.
> 
> It is probably a good idea to change cx231xx to use videobuf2, in order to
> fix this issue.

-- 
Regards,

Laurent Pinchart

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

* Re: cx231xx: DMA problem on ARM
  2011-09-26 19:02                 ` Laurent Pinchart
@ 2011-09-26 19:59                   ` Thomas Petazzoni
  2011-09-26 20:03                     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2011-09-26 19:59 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Mauro Carvalho Chehab, Devin Heitmueller, linux-media,
	srinivasa.deevi, Maxime Ripard

Hello Laurent,

Le Mon, 26 Sep 2011 21:02:48 +0200,
Laurent Pinchart <laurent.pinchart@ideasonboard.com> a écrit :

> Are you using the MMAP or USERPTR capture method ? If using MMAP, can
> you try (as a test only) to unmap the buffer before queueing it and
> to remap it after dequeuing it ?

So far, we have used VLC, Cheese, or a simple OpenCV based application
to test the V4L2 device on our ARM platform, and I have no idea which
capture method those are using. Is there a very simple V4L test
application that we could use to hack the buffer unmap/remap trick
you're suggesting as a test ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: cx231xx: DMA problem on ARM
  2011-09-26 19:59                   ` Thomas Petazzoni
@ 2011-09-26 20:03                     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2011-09-26 20:03 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Laurent Pinchart, Devin Heitmueller, linux-media,
	srinivasa.deevi, Maxime Ripard

Em 26-09-2011 16:59, Thomas Petazzoni escreveu:
> Hello Laurent,
> 
> Le Mon, 26 Sep 2011 21:02:48 +0200,
> Laurent Pinchart <laurent.pinchart@ideasonboard.com> a écrit :
> 
>> Are you using the MMAP or USERPTR capture method ? If using MMAP, can
>> you try (as a test only) to unmap the buffer before queueing it and
>> to remap it after dequeuing it ?
> 
> So far, we have used VLC, Cheese, or a simple OpenCV based application
> to test the V4L2 device on our ARM platform, and I have no idea which
> capture method those are using. Is there a very simple V4L test
> application that we could use to hack the buffer unmap/remap trick
> you're suggesting as a test ?

The simplest application is the v4l2grab util:
	http://git.linuxtv.org/v4l-utils.git/blob/HEAD:/contrib/test/v4l2grab.c

it uses libv4l to convert to RGB and outputs a series of ppm images. By
generating one image per frame, it is easy to check artifacts on each
image.

> 
> Regards,
> 
> Thomas


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

end of thread, other threads:[~2011-09-26 20:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-21 11:56 cx231xx: DMA problem on ARM Thomas Petazzoni
2011-09-21 12:04 ` Devin Heitmueller
2011-09-21 19:17   ` Thomas Petazzoni
2011-09-22 14:45   ` Thomas Petazzoni
2011-09-22 15:09     ` Devin Heitmueller
2011-09-22 15:29       ` Thomas Petazzoni
2011-09-23 12:04         ` Thomas Petazzoni
2011-09-23 12:26           ` Sri Deevi
2011-09-24 18:04             ` Thomas Petazzoni
2011-09-24  2:15           ` Mauro Carvalho Chehab
2011-09-26  8:13             ` Thomas Petazzoni
2011-09-26 17:32               ` Mauro Carvalho Chehab
2011-09-26 19:02                 ` Laurent Pinchart
2011-09-26 19:59                   ` Thomas Petazzoni
2011-09-26 20:03                     ` Mauro Carvalho Chehab

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.