public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 14/16] stv090x: Fix losing lock in dual DVB-S2 mode
       [not found] <1294652184-12843-1-git-send-email-o.endriss@gmx.de>
@ 2011-01-10  9:36 ` Oliver Endriss
       [not found] ` <1294652184-12843-4-git-send-email-o.endriss@gmx.de>
       [not found] ` <1294652184-12843-8-git-send-email-o.endriss@gmx.de>
  2 siblings, 0 replies; 9+ messages in thread
From: Oliver Endriss @ 2011-01-10  9:36 UTC (permalink / raw)
  To: linux-media; +Cc: mchehab

Do not clear registers ACLC/BCLC in DVB-S2 mode for Cut <= 20.
Otherwise, the demod could lose the lock periodically.
Verified with cineS2 and Duoflex.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
---
 drivers/media/dvb/frontends/stv090x.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c
index 57e229a..1675c2a 100644
--- a/drivers/media/dvb/frontends/stv090x.c
+++ b/drivers/media/dvb/frontends/stv090x.c
@@ -2894,10 +2894,12 @@ static int stv090x_optimize_track(struct stv090x_state *state)
 		STV090x_SETFIELD_Px(reg, DVBS2_ENABLE_FIELD, 1);
 		if (STV090x_WRITE_DEMOD(state, DMDCFGMD, reg) < 0)
 			goto err;
-		if (STV090x_WRITE_DEMOD(state, ACLC, 0) < 0)
-			goto err;
-		if (STV090x_WRITE_DEMOD(state, BCLC, 0) < 0)
-			goto err;
+		if (state->internal->dev_ver >= 0x30) {
+			if (STV090x_WRITE_DEMOD(state, ACLC, 0) < 0)
+				goto err;
+			if (STV090x_WRITE_DEMOD(state, BCLC, 0) < 0)
+				goto err;
+		}
 		if (state->frame_len == STV090x_LONG_FRAME) {
 			reg = STV090x_READ_DEMOD(state, DMDMODCOD);
 			modcod = STV090x_GETFIELD_Px(reg, DEMOD_MODCOD_FIELD);
-- 
1.6.5.3


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

* Re: [PATCH 03/16] ngene: Firmware 18 support
       [not found] ` <1294652184-12843-4-git-send-email-o.endriss@gmx.de>
@ 2011-01-10 14:00   ` Bjørn Mork
  2011-01-10 17:12     ` Oliver Endriss
  0 siblings, 1 reply; 9+ messages in thread
From: Bjørn Mork @ 2011-01-10 14:00 UTC (permalink / raw)
  To: linux-media

Oliver Endriss <o.endriss@gmx.de> writes:

> +	case 18:
> +		size = 0;
> +		fw_name = "ngene_18.fw";
> +		break;
>  	}
>  
>  	if (request_firmware(&fw, fw_name, &dev->pci_dev->dev) < 0) {
> @@ -1266,6 +1270,8 @@ static int ngene_load_firm(struct ngene *dev)
>  			": Copy %s to your hotplug directory!\n", fw_name);
>  		return -1;
>  	}
> +	if (size == 0)
> +		size = fw->size;
>  	if (size != fw->size) {
>  		printk(KERN_ERR DEVICE_NAME
>  			": Firmware %s has invalid size!", fw_name);


Just a stupid question:  Why remove the size verification for version 18
while keeping it for the other firmware revisions?


Bjørn


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

* Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver
       [not found] ` <1294652184-12843-8-git-send-email-o.endriss@gmx.de>
@ 2011-01-10 14:05   ` Andreas Oberritter
  2011-01-10 17:20     ` Oliver Endriss
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Oberritter @ 2011-01-10 14:05 UTC (permalink / raw)
  To: Oliver Endriss; +Cc: linux-media, mchehab

On 01/10/2011 10:36 AM, Oliver Endriss wrote:
> From: Ralph Metzler <rjkm@metzlerbros.de>
> 
> Driver for the Common Interface Controller CXD2099AR.
> Supports the CI of the cineS2 DVB-S2.
> 
> For now, data is passed through '/dev/dvb/adapterX/sec0':
> - Encrypted data must be written to 'sec0'.
> - Decrypted data can be read from 'sec0'.
> - Setup the CAM using device 'ca0'.

Nack. In DVB API terms, "sec" stands for satellite equipment control,
and if I remember correctly, sec0 already existed in the first versions
of the API and that's why its leftovers can be abused by this driver.

The interfaces for writing data are dvr0 and demux0. If they don't fit
for decryption of recorded data, then they should be extended.

For decryption of live data, no new user interface needs to be created.

Regards,
Andreas

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

* Re: [PATCH 03/16] ngene: Firmware 18 support
  2011-01-10 14:00   ` [PATCH 03/16] ngene: Firmware 18 support Bjørn Mork
@ 2011-01-10 17:12     ` Oliver Endriss
  0 siblings, 0 replies; 9+ messages in thread
From: Oliver Endriss @ 2011-01-10 17:12 UTC (permalink / raw)
  To: Bjørn Mork; +Cc: linux-media

On Monday 10 January 2011 15:00:18 Bjørn Mork wrote:
> Oliver Endriss <o.endriss@gmx.de> writes:
> 
> > +	case 18:
> > +		size = 0;
> > +		fw_name = "ngene_18.fw";
> > +		break;
> >  	}
> >  
> >  	if (request_firmware(&fw, fw_name, &dev->pci_dev->dev) < 0) {
> > @@ -1266,6 +1270,8 @@ static int ngene_load_firm(struct ngene *dev)
> >  			": Copy %s to your hotplug directory!\n", fw_name);
> >  		return -1;
> >  	}
> > +	if (size == 0)
> > +		size = fw->size;
> >  	if (size != fw->size) {
> >  		printk(KERN_ERR DEVICE_NAME
> >  			": Firmware %s has invalid size!", fw_name);
> 
> 
> Just a stupid question:  Why remove the size verification for version 18
> while keeping it for the other firmware revisions?

Good point. This was handy when the firmware was developed.
I will submit an additional patch which adds a size check for Fw18.

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------

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

* Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver
  2011-01-10 14:05   ` [PATCH 07/16] ngene: CXD2099AR Common Interface driver Andreas Oberritter
@ 2011-01-10 17:20     ` Oliver Endriss
  2011-01-11  1:32       ` Interconnection of different DVB adapters (was: Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver) Andreas Oberritter
  2011-01-17 16:31       ` [PATCH 07/16] ngene: CXD2099AR Common Interface driver Mauro Carvalho Chehab
  0 siblings, 2 replies; 9+ messages in thread
From: Oliver Endriss @ 2011-01-10 17:20 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: linux-media, mchehab, Ralph Metzler

On Monday 10 January 2011 15:05:34 Andreas Oberritter wrote:
> On 01/10/2011 10:36 AM, Oliver Endriss wrote:
> > From: Ralph Metzler <rjkm@metzlerbros.de>
> > 
> > Driver for the Common Interface Controller CXD2099AR.
> > Supports the CI of the cineS2 DVB-S2.
> > 
> > For now, data is passed through '/dev/dvb/adapterX/sec0':
> > - Encrypted data must be written to 'sec0'.
> > - Decrypted data can be read from 'sec0'.
> > - Setup the CAM using device 'ca0'.
> 
> Nack. In DVB API terms, "sec" stands for satellite equipment control,
> and if I remember correctly, sec0 already existed in the first versions
> of the API and that's why its leftovers can be abused by this driver.
> 
> The interfaces for writing data are dvr0 and demux0. If they don't fit
> for decryption of recorded data, then they should be extended.
> 
> For decryption of live data, no new user interface needs to be created.

There was an attempt to find a solution for the problem in thread
http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html

As that discussion did not come to a final solution, and the driver is
still experimental, I left the original patch 'as is'.

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------

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

* Interconnection of different DVB adapters (was: Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver)
  2011-01-10 17:20     ` Oliver Endriss
@ 2011-01-11  1:32       ` Andreas Oberritter
  2011-01-11  2:14         ` Oliver Endriss
  2011-01-17 16:31       ` [PATCH 07/16] ngene: CXD2099AR Common Interface driver Mauro Carvalho Chehab
  1 sibling, 1 reply; 9+ messages in thread
From: Andreas Oberritter @ 2011-01-11  1:32 UTC (permalink / raw)
  To: linux-media; +Cc: Oliver Endriss, mchehab, Ralph Metzler

On 01/10/2011 06:20 PM, Oliver Endriss wrote:
> On Monday 10 January 2011 15:05:34 Andreas Oberritter wrote:
>> On 01/10/2011 10:36 AM, Oliver Endriss wrote:
>>> From: Ralph Metzler <rjkm@metzlerbros.de>
>>>
>>> Driver for the Common Interface Controller CXD2099AR.
>>> Supports the CI of the cineS2 DVB-S2.
>>>
>>> For now, data is passed through '/dev/dvb/adapterX/sec0':
>>> - Encrypted data must be written to 'sec0'.
>>> - Decrypted data can be read from 'sec0'.
>>> - Setup the CAM using device 'ca0'.
>>
>> Nack. In DVB API terms, "sec" stands for satellite equipment control,
>> and if I remember correctly, sec0 already existed in the first versions
>> of the API and that's why its leftovers can be abused by this driver.
>>
>> The interfaces for writing data are dvr0 and demux0. If they don't fit
>> for decryption of recorded data, then they should be extended.
>>
>> For decryption of live data, no new user interface needs to be created.
> 
> There was an attempt to find a solution for the problem in thread
> http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html
> 
> As that discussion did not come to a final solution, and the driver is
> still experimental, I left the original patch 'as is'.

Thanks for the pointer. My impression from the quoted thread is that the
most desired and viable solution was to create a ca device node which
can be virtually connected on demand to a demux or dvr device of another
adapter, but there was no intent to put the required amount of work into
it. That's fair, but IMHO not suitable for submission to the mainline
kernel.

This definitely needs more thought.

Maybe the adapter-based scheme currently in use needs to be revised
thoroughly. The "budget" type of adapters are basically just frontends
and we should be able to interconnect those (and also other) frontends
with CIs, demuxes and decoders of different adapters, if the underlying
buses allow it. Is this something the media controller and mem2mem APIs
are trying to solve for V4L? If yes, this could become interesting for
DVB, too.

Regards,
Andreas

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

* Re: Interconnection of different DVB adapters (was: Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver)
  2011-01-11  1:32       ` Interconnection of different DVB adapters (was: Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver) Andreas Oberritter
@ 2011-01-11  2:14         ` Oliver Endriss
  0 siblings, 0 replies; 9+ messages in thread
From: Oliver Endriss @ 2011-01-11  2:14 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: linux-media, mchehab, Ralph Metzler

On Tuesday 11 January 2011 02:32:14 Andreas Oberritter wrote:
> On 01/10/2011 06:20 PM, Oliver Endriss wrote:
> > On Monday 10 January 2011 15:05:34 Andreas Oberritter wrote:
> >> On 01/10/2011 10:36 AM, Oliver Endriss wrote:
> >>> From: Ralph Metzler <rjkm@metzlerbros.de>
> >>>
> >>> Driver for the Common Interface Controller CXD2099AR.
> >>> Supports the CI of the cineS2 DVB-S2.
> >>>
> >>> For now, data is passed through '/dev/dvb/adapterX/sec0':
> >>> - Encrypted data must be written to 'sec0'.
> >>> - Decrypted data can be read from 'sec0'.
> >>> - Setup the CAM using device 'ca0'.
> >>
> >> Nack. In DVB API terms, "sec" stands for satellite equipment control,
> >> and if I remember correctly, sec0 already existed in the first versions
> >> of the API and that's why its leftovers can be abused by this driver.
> >>
> >> The interfaces for writing data are dvr0 and demux0. If they don't fit
> >> for decryption of recorded data, then they should be extended.
> >>
> >> For decryption of live data, no new user interface needs to be created.
> > 
> > There was an attempt to find a solution for the problem in thread
> > http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html
> > 
> > As that discussion did not come to a final solution, and the driver is
> > still experimental, I left the original patch 'as is'.
> 
> Thanks for the pointer. My impression from the quoted thread is that the
> most desired and viable solution was to create a ca device node which
> can be virtually connected on demand to a demux or dvr device of another
> adapter, but there was no intent to put the required amount of work into
> it.

Attaching a CI to a single frontend is easy. In this case we could
simply attach the CI to the first frontend of the card, and we are done.

The intention was to allow decryption of streams from more than one
frontend _at_the_same_time_. That might require multiplexing partial
TS streams into a new one, passing it to the CAM and demultiplexing the
decrypted stream again.

The idea was to perform these operations in userspace, while the kernel
provides a simple interface which
- accepts an encrypted stream and
- delivers the decrypted stream.

sec0 was chosen because it exists and it is currently unused.
It can be renamed anytime, if we reach an agreement.

> That's fair, but IMHO not suitable for submission to the mainline 
> kernel.
>
> This definitely needs more thought.

If this is the common opinion, I will simply strip the CI support from
the driver again. The stv0900x and ngene patches are too important to be
delayed.

> Maybe the adapter-based scheme currently in use needs to be revised
> thoroughly. The "budget" type of adapters are basically just frontends
> and we should be able to interconnect those (and also other) frontends
> with CIs, demuxes and decoders of different adapters, if the underlying
> buses allow it. Is this something the media controller and mem2mem APIs
> are trying to solve for V4L? If yes, this could become interesting for
> DVB, too.

Honestly, I have little motivation to work on things,  which I do not
use. I do not care about CAM stuff. I am just submitting the code
I received...

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------

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

* Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver
  2011-01-10 17:20     ` Oliver Endriss
  2011-01-11  1:32       ` Interconnection of different DVB adapters (was: Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver) Andreas Oberritter
@ 2011-01-17 16:31       ` Mauro Carvalho Chehab
  2011-01-18  9:13         ` Oliver Endriss
  1 sibling, 1 reply; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-17 16:31 UTC (permalink / raw)
  To: linux-media; +Cc: Oliver Endriss, Andreas Oberritter, Ralph Metzler

Em 10-01-2011 15:20, Oliver Endriss escreveu:
> On Monday 10 January 2011 15:05:34 Andreas Oberritter wrote:
>> On 01/10/2011 10:36 AM, Oliver Endriss wrote:
>>> From: Ralph Metzler <rjkm@metzlerbros.de>
>>>
>>> Driver for the Common Interface Controller CXD2099AR.
>>> Supports the CI of the cineS2 DVB-S2.
>>>
>>> For now, data is passed through '/dev/dvb/adapterX/sec0':
>>> - Encrypted data must be written to 'sec0'.
>>> - Decrypted data can be read from 'sec0'.
>>> - Setup the CAM using device 'ca0'.
>>
>> Nack. In DVB API terms, "sec" stands for satellite equipment control,
>> and if I remember correctly, sec0 already existed in the first versions
>> of the API and that's why its leftovers can be abused by this driver.
>>
>> The interfaces for writing data are dvr0 and demux0. If they don't fit
>> for decryption of recorded data, then they should be extended.
>>
>> For decryption of live data, no new user interface needs to be created.
> 
> There was an attempt to find a solution for the problem in thread
> http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html
> 
> As that discussion did not come to a final solution, and the driver is
> still experimental, I left the original patch 'as is'.

Drivers that don't use the proper API should be moved to staging. Just making
them as experimental is not good enough. As this is the only issue with
this patch series, I'll be applying them and moving cxd2099 driver to staging
while we don't have a proper fix for it.

Cheers,
Mauro.

PS.: The patch I'm appling to move it to staging is enclosed.

-

commit 96d7f7656af8a348134302d8c36760156ea6428e
Author: Mauro Carvalho Chehab <mchehab@redhat.com>
Date:   Mon Jan 17 14:20:49 2011 -0200

    [media] Move CI cxd2099 driver to staging
    
    This driver is abusing the kernel<=>userspace API, due to the lack of a
    proper solution for it. A discussion were done at:
    	http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html
    But there's not a solution for it yet. So, move the driver to staging, while
    we don't have a final solution.
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/dvb/ngene/Makefile b/drivers/media/dvb/ngene/Makefile
index 00d12d6..2bc9687 100644
--- a/drivers/media/dvb/ngene/Makefile
+++ b/drivers/media/dvb/ngene/Makefile
@@ -2,10 +2,13 @@
 # Makefile for the nGene device driver
 #
 
-ngene-objs := ngene-core.o ngene-i2c.o ngene-cards.o ngene-dvb.o cxd2099.o
+ngene-objs := ngene-core.o ngene-i2c.o ngene-cards.o ngene-dvb.o
 
 obj-$(CONFIG_DVB_NGENE) += ngene.o
 
 EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
 EXTRA_CFLAGS += -Idrivers/media/dvb/frontends/
 EXTRA_CFLAGS += -Idrivers/media/common/tuners/
+
+# For the staging CI driver cxd2099
+EXTRA_CFLAGS += -Idrivers/staging/cxd2099/
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index bdc632b..1fc1087 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -51,6 +51,8 @@ source "drivers/staging/cx25821/Kconfig"
 
 source "drivers/staging/tm6000/Kconfig"
 
+source "drivers/staging/cxd2099/Kconfig"
+
 source "drivers/staging/dabusb/Kconfig"
 
 source "drivers/staging/se401/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 3eda5c7..2f638e5 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_SLICOSS)		+= slicoss/
 obj-$(CONFIG_VIDEO_GO7007)	+= go7007/
 obj-$(CONFIG_VIDEO_CX25821)	+= cx25821/
 obj-$(CONFIG_VIDEO_TM6000)	+= tm6000/
+obj-$(CONFIG_DVB_CXD2099)	+= cxd2099/
 obj-$(CONFIG_USB_DABUSB)        += dabusb/
 obj-$(CONFIG_USB_VICAM)         += usbvideo/
 obj-$(CONFIG_USB_SE401)         += se401/
diff --git a/drivers/staging/cxd2099/Kconfig b/drivers/staging/cxd2099/Kconfig
new file mode 100644
index 0000000..9d638c3
--- /dev/null
+++ b/drivers/staging/cxd2099/Kconfig
@@ -0,0 +1,11 @@
+config DVB_CXD2099
+        tristate "CXD2099AR Common Interface driver"
+        depends on DVB_CORE && PCI && I2C && DVB_NGENE
+        ---help---
+          Support for the CI module found on cineS2 DVB-S2, supported by
+	  the Micronas PCIe device driver (ngene).
+
+	  For now, data is passed through '/dev/dvb/adapterX/sec0':
+	    - Encrypted data must be written to 'sec0'.
+	    - Decrypted data can be read from 'sec0'.
+	    - Setup the CAM using device 'ca0'.
diff --git a/drivers/staging/cxd2099/Makefile b/drivers/staging/cxd2099/Makefile
new file mode 100644
index 0000000..72b1455
--- /dev/null
+++ b/drivers/staging/cxd2099/Makefile
@@ -0,0 +1,5 @@
+obj-$(CONFIG_DVB_CXD2099) += cxd2099.o
+
+EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
+EXTRA_CFLAGS += -Idrivers/media/dvb/frontends/
+EXTRA_CFLAGS += -Idrivers/media/common/tuners/
diff --git a/drivers/staging/cxd2099/TODO b/drivers/staging/cxd2099/TODO
new file mode 100644
index 0000000..375bb6f
--- /dev/null
+++ b/drivers/staging/cxd2099/TODO
@@ -0,0 +1,12 @@
+For now, data is passed through '/dev/dvb/adapterX/sec0':
+ - Encrypted data must be written to 'sec0'.
+ - Decrypted data can be read from 'sec0'.
+ - Setup the CAM using device 'ca0'.
+
+But this is wrong. There are some discussions about the proper way for
+doing it, as seen at:
+	http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html
+
+While there's no proper fix for it, the driver should be kept in staging.
+
+Patches should be submitted to: linux-media@vger.kernel.org.
diff --git a/drivers/media/dvb/ngene/cxd2099.c b/drivers/staging/cxd2099/cxd2099.c
similarity index 100%
rename from drivers/media/dvb/ngene/cxd2099.c
rename to drivers/staging/cxd2099/cxd2099.c
diff --git a/drivers/media/dvb/ngene/cxd2099.h b/drivers/staging/cxd2099/cxd2099.h
similarity index 78%
rename from drivers/media/dvb/ngene/cxd2099.h
rename to drivers/staging/cxd2099/cxd2099.h
index f71b807..a313dc2 100644
--- a/drivers/media/dvb/ngene/cxd2099.h
+++ b/drivers/staging/cxd2099/cxd2099.h
@@ -27,6 +27,15 @@
 
 #include <dvb_ca_en50221.h>
 
+#if defined(CONFIG_DVB_CXD2099) || \
+        (defined(CONFIG_DVB_CXD2099_MODULE) && defined(MODULE))
 struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c);
+#else
+struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c)
+{
+	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+	return NULL;
+}
+#endif
 
 #endif

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

* Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver
  2011-01-17 16:31       ` [PATCH 07/16] ngene: CXD2099AR Common Interface driver Mauro Carvalho Chehab
@ 2011-01-18  9:13         ` Oliver Endriss
  0 siblings, 0 replies; 9+ messages in thread
From: Oliver Endriss @ 2011-01-18  9:13 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, Andreas Oberritter, Ralph Metzler

On Monday 17 January 2011 17:31:15 Mauro Carvalho Chehab wrote:
> Em 10-01-2011 15:20, Oliver Endriss escreveu:
> > On Monday 10 January 2011 15:05:34 Andreas Oberritter wrote:
> >> On 01/10/2011 10:36 AM, Oliver Endriss wrote:
> >>> From: Ralph Metzler <rjkm@metzlerbros.de>
> >>>
> >>> Driver for the Common Interface Controller CXD2099AR.
> >>> Supports the CI of the cineS2 DVB-S2.
> >>>
> >>> For now, data is passed through '/dev/dvb/adapterX/sec0':
> >>> - Encrypted data must be written to 'sec0'.
> >>> - Decrypted data can be read from 'sec0'.
> >>> - Setup the CAM using device 'ca0'.
> >>
> >> Nack. In DVB API terms, "sec" stands for satellite equipment control,
> >> and if I remember correctly, sec0 already existed in the first versions
> >> of the API and that's why its leftovers can be abused by this driver.
> >>
> >> The interfaces for writing data are dvr0 and demux0. If they don't fit
> >> for decryption of recorded data, then they should be extended.
> >>
> >> For decryption of live data, no new user interface needs to be created.
> > 
> > There was an attempt to find a solution for the problem in thread
> > http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html
> > 
> > As that discussion did not come to a final solution, and the driver is
> > still experimental, I left the original patch 'as is'.
> 
> Drivers that don't use the proper API should be moved to staging. Just making
> them as experimental is not good enough. As this is the only issue with
> this patch series, I'll be applying them and moving cxd2099 driver to staging
> while we don't have a proper fix for it.

Ok.

> +struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c)
> +{
> +	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
> +	return NULL;
> +}
> +#endif

If staging drivers are disabled, compilation will fail with
"multiple definition of `cxd2099_attach'".

The helper function must be declared as 'static inline'.

Please apply this fix:

diff --git a/drivers/staging/cxd2099/cxd2099.h b/drivers/staging/cxd2099/cxd2099.h
index a313dc2..bed54ff 100644
--- a/drivers/staging/cxd2099/cxd2099.h
+++ b/drivers/staging/cxd2099/cxd2099.h
@@ -31,7 +31,7 @@
         (defined(CONFIG_DVB_CXD2099_MODULE) && defined(MODULE))
 struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c);
 #else
-struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c)
+static inline struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c)
 {
 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
 	return NULL;


-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------

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

end of thread, other threads:[~2011-01-18  9:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1294652184-12843-1-git-send-email-o.endriss@gmx.de>
2011-01-10  9:36 ` [PATCH 14/16] stv090x: Fix losing lock in dual DVB-S2 mode Oliver Endriss
     [not found] ` <1294652184-12843-4-git-send-email-o.endriss@gmx.de>
2011-01-10 14:00   ` [PATCH 03/16] ngene: Firmware 18 support Bjørn Mork
2011-01-10 17:12     ` Oliver Endriss
     [not found] ` <1294652184-12843-8-git-send-email-o.endriss@gmx.de>
2011-01-10 14:05   ` [PATCH 07/16] ngene: CXD2099AR Common Interface driver Andreas Oberritter
2011-01-10 17:20     ` Oliver Endriss
2011-01-11  1:32       ` Interconnection of different DVB adapters (was: Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver) Andreas Oberritter
2011-01-11  2:14         ` Oliver Endriss
2011-01-17 16:31       ` [PATCH 07/16] ngene: CXD2099AR Common Interface driver Mauro Carvalho Chehab
2011-01-18  9:13         ` Oliver Endriss

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