DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+#define COMMAND_TIMEOUT_WORKAROUND
+
#define dprintk if (debug) printk
#define DEVICE_NAME "ngene"
/* nGene command interface **************************************************/
/****************************************************************************/
+static void dump_command_io(struct ngene *dev)
+{
+ u8 buf[8], *b;
+
+ ngcpyfrom(buf, HOST_TO_NGENE, 8);
+ printk(KERN_ERR "host_to_ngene (%04x): %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ HOST_TO_NGENE, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
+
+ ngcpyfrom(buf, NGENE_TO_HOST, 8);
+ printk(KERN_ERR "ngene_to_host (%04x): %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ NGENE_TO_HOST, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
+
+ b = dev->hosttongene;
+ printk(KERN_ERR "dev->hosttongene (%p): %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ b, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7]);
+
+ b = dev->ngenetohost;
+ printk(KERN_ERR "dev->ngenetohost (%p): %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ b, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7]);
+}
+
static int ngene_command_mutex(struct ngene *dev, struct ngene_command *com)
{
int ret;
printk(KERN_ERR DEVICE_NAME
": Command timeout cmd=%02x prev=%02x\n",
com->cmd.hdr.Opcode, dev->prev_cmd);
+ dump_command_io(dev);
return -1;
}
if (com->cmd.hdr.Opcode == CMD_FWLOAD_FINISH)
struct ngene_channel *chan = priv;
- dvb_dmx_swfilter(&chan->demux, buf, len);
+#ifdef COMMAND_TIMEOUT_WORKAROUND
+ if (chan->users > 0)
+#endif
+ dvb_dmx_swfilter(&chan->demux, buf, len);
return 0;
}
struct ngene *dev = chan->dev;
int ret;
- /*
- if (chan->running)
- return;
- */
-
/*
printk(KERN_INFO DEVICE_NAME ": st %d\n", state);
msleep(100);
struct ngene_channel *chan = dvbdmx->priv;
if (chan->users == 0) {
- set_transfer(chan, 1);
+#ifdef COMMAND_TIMEOUT_WORKAROUND
+ if (!chan->running)
+#endif
+ set_transfer(chan, 1);
/* msleep(10); */
}
if (--chan->users)
return chan->users;
+#ifndef COMMAND_TIMEOUT_WORKAROUND
set_transfer(chan, 0);
+#endif
return 0;
}
struct ngene_info *ni = dev->card_info;
int io = ni->io_type[chan->number];
+#ifdef COMMAND_TIMEOUT_WORKAROUND
+ if (chan->running)
+ set_transfer(chan, 0);
+#endif
+
tasklet_kill(&chan->demux_tasklet);
if (io & (NGENE_IO_TSIN | NGENE_IO_TSOUT)) {
.tuner_config = {&tuner_mps2_0, &tuner_mps2_1},
.lnb = {0x0b, 0x08},
.tsf = {3, 3},
- .fw_version = 17,
+ .fw_version = 15,
};
static struct ngene_info ngene_info_satixs2 = {
.tuner_config = {&tuner_mps2_0, &tuner_mps2_1},
.lnb = {0x0b, 0x08},
.tsf = {3, 3},
- .fw_version = 17,
+ .fw_version = 15,
};
/****************************************************************************/