Pinnacle 801e users: Don't update!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you are a user of the Pinnacle 801e, the changes supporting this
device went in to the mainline on Sunday morning.  However, due to a
subsequent commit, the code will cause a kernel panic if you actually
try to use it.

I would have brought this to users' attention sooner, but I wasn't
expecting the two line patch I submitted Sunday night to sit in
Mauro's queue for four days (and counting).

If you're a Pinnacle 801e user, you can either hold off on updating or
use the attached patch.

Regards,

Devin

-- 
Devin J. Heitmueller
http://www.devinheitmueller.com
AIM: devinheitmueller
Put callback definition before function return and cleanup callback.

From: Devin Heitmueller <devin.heitmueller@xxxxxxxxx>

Fix a bug where the xc5000 callback was being set *after* the return call (essentially resulting in dead code).  

Also cleanup the callback function to detect unknown commands.

Bug was introduced during callback refactoring in hg 9051.

Signed-off-by: Devin Heitmueller <devin.heitmueller@xxxxxxxxx>

diff -r 8e6cda021e0e linux/drivers/media/dvb/dvb-usb/dib0700_devices.c
--- a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c	Fri Sep 26 11:29:03 2008 +0200
+++ b/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c	Sun Sep 28 23:07:28 2008 -0400
@@ -1181,11 +1181,16 @@ static int dib0700_xc5000_tuner_callback
 {
 	struct dvb_usb_adapter *adap = priv;
 
-	/* Reset the tuner */
-	dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0);
-	msleep(330); /* from Windows USB trace */
-	dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 1);
-	msleep(330); /* from Windows USB trace */
+	if (command == XC5000_TUNER_RESET) {
+		/* Reset the tuner */
+		dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0);
+		msleep(330); /* from Windows USB trace */
+		dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 1);
+		msleep(330); /* from Windows USB trace */
+	} else {
+		err("xc5000: unknown tuner callback command: %d\n", command);
+		return -EINVAL;
+	}
 
 	return 0;
 }
@@ -1197,12 +1202,12 @@ static struct xc5000_config s5h1411_xc50
 
 static int xc5000_tuner_attach(struct dvb_usb_adapter *adap)
 {
+	/* FIXME: generalize & move to common area */
+	adap->fe->callback = dib0700_xc5000_tuner_callback;
+
 	return dvb_attach(xc5000_attach, adap->fe, &adap->dev->i2c_adap,
 			  &s5h1411_xc5000_tunerconfig)
 		== NULL ? -ENODEV : 0;
-
-	/* FIXME: generalize & move to common area */
-	adap->fe->callback = dib0700_xc5000_tuner_callback;
 }
 
 /* DVB-USB and USB stuff follows */
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux