Commit aecf0d5c authored by Michael Hunold's avatar Michael Hunold Committed by Linus Torvalds

[PATCH] Fix bugs in various DVB drivers

 - DVB networking uses big endian crc32, so change all occurences of
   crc32_le to crc32_be
 - fix usage of firmware location Kconfig option in tda1004x frontend
   driver
 - add missing VBI line decoding initialization to saa7113 code for
   av7110 driver
 - make av7110 firmware static and *not* __initdata, so recover_arm()
   can work in case the driver is compiled in statically
parent 2393fb2f
...@@ -105,7 +105,7 @@ void dvb_set_crc32(u8 *data, int length) ...@@ -105,7 +105,7 @@ void dvb_set_crc32(u8 *data, int length)
{ {
u32 crc; u32 crc;
crc = crc32_le(~0, data, length); crc = crc32_be(~0, data, length);
data[length] = (crc >> 24) & 0xff; data[length] = (crc >> 24) & 0xff;
data[length+1] = (crc >> 16) & 0xff; data[length+1] = (crc >> 16) & 0xff;
...@@ -116,7 +116,7 @@ void dvb_set_crc32(u8 *data, int length) ...@@ -116,7 +116,7 @@ void dvb_set_crc32(u8 *data, int length)
static u32 dvb_dmx_crc32 (struct dvb_demux_feed *f, const u8 *src, size_t len) static u32 dvb_dmx_crc32 (struct dvb_demux_feed *f, const u8 *src, size_t len)
{ {
return (f->feed.sec.crc_val = crc32_le (f->feed.sec.crc_val, src, len)); return (f->feed.sec.crc_val = crc32_be (f->feed.sec.crc_val, src, len));
} }
......
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "dvb_functions.h" #include "dvb_functions.h"
#ifndef CONFIG_TDA1004X_MC_LOCATION #ifndef DVB_TDA1004X_FIRMWARE_FILE
#define CONFIG_TDA1004X_MC_LOCATION "/etc/dvb/tda1004x.mc" #define DVB_TDA1004X_FIRMWARE_FILE "/etc/dvb/tda1004x.mc"
#endif #endif
static int tda1004x_debug = 0; static int tda1004x_debug = 0;
static char *tda1004x_firmware = CONFIG_TDA1004X_MC_LOCATION; static char *tda1004x_firmware = DVB_TDA1004X_FIRMWARE_FILE;
#define TDA10045H_ADDRESS 0x08 #define TDA10045H_ADDRESS 0x08
......
...@@ -4498,6 +4498,30 @@ static u8 saa7113_init_regs[] = { ...@@ -4498,6 +4498,30 @@ static u8 saa7113_init_regs[] = {
0x1d, 0x00, 0x1d, 0x00,
0x1e, 0x00, 0x1e, 0x00,
0x41, 0x77,
0x42, 0x77,
0x43, 0x77,
0x44, 0x77,
0x45, 0x77,
0x46, 0x77,
0x47, 0x77,
0x48, 0x77,
0x49, 0x77,
0x4a, 0x77,
0x4b, 0x77,
0x4c, 0x77,
0x4d, 0x77,
0x4e, 0x77,
0x4f, 0x77,
0x50, 0x77,
0x51, 0x77,
0x52, 0x77,
0x53, 0x77,
0x54, 0x77,
0x55, 0x77,
0x56, 0x77,
0x57, 0xff,
0xff 0xff
}; };
......
#include <asm/types.h> #include <asm/types.h>
u8 Dpram [] __initdata = { static u8 Dpram [] = {
0xe5, 0x9f, 0xf0, 0x1c, 0xe1, 0xb0, 0xf0, 0x0e, 0xe5, 0x9f, 0xf0, 0x1c, 0xe1, 0xb0, 0xf0, 0x0e,
0xe5, 0x9f, 0xf0, 0x18, 0xe2, 0x5e, 0xf0, 0x04, 0xe5, 0x9f, 0xf0, 0x18, 0xe2, 0x5e, 0xf0, 0x04,
0xe2, 0x5e, 0xf0, 0x08, 0xe1, 0xa0, 0x00, 0x00, 0xe2, 0x5e, 0xf0, 0x08, 0xe1, 0xa0, 0x00, 0x00,
...@@ -41,7 +41,7 @@ u8 Dpram [] __initdata = { ...@@ -41,7 +41,7 @@ u8 Dpram [] __initdata = {
}; };
u8 Root [] __initdata = { static u8 Root [] = {
0xb4, 0x90, 0x49, 0x18, 0x1c, 0x0b, 0x4a, 0x18, 0xb4, 0x90, 0x49, 0x18, 0x1c, 0x0b, 0x4a, 0x18,
0x1a, 0x50, 0x4f, 0x18, 0x1a, 0x79, 0x10, 0x8f, 0x1a, 0x50, 0x4f, 0x18, 0x1a, 0x79, 0x10, 0x8f,
0x21, 0x00, 0x2f, 0x00, 0xdd, 0x04, 0xcb, 0x10, 0x21, 0x00, 0x2f, 0x00, 0xdd, 0x04, 0xcb, 0x10,
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment