[PATCH] DVB-T NOVA-T USB stick Kernel oops patch

Vincent Labie <[email protected]> Tue, 7 Sep 2010 22:52:16 +0200
Newsgroups gmane.linux.drivers.dvb
Message-ID <[email protected]>
Hi,

During this summer, I tried to run a Hauppauge NOVA-T USB stick which used to work previously.
I tried with the Fedora13 default 2.6.33.x kernel v4l-dvb drivers and with the latest v4l-dvb cvs drivers with the same kernel oops result.

I appears that the issue come from a unaligned shared struct between the dib7000m and dib7000p driver, both struct beeing used by shared functions.
The patch to solve this issue is attached to this message (the solution is to put dismatching fields at the end of the struct).

Could someone with cvs access include this small patch in the v4l-dvb kernel and devel tree?

Thank you,
Vincent Labie

_______________________________________________
linux-dvb users mailing list
For V4L/DVB development, please use instead [email protected]
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
v4l-dvb-c9cb8918dcb2.diff (text/x-patch, 1.8 KB)
diff -Naur v4l-dvb-c9cb8918dcb2.orig/linux/drivers/media/dvb/frontends/dib7000m.h v4l-dvb-c9cb8918dcb2/linux/drivers/media/dvb/frontends/dib7000m.h
--- v4l-dvb-c9cb8918dcb2.orig/linux/drivers/media/dvb/frontends/dib7000m.h	2010-06-01 17:47:42.000000000 +0200
+++ v4l-dvb-c9cb8918dcb2/linux/drivers/media/dvb/frontends/dib7000m.h	2010-08-09 00:00:34.000000000 +0200
@@ -3,17 +3,15 @@
 
 #include "dibx000_common.h"
 
+	/* 100808 VLabie: Must match the dib7000p.h struct */
 struct dib7000m_config {
-	u8 dvbt_mode;
 	u8 output_mpeg2_in_188_bytes;
 	u8 hostbus_diversity;
 	u8 tuner_is_baseband;
-	u8 mobile_mode;
 	int (*update_lna) (struct dvb_frontend *, u16 agc_global);
 
 	u8 agc_config_count;
 	struct dibx000_agc_config *agc;
-
 	struct dibx000_bandwidth_config *bw;
 
 #define DIB7000M_GPIO_DEFAULT_DIRECTIONS 0xffff
@@ -31,9 +29,11 @@
 
 	u8 quartz_direct;
 
-	u8 input_clk_is_div_2;
-
 	int (*agc_control) (struct dvb_frontend *, u8 before);
+
+	u8 input_clk_is_div_2;
+	u8 mobile_mode;
+	u8 dvbt_mode;
 };
 
 #define DEFAULT_DIB7000M_I2C_ADDRESS 18
diff -Naur v4l-dvb-c9cb8918dcb2.orig/linux/drivers/media/dvb/frontends/dib7000p.h v4l-dvb-c9cb8918dcb2/linux/drivers/media/dvb/frontends/dib7000p.h
--- v4l-dvb-c9cb8918dcb2.orig/linux/drivers/media/dvb/frontends/dib7000p.h	2010-06-01 17:47:42.000000000 +0200
+++ v4l-dvb-c9cb8918dcb2/linux/drivers/media/dvb/frontends/dib7000p.h	2010-08-09 00:00:18.000000000 +0200
@@ -3,6 +3,7 @@
 
 #include "dibx000_common.h"
 
+	/* 100808 VLabie: Must match the dib7000m.h struct */
 struct dib7000p_config {
 	u8 output_mpeg2_in_188_bytes;
 	u8 hostbus_diversity;
@@ -28,11 +29,11 @@
 
 	u8 quartz_direct;
 
-	u8 spur_protect;
-
 	int (*agc_control) (struct dvb_frontend *, u8 before);
 
+	u8 spur_protect;
 	u8 output_mode;
+	u8 pad;
 };
 
 #define DEFAULT_DIB7000P_I2C_ADDRESS 18