V4L/DVB: ngene: Make command timeout workaround configurable
Make command timeout workaround configurable, activate it for firmware version <= 17. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
4387418129
commit
5a2a1848a7
|
@ -53,8 +53,6 @@ MODULE_PARM_DESC(debug, "Print debugging information.");
|
|||
|
||||
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
||||
|
||||
#define COMMAND_TIMEOUT_WORKAROUND
|
||||
|
||||
#define dprintk if (debug) printk
|
||||
|
||||
#define ngwriteb(dat, adr) writeb((dat), (char *)(dev->iomem + (adr)))
|
||||
|
@ -1252,14 +1250,17 @@ static int ngene_load_firm(struct ngene *dev)
|
|||
version = 15;
|
||||
size = 23466;
|
||||
fw_name = "ngene_15.fw";
|
||||
dev->cmd_timeout_workaround = true;
|
||||
break;
|
||||
case 16:
|
||||
size = 23498;
|
||||
fw_name = "ngene_16.fw";
|
||||
dev->cmd_timeout_workaround = true;
|
||||
break;
|
||||
case 17:
|
||||
size = 24446;
|
||||
fw_name = "ngene_17.fw";
|
||||
dev->cmd_timeout_workaround = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1410,10 +1411,8 @@ static void release_channel(struct ngene_channel *chan)
|
|||
struct ngene_info *ni = dev->card_info;
|
||||
int io = ni->io_type[chan->number];
|
||||
|
||||
#ifdef COMMAND_TIMEOUT_WORKAROUND
|
||||
if (chan->running)
|
||||
if (chan->dev->cmd_timeout_workaround && chan->running)
|
||||
set_transfer(chan, 0);
|
||||
#endif
|
||||
|
||||
tasklet_kill(&chan->demux_tasklet);
|
||||
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
|
||||
#include "ngene.h"
|
||||
|
||||
#define COMMAND_TIMEOUT_WORKAROUND
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* COMMAND API interface ****************************************************/
|
||||
|
@ -69,9 +67,7 @@ void *tsin_exchange(void *priv, void *buf, u32 len, u32 clock, u32 flags)
|
|||
struct ngene_channel *chan = priv;
|
||||
|
||||
|
||||
#ifdef COMMAND_TIMEOUT_WORKAROUND
|
||||
if (chan->users > 0)
|
||||
#endif
|
||||
dvb_dmx_swfilter(&chan->demux, buf, len);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -106,11 +102,8 @@ int ngene_start_feed(struct dvb_demux_feed *dvbdmxfeed)
|
|||
struct ngene_channel *chan = dvbdmx->priv;
|
||||
|
||||
if (chan->users == 0) {
|
||||
#ifdef COMMAND_TIMEOUT_WORKAROUND
|
||||
if (!chan->running)
|
||||
#endif
|
||||
if (!chan->dev->cmd_timeout_workaround || !chan->running)
|
||||
set_transfer(chan, 1);
|
||||
/* msleep(10); */
|
||||
}
|
||||
|
||||
return ++chan->users;
|
||||
|
@ -124,9 +117,8 @@ int ngene_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
|
|||
if (--chan->users)
|
||||
return chan->users;
|
||||
|
||||
#ifndef COMMAND_TIMEOUT_WORKAROUND
|
||||
set_transfer(chan, 0);
|
||||
#endif
|
||||
if (!chan->dev->cmd_timeout_workaround)
|
||||
set_transfer(chan, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -726,6 +726,7 @@ struct ngene {
|
|||
u32 fw_interface_version;
|
||||
u32 icounts;
|
||||
bool msi_enabled;
|
||||
bool cmd_timeout_workaround;
|
||||
|
||||
u8 *CmdDoneByte;
|
||||
int BootFirmware;
|
||||
|
|
Loading…
Reference in a new issue