[PATCH 9/9] TTUSB-Budget DVB driver update

From: Michael Hunold
Date: Mon Feb 23 2004 - 16:22:30 EST


- [DVB] dvb-ttusb-budget: Fixed i2c code to detect nearly all errors
- [DVB] dvb-ttusb-budget: Added "V 2.1" to prevent warning message on driver load
- [DVB] dvb-ttusb-budget: Some printks turned into dprintks
- [DVB] dvb-ttusb-budget: Removed __initdata. It is now possible in kernel 2.6 to compile the DVB drivers into a monolithic kernel.
- [DVB] dvb-ttusb-budget: Fix for failing urb submission under 2.6 kernels
diff -uNrwB --new-file xx-linux-2.6.3/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c linux-2.6.3.p/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
--- xx-linux-2.6.3/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2004-01-09 09:22:40.000000000 +0100
+++ linux-2.6.3.p/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2004-02-02 19:28:30.000000000 +0100
@@ -29,6 +29,7 @@
#include <linux/dvb/dmx.h>
#include <linux/pci.h>

+#include "dvb_usb_compat.h"
#include "dvb_functions.h"

/*
@@ -223,6 +224,9 @@

err = ttusb_result(ttusb, b, 0x20);

+ /* check if the i2c transaction was successful */
+ if ((snd_len != b[5]) || (rcv_len != b[6])) return -EREMOTEIO;
+
if (rcv_len > 0) {

if (err || b[0] != 0x55 || b[1] != id) {
@@ -273,7 +277,7 @@
snd_buf, snd_len, rcv_buf, rcv_len);

if (err < rcv_len) {
- printk("%s: i == %i\n", __FUNCTION__, i);
+ dprintk("%s: i == %i\n", __FUNCTION__, i);
break;
}

@@ -432,7 +436,8 @@
get_version[7], get_version[8]);

if (memcmp(get_version + 4, "V 0.0", 5) &&
- memcmp(get_version + 4, "V 1.1", 5)) {
+ memcmp(get_version + 4, "V 1.1", 5) &&
+ memcmp(get_version + 4, "V 2.1", 5)) {
printk
("%s: unknown STC version %c%c%c%c%c, please report!\n",
__FUNCTION__, get_version[4], get_version[5],
@@ -932,7 +953,7 @@
struct ttusb *ttusb = (struct ttusb *) dvbdmxfeed->demux;
struct ttusb_channel *channel;

- printk("ttusb_start_feed\n");
+ dprintk("ttusb_start_feed\n");

switch (dvbdmxfeed->type) {
case DMX_TYPE_TS:
@@ -1004,7 +1025,7 @@

static int ttusb_setup_interfaces(struct ttusb *ttusb)
{
- usb_reset_configuration(ttusb->dev);
+ usb_set_configuration(ttusb->dev, 1);
usb_set_interface(ttusb->dev, 1, 1);

ttusb->bulk_out_pipe = usb_sndbulkpipe(ttusb->dev, 1);
@@ -1186,7 +1238,7 @@
static struct usb_device_id ttusb_table[] = {
{USB_DEVICE(0xb48, 0x1003)},
{USB_DEVICE(0xb48, 0x1004)}, /* to be confirmed ???? */
- {USB_DEVICE(0xb48, 0x1005)}, /* to be confirmed ???? */
+ {USB_DEVICE(0xb48, 0x1005)},
{}
};

diff -uNrwB --new-file xx-linux-2.6.3/drivers/media/dvb/ttusb-budget/dvb-ttusb-dspbootcode.h linux-2.6.3.p/drivers/media/dvb/ttusb-budget/dvb-ttusb-dspbootcode.h
--- xx-linux-2.6.3/drivers/media/dvb/ttusb-budget/dvb-ttusb-dspbootcode.h 2003-12-18 12:54:50.000000000 +0100
+++ linux-2.6.3.p/drivers/media/dvb/ttusb-budget/dvb-ttusb-dspbootcode.h 2004-02-02 19:28:30.000000000 +0100
@@ -1,7 +1,7 @@

#include <asm/types.h>

-u8 dsp_bootcode [] __initdata = {
+u8 dsp_bootcode [] = {
0x08, 0xaa, 0x00, 0x18, 0x00, 0x03, 0x08, 0x00,
0x00, 0x10, 0x00, 0x00, 0x01, 0x80, 0x18, 0x5f,
0x00, 0x00, 0x01, 0x80, 0x77, 0x18, 0x2a, 0xeb,


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/