Commit 4a2cc126 authored by Johannes Stezenbach's avatar Johannes Stezenbach Committed by Linus Torvalds

[PATCH] dvb: DST: misc. fixes

removed unused module parameter session removed unnecesary delay for FTA cards
(Manu Abraham)
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b46dd445
...@@ -44,13 +44,7 @@ MODULE_PARM_DESC(debug, "debug messages, default is 0 (yes)"); ...@@ -44,13 +44,7 @@ MODULE_PARM_DESC(debug, "debug messages, default is 0 (yes)");
static unsigned int dst_addons; static unsigned int dst_addons;
module_param(dst_addons, int, 0644); module_param(dst_addons, int, 0644);
MODULE_PARM_DESC(dst_addons, "CA daughterboard, default is 0 (no)"); MODULE_PARM_DESC(dst_addons, "CA daughterboard, default is 0 (No addons)");
static unsigned int new_fw;
module_param(new_fw, int, 0644);
MODULE_PARM_DESC(new_fw, "Support for the new interface firmware, default 0");
#define dprintk if (debug) printk #define dprintk if (debug) printk
...@@ -787,7 +781,11 @@ static int dst_probe(struct dst_state *state) ...@@ -787,7 +781,11 @@ static int dst_probe(struct dst_state *state)
dprintk("%s: RDC 8820 RESET Failed.\n", __FUNCTION__); dprintk("%s: RDC 8820 RESET Failed.\n", __FUNCTION__);
return -1; return -1;
} }
if (dst_addons & DST_TYPE_HAS_CA)
msleep(4000); msleep(4000);
else
msleep(100);
if ((dst_comm_init(state)) < 0) { if ((dst_comm_init(state)) < 0) {
dprintk("%s: DST Initialization Failed.\n", __FUNCTION__); dprintk("%s: DST Initialization Failed.\n", __FUNCTION__);
return -1; return -1;
......
...@@ -40,23 +40,16 @@ static unsigned int debug = 1; ...@@ -40,23 +40,16 @@ static unsigned int debug = 1;
module_param(debug, int, 0644); module_param(debug, int, 0644);
MODULE_PARM_DESC(dst_ca_debug, "debug messages, default is 0 (yes)"); MODULE_PARM_DESC(dst_ca_debug, "debug messages, default is 0 (yes)");
static unsigned int session;
module_param(session, int, 0644);
MODULE_PARM_DESC(session, "Support for hardware that has multiple sessions, default 0");
static unsigned int new_ca;
module_param(new_ca, int, 0644);
MODULE_PARM_DESC(new_ca, "Support for the new CA interface firmware, default 0");
#define dprintk if (debug) printk #define dprintk if (debug) printk
/* Need some more work */
static int ca_set_slot_descr(void) static int ca_set_slot_descr(void)
{ {
/* We could make this more graceful ? */ /* We could make this more graceful ? */
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
/* Need some more work */
static int ca_set_pid(void) static int ca_set_pid(void)
{ {
/* We could make this more graceful ? */ /* We could make this more graceful ? */
...@@ -213,7 +206,7 @@ static int ca_get_slot_caps(struct dst_state *state, struct ca_caps *p_ca_caps, ...@@ -213,7 +206,7 @@ static int ca_get_slot_caps(struct dst_state *state, struct ca_caps *p_ca_caps,
return 0; return 0;
} }
/* Need some more work */
static int ca_get_slot_descr(struct dst_state *state, struct ca_msg *p_ca_message, void *arg) static int ca_get_slot_descr(struct dst_state *state, struct ca_msg *p_ca_message, void *arg)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -302,9 +295,9 @@ static int ca_get_message(struct dst_state *state, struct ca_msg *p_ca_message, ...@@ -302,9 +295,9 @@ static int ca_get_message(struct dst_state *state, struct ca_msg *p_ca_message,
return 0; return 0;
} }
static int handle_en50221_tag(struct ca_msg *p_ca_message, struct ca_msg *hw_buffer) static int handle_en50221_tag(struct dst_state *state, struct ca_msg *p_ca_message, struct ca_msg *hw_buffer)
{ {
if (session) { if (state->dst_hw_cap & DST_TYPE_HAS_SESSION) {
hw_buffer->msg[2] = p_ca_message->msg[1]; /* MSB */ hw_buffer->msg[2] = p_ca_message->msg[1]; /* MSB */
hw_buffer->msg[3] = p_ca_message->msg[2]; /* LSB */ hw_buffer->msg[3] = p_ca_message->msg[2]; /* LSB */
} }
...@@ -351,7 +344,7 @@ static int ca_set_pmt(struct dst_state *state, struct ca_msg *p_ca_message, stru ...@@ -351,7 +344,7 @@ static int ca_set_pmt(struct dst_state *state, struct ca_msg *p_ca_message, stru
if (verbose > 3) if (verbose > 3)
dprintk("%s, p_ca_message length %d (0x%x)\n", __FUNCTION__,p_ca_message->length,p_ca_message->length ); dprintk("%s, p_ca_message length %d (0x%x)\n", __FUNCTION__,p_ca_message->length,p_ca_message->length );
handle_en50221_tag(p_ca_message, hw_buffer); /* EN50221 tag */ handle_en50221_tag(state, p_ca_message, hw_buffer); /* EN50221 tag */
/* Handle the length field (variable) */ /* Handle the length field (variable) */
if (!(p_ca_message->msg[3] & 0x80)) { /* Length = 1 */ if (!(p_ca_message->msg[3] & 0x80)) { /* Length = 1 */
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#define DST_TYPE_HAS_FW_3 32 #define DST_TYPE_HAS_FW_3 32
#define DST_TYPE_HAS_FW_BUILD 64 #define DST_TYPE_HAS_FW_BUILD 64
/* Card capability list */ /* Card capability list */
#define DST_TYPE_HAS_MAC 1 #define DST_TYPE_HAS_MAC 1
...@@ -58,6 +57,7 @@ ...@@ -58,6 +57,7 @@
#define DST_TYPE_HAS_MOTO 16 #define DST_TYPE_HAS_MOTO 16
#define DST_TYPE_HAS_CA 32 #define DST_TYPE_HAS_CA 32
#define DST_TYPE_HAS_ANALOG 64 /* Analog inputs */ #define DST_TYPE_HAS_ANALOG 64 /* Analog inputs */
#define DST_TYPE_HAS_SESSION 128
#define RDC_8820_PIO_0_DISABLE 0 #define RDC_8820_PIO_0_DISABLE 0
...@@ -107,7 +107,7 @@ struct dst_state { ...@@ -107,7 +107,7 @@ struct dst_state {
unsigned long cur_jiff; unsigned long cur_jiff;
u8 k22; u8 k22;
fe_bandwidth_t bandwidth; fe_bandwidth_t bandwidth;
u8 dst_hw_cap; u32 dst_hw_cap;
u8 dst_fw_version; u8 dst_fw_version;
fe_sec_mini_cmd_t minicmd; fe_sec_mini_cmd_t minicmd;
u8 messages[256]; u8 messages[256];
...@@ -117,8 +117,8 @@ struct dst_types { ...@@ -117,8 +117,8 @@ struct dst_types {
char *device_id; char *device_id;
int offset; int offset;
u8 dst_type; u8 dst_type;
u64 type_flags; u32 type_flags;
u64 dst_feature; u32 dst_feature;
}; };
......
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