public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] V4L/DVB bug fixes
@ 2006-11-21 12:32 mchehab
  2006-11-21 12:38 ` [PATCH 2/5] V4L/DVB (4840): Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003 mchehab
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mchehab @ 2006-11-21 12:32 UTC (permalink / raw)
  To: torvalds; +Cc: linux-dvb-maintainer, video4linux-list, akpm, linux-kernel

Linus,

We've solved a few bugs at some drivers.

Please pull 'master' from:
        git://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git master

It contains the following:

Some DVBS boards are miss-identified. Those two patches fixes it:
   - Fix tuning on older budget DVBS cards.
   - Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003

A var is not initialized at DVB core frontend zigzag:
   - Fix uninitialised variable in dvb_frontend_swzigzag

Spin unlock missing:
   - Add missing spin_unlock to saa6588 decoder driver

Lack of proper releasing the module:
   - Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera

Cheers,
Mauro.

V4L/DVB development is hosted at http://linuxtv.org
---

 drivers/media/dvb/dvb-core/dvb_frontend.c    |    2 +-
 drivers/media/dvb/ttpci/budget.c             |    9 +++++++++
 drivers/media/video/et61x251/et61x251_core.c |    3 +--
 drivers/media/video/saa6588.c                |    4 +++-
 drivers/media/video/sn9c102/sn9c102_core.c   |    3 +--
 5 files changed, 15 insertions(+), 6 deletions(-)


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

* [PATCH 3/5] V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzag
  2006-11-21 12:32 [PATCH 0/5] V4L/DVB bug fixes mchehab
                   ` (2 preceding siblings ...)
  2006-11-21 12:38 ` [PATCH 5/5] V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera mchehab
@ 2006-11-21 12:38 ` mchehab
  2006-11-21 12:38 ` [PATCH 4/5] V4L/DVB (4849): Add missing spin_unlock to saa6588 decoder driver mchehab
  4 siblings, 0 replies; 6+ messages in thread
From: mchehab @ 2006-11-21 12:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-dvb-maintainer, Andrew de Quincey, Mauro Carvalho Chehab


From: Andrew de Quincey <adq_dvb@lidskialf.net>

Spotted by coverity/Adrian Bunk.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/dvb/dvb-core/dvb_frontend.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 53304e6..a2ab2ee 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -348,7 +348,7 @@ static int dvb_frontend_swzigzag_autotun
 
 static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
 {
-	fe_status_t s;
+	fe_status_t s = 0;
 	struct dvb_frontend_private *fepriv = fe->frontend_priv;
 
 	/* if we've got no parameters, just keep idling */


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

* [PATCH 5/5] V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera
  2006-11-21 12:32 [PATCH 0/5] V4L/DVB bug fixes mchehab
  2006-11-21 12:38 ` [PATCH 2/5] V4L/DVB (4840): Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003 mchehab
  2006-11-21 12:38 ` [PATCH 1/5] V4L/DVB (4831): Fix tuning on older budget DVBS cards mchehab
@ 2006-11-21 12:38 ` mchehab
  2006-11-21 12:38 ` [PATCH 3/5] V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzag mchehab
  2006-11-21 12:38 ` [PATCH 4/5] V4L/DVB (4849): Add missing spin_unlock to saa6588 decoder driver mchehab
  4 siblings, 0 replies; 6+ messages in thread
From: mchehab @ 2006-11-21 12:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-dvb-maintainer, Luca Risolia, Mauro Carvalho Chehab


From: Luca Risolia <luca.risolia@studio.unibo.it>

The patch fix bug 5748.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/et61x251/et61x251_core.c |    3 +--
 drivers/media/video/sn9c102/sn9c102_core.c   |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c
index f786ab1..86e353b 100644
--- a/drivers/media/video/et61x251/et61x251_core.c
+++ b/drivers/media/video/et61x251/et61x251_core.c
@@ -1182,8 +1182,6 @@ static void et61x251_release_resources(s
 	video_set_drvdata(cam->v4ldev, NULL);
 	video_unregister_device(cam->v4ldev);
 
-	usb_put_dev(cam->usbdev);
-
 	mutex_unlock(&et61x251_sysfs_lock);
 
 	kfree(cam->control_buffer);
@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode
 
 	if (cam->state & DEV_DISCONNECTED) {
 		et61x251_release_resources(cam);
+		usb_put_dev(cam->usbdev);
 		mutex_unlock(&cam->dev_mutex);
 		kfree(cam);
 		return 0;
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index a4702d3..42fb60d 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(st
 	video_set_drvdata(cam->v4ldev, NULL);
 	video_unregister_device(cam->v4ldev);
 
-	usb_put_dev(cam->usbdev);
-
 	mutex_unlock(&sn9c102_sysfs_lock);
 
 	kfree(cam->control_buffer);
@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode*
 
 	if (cam->state & DEV_DISCONNECTED) {
 		sn9c102_release_resources(cam);
+		usb_put_dev(cam->usbdev);
 		mutex_unlock(&cam->dev_mutex);
 		kfree(cam);
 		return 0;


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

* [PATCH 1/5] V4L/DVB (4831): Fix tuning on older budget DVBS cards.
  2006-11-21 12:32 [PATCH 0/5] V4L/DVB bug fixes mchehab
  2006-11-21 12:38 ` [PATCH 2/5] V4L/DVB (4840): Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003 mchehab
@ 2006-11-21 12:38 ` mchehab
  2006-11-21 12:38 ` [PATCH 5/5] V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera mchehab
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mchehab @ 2006-11-21 12:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-dvb-maintainer, Andrew de Quincey, Mauro Carvalho Chehab


From: Andrew de Quincey <adq_dvb@lidskialf.net>

Fixes to DISEQC on these cards inadvertently broke normal tone/voltage
signalling. This restores the necessary function.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/dvb/ttpci/budget.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c
index e58f039..e28617b 100644
--- a/drivers/media/dvb/ttpci/budget.c
+++ b/drivers/media/dvb/ttpci/budget.c
@@ -382,6 +382,7 @@ static void frontend_init(struct budget 
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
 			budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
+			budget->dvb_frontend->ops.set_tone = budget_set_tone;
 			break;
 		}
 		break;


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

* [PATCH 2/5] V4L/DVB (4840): Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003
  2006-11-21 12:32 [PATCH 0/5] V4L/DVB bug fixes mchehab
@ 2006-11-21 12:38 ` mchehab
  2006-11-21 12:38 ` [PATCH 1/5] V4L/DVB (4831): Fix tuning on older budget DVBS cards mchehab
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mchehab @ 2006-11-21 12:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-dvb-maintainer, Oliver Endriss, Mauro Carvalho Chehab


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

New module parameter diseqc_method for cards with subsystem-id 13c2:1003.
- 0: unreliable method, can be used by all board revisions (default)
- 1: reliable method, works for newer board layouts only
The parameter has no effect for cards with other subsystem-ids.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/dvb/ttpci/budget.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c
index e28617b..56f1c80 100644
--- a/drivers/media/dvb/ttpci/budget.c
+++ b/drivers/media/dvb/ttpci/budget.c
@@ -46,6 +46,10 @@ #include "tda826x.h"
 #include "lnbp21.h"
 #include "bsru6.h"
 
+static int diseqc_method;
+module_param(diseqc_method, int, 0444);
+MODULE_PARM_DESC(diseqc_method, "Select DiSEqC method for subsystem id 13c2:1003, 0: default, 1: more reliable (for newer revisions only)");
+
 static void Set22K (struct budget *budget, int state)
 {
 	struct saa7146_dev *dev=budget->dev;
@@ -382,7 +386,11 @@ static void frontend_init(struct budget 
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
 			budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
-			budget->dvb_frontend->ops.set_tone = budget_set_tone;
+			if (budget->dev->pci->subsystem_device == 0x1003 && diseqc_method == 0) {
+				budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
+				budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
+				budget->dvb_frontend->ops.set_tone = budget_set_tone;
+			}
 			break;
 		}
 		break;


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

* [PATCH 4/5] V4L/DVB (4849): Add missing spin_unlock to saa6588 decoder driver
  2006-11-21 12:32 [PATCH 0/5] V4L/DVB bug fixes mchehab
                   ` (3 preceding siblings ...)
  2006-11-21 12:38 ` [PATCH 3/5] V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzag mchehab
@ 2006-11-21 12:38 ` mchehab
  4 siblings, 0 replies; 6+ messages in thread
From: mchehab @ 2006-11-21 12:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-dvb-maintainer, Ira Snyder, Ira W. Snyder, Hans J. Koch,
	Mauro Carvalho Chehab


From: Ira Snyder <kernel@irasnyder.com>

Sparse noticed a lock imbalance in read_from_buf(). Further inspection shows
that the lock should not be held when the function exits.
This adds a spin_unlock_irqrestore(), so that every exit path of the
read_from_buf() function is consistent. The unlock was missing on an error
path.

Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Signed-off-by: Hans J. Koch <koch@hjk-az.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/saa6588.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c
index a81285c..7b9859c 100644
--- a/drivers/media/video/saa6588.c
+++ b/drivers/media/video/saa6588.c
@@ -212,8 +212,10 @@ static void read_from_buf(struct saa6588
 	if (rd_blocks > s->block_count)
 		rd_blocks = s->block_count;
 
-	if (!rd_blocks)
+	if (!rd_blocks) {
+		spin_unlock_irqrestore(&s->lock, flags);
 		return;
+	}
 
 	for (i = 0; i < rd_blocks; i++) {
 		if (block_to_user_buf(s, buf_ptr)) {


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

end of thread, other threads:[~2006-11-21 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-21 12:32 [PATCH 0/5] V4L/DVB bug fixes mchehab
2006-11-21 12:38 ` [PATCH 2/5] V4L/DVB (4840): Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003 mchehab
2006-11-21 12:38 ` [PATCH 1/5] V4L/DVB (4831): Fix tuning on older budget DVBS cards mchehab
2006-11-21 12:38 ` [PATCH 5/5] V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera mchehab
2006-11-21 12:38 ` [PATCH 3/5] V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzag mchehab
2006-11-21 12:38 ` [PATCH 4/5] V4L/DVB (4849): Add missing spin_unlock to saa6588 decoder driver mchehab

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