[kernel] r17015 - in dists/trunk/linux-2.6/debian: . patches/bugfix/all patches/series

Ben Hutchings benh at alioth.debian.org
Mon Mar 7 01:13:22 UTC 2011


Author: benh
Date: Mon Mar  7 01:13:17 2011
New Revision: 17015

Log:
dib0700/dib7000m: Add pid filtering (Closes: #614837)

Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/media-DiB7000M-add-pid-filtering.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/base

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	Mon Mar  7 00:15:00 2011	(r17014)
+++ dists/trunk/linux-2.6/debian/changelog	Mon Mar  7 01:13:17 2011	(r17015)
@@ -13,6 +13,7 @@
   * perf: Build with newt for improved user interface (Closes: #615868)
   * aufs: Update for 2.6.38
   * aufs: Fix device numbers passed to security_path_mknod()
+  * dib0700/dib7000m: Add pid filtering (Closes: #614837)
 
  -- maximilian attems <maks at debian.org>  Thu, 03 Mar 2011 16:00:38 +0100
 

Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/media-DiB7000M-add-pid-filtering.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/media-DiB7000M-add-pid-filtering.patch	Mon Mar  7 01:13:17 2011	(r17015)
@@ -0,0 +1,128 @@
+From: Olivier Grenie <olivier.grenie at dibcom.fr>
+Date: Fri, 14 Jan 2011 13:58:59 -0300
+Subject: [PATCH] [media] DiB7000M: add pid filtering
+
+commit e192a7cf0effe7680264a5bc35c0ad1bdcdc921c upstream.
+
+This patch adds the pid filtering for the dib7000M demod. It also
+corrects the pid filtering for the dib7700 based board. It should
+prevent an oops, when using dib7700p based board.
+
+References: https://bugzilla.novell.com/show_bug.cgi?id=644807
+
+Signed-off-by: Olivier Grenie <olivier.grenie at dibcom.fr>
+Signed-off-by: Patrick Boettcher <patrick.boettcher at dibcom.fr>
+Tested-by: Pavel SKARKA <paul.sp at seznam.cz>
+Cc: stable at kernel.org
+Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
+---
+ drivers/media/dvb/dvb-usb/dib0700_devices.c |   21 +++++++++++++++++++--
+ drivers/media/dvb/frontends/dib7000m.c      |   19 +++++++++++++++++++
+ drivers/media/dvb/frontends/dib7000m.h      |   15 +++++++++++++++
+ 3 files changed, 53 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
+index defd839..193cdb7 100644
+--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
++++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
+@@ -870,6 +870,23 @@ static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap)
+ 	return 0;
+ }
+ 
++static int stk7700p_pid_filter(struct dvb_usb_adapter *adapter, int index,
++		u16 pid, int onoff)
++{
++	struct dib0700_state *st = adapter->dev->priv;
++	if (st->is_dib7000pc)
++		return dib7000p_pid_filter(adapter->fe, index, pid, onoff);
++	return dib7000m_pid_filter(adapter->fe, index, pid, onoff);
++}
++
++static int stk7700p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff)
++{
++	struct dib0700_state *st = adapter->dev->priv;
++	if (st->is_dib7000pc)
++		return dib7000p_pid_filter_ctrl(adapter->fe, onoff);
++	return dib7000m_pid_filter_ctrl(adapter->fe, onoff);
++}
++
+ static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff)
+ {
+     return dib7000p_pid_filter(adapter->fe, index, pid, onoff);
+@@ -1875,8 +1892,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
+ 			{
+ 				.caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
+ 				.pid_filter_count = 32,
+-				.pid_filter       = stk70x0p_pid_filter,
+-				.pid_filter_ctrl  = stk70x0p_pid_filter_ctrl,
++				.pid_filter       = stk7700p_pid_filter,
++				.pid_filter_ctrl  = stk7700p_pid_filter_ctrl,
+ 				.frontend_attach  = stk7700p_frontend_attach,
+ 				.tuner_attach     = stk7700p_tuner_attach,
+ 
+diff --git a/drivers/media/dvb/frontends/dib7000m.c b/drivers/media/dvb/frontends/dib7000m.c
+index c7f5ccf..289a798 100644
+--- a/drivers/media/dvb/frontends/dib7000m.c
++++ b/drivers/media/dvb/frontends/dib7000m.c
+@@ -1285,6 +1285,25 @@ struct i2c_adapter * dib7000m_get_i2c_master(struct dvb_frontend *demod, enum di
+ }
+ EXPORT_SYMBOL(dib7000m_get_i2c_master);
+ 
++int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff)
++{
++	struct dib7000m_state *state = fe->demodulator_priv;
++	u16 val = dib7000m_read_word(state, 294 + state->reg_offs) & 0xffef;
++	val |= (onoff & 0x1) << 4;
++	dprintk("PID filter enabled %d", onoff);
++	return dib7000m_write_word(state, 294 + state->reg_offs, val);
++}
++EXPORT_SYMBOL(dib7000m_pid_filter_ctrl);
++
++int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff)
++{
++	struct dib7000m_state *state = fe->demodulator_priv;
++	dprintk("PID filter: index %x, PID %d, OnOff %d", id, pid, onoff);
++	return dib7000m_write_word(state, 300 + state->reg_offs + id,
++			onoff ? (1 << 13) | pid : 0);
++}
++EXPORT_SYMBOL(dib7000m_pid_filter);
++
+ #if 0
+ /* used with some prototype boards */
+ int dib7000m_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods,
+diff --git a/drivers/media/dvb/frontends/dib7000m.h b/drivers/media/dvb/frontends/dib7000m.h
+index 113819c..81fcf22 100644
+--- a/drivers/media/dvb/frontends/dib7000m.h
++++ b/drivers/media/dvb/frontends/dib7000m.h
+@@ -46,6 +46,8 @@ extern struct dvb_frontend *dib7000m_attach(struct i2c_adapter *i2c_adap,
+ extern struct i2c_adapter *dib7000m_get_i2c_master(struct dvb_frontend *,
+ 						   enum dibx000_i2c_interface,
+ 						   int);
++extern int dib7000m_pid_filter(struct dvb_frontend *, u8 id, u16 pid, u8 onoff);
++extern int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff);
+ #else
+ static inline
+ struct dvb_frontend *dib7000m_attach(struct i2c_adapter *i2c_adap,
+@@ -63,6 +65,19 @@ struct i2c_adapter *dib7000m_get_i2c_master(struct dvb_frontend *demod,
+ 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+ 	return NULL;
+ }
++static inline int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id,
++						u16 pid, u8 onoff)
++{
++	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
++	return -ENODEV;
++}
++
++static inline int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe,
++						uint8_t onoff)
++{
++	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
++	return -ENODEV;
++}
+ #endif
+ 
+ /* TODO
+-- 
+1.7.4.1
+

Modified: dists/trunk/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base	Mon Mar  7 00:15:00 2011	(r17014)
+++ dists/trunk/linux-2.6/debian/patches/series/base	Mon Mar  7 01:13:17 2011	(r17015)
@@ -50,3 +50,4 @@
 + bugfix/x86/Correct-a-typo-in-async_page_fault-label.patch
 + features/all/vt6656-Use-request_firmware-to-load-firmware.patch
 + features/all/perf-Define-make-variables-ARCH-and-SRCARCH-consiste.patch
++ bugfix/all/media-DiB7000M-add-pid-filtering.patch



More information about the Kernel-svn-changes mailing list