===================================================================
@@ -90,6 +90,8 @@
{
struct ngene *dev = (struct ngene *)data;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
while (dev->EventQueueReadIndex != dev->EventQueueWriteIndex) {
struct EVENT_BUFFER Event =
dev->EventQueue[dev->EventQueueReadIndex];
@@ -117,6 +119,8 @@
struct ngene_channel *chan = (struct ngene_channel *)data;
struct SBufferHeader *Cur = chan->nextBuffer;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
spin_lock_irq(&chan->state_lock);
while (Cur->ngeneBuffer.SR.Flags & 0x80) {
@@ -211,6 +215,8 @@
u32 i = MAX_STREAM;
u8 *tmpCmdDoneByte;
+ dprintk (KERN_DEBUG DEVICE_NAME ">: %s IRQ %i\n", __func__, irq);
+
if (dev->BootFirmware) {
icounts = ngreadl(NGENE_INT_COUNTS);
if (icounts != dev->icounts) {
@@ -220,6 +226,10 @@
dev->icounts = icounts;
rc = IRQ_HANDLED;
}
+ if ( rc != IRQ_HANDLED ) {
+ dprintk("Unhandled IRQ %i occured\n", irq);
+ }
+ dprintk (KERN_DEBUG DEVICE_NAME "<: %s Return dev->BootFirmware \n", __func__);
return rc;
}
@@ -260,7 +270,12 @@
dev->EventBuffer->EventStatus &= ~0x80;
tasklet_schedule(&dev->event_tasklet);
rc = IRQ_HANDLED;
- }
+ } else {
+ if( i == 0) {
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s IRQ handler does not execute any method \n", __func__);
+ }
+ }
+
while (i > 0) {
i--;
@@ -278,6 +293,8 @@
}
spin_unlock(&dev->channel[i].state_lock);
}
+
+ dprintk (KERN_DEBUG DEVICE_NAME "< : %s return IRQ_HANDLED \n", __func__);
/* Request might have been processed by a previous call. */
return IRQ_HANDLED;
@@ -291,6 +308,8 @@
{
u8 buf[8], *b;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
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],
@@ -315,6 +334,8 @@
int ret;
u8 *tmpCmdDoneByte;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
dev->cmd_done = 0;
if (com->cmd.hdr.Opcode == CMD_FWLOAD_PREPARE) {
@@ -394,6 +415,8 @@
{
int result;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
down(&dev->cmd_mutex);
result = ngene_command_mutex(dev, com);
up(&dev->cmd_mutex);
@@ -419,6 +442,8 @@
{
struct ngene_command com;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
com.cmd.hdr.Opcode = CMD_I2C_READ;
com.cmd.hdr.Length = outlen + 3;
com.cmd.I2CRead.Device = adr << 1;
@@ -446,6 +471,8 @@
{
struct ngene_command com;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
#if 0
/* Probing by writing 0 bytes does not work */
if (!outlen)
@@ -475,6 +502,8 @@
u32 cleft;
struct ngene_command com;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
com.cmd.hdr.Opcode = CMD_FWLOAD_PREPARE;
com.cmd.hdr.Length = 0;
com.in_len = 0;
@@ -583,6 +612,8 @@
{
struct ngene_command com;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
com.cmd.hdr.Opcode = CMD_CONFIGURE_BUFFER;
com.cmd.hdr.Length = 1;
com.cmd.ConfigureBuffers.config = config;
@@ -598,6 +629,8 @@
{
struct ngene_command com;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
com.cmd.hdr.Opcode = CMD_CONFIGURE_FREE_BUFFER;
com.cmd.hdr.Length = 6;
memcpy(&com.cmd.ConfigureBuffers.config, config, 6);
@@ -614,6 +647,8 @@
{
struct ngene_command com;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
com.cmd.hdr.Opcode = CMD_SET_GPIO_PIN;
com.cmd.hdr.Length = 1;
com.cmd.SetGpioPin.select = select | (level << 7);
@@ -708,6 +743,8 @@
{
u32 *ptr = Buffer;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
memset(Buffer, 0xff, Length);
while (Length > 0) {
if (Flags & DF_SWAP32)
@@ -735,6 +772,8 @@
{
u8 val;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
do {
msleep(1);
spin_lock_irq(&chan->state_lock);
@@ -747,6 +786,8 @@
{
struct SBufferHeader *Cur = chan->nextBuffer;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
do {
memset(&Cur->ngeneBuffer.SR, 0, sizeof(Cur->ngeneBuffer.SR));
if (chan->mode & NGENE_IO_TSOUT)
@@ -784,6 +825,8 @@
u16 BsSPI = ((stream & 1) ? 0x9800 : 0x9700);
u16 BsSDO = 0x9B00;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
/* down(&dev->stream_mutex); */
while (down_trylock(&dev->stream_mutex)) {
printk(KERN_INFO DEVICE_NAME ": SC locked\n");
@@ -954,6 +997,8 @@
static void ngene_i2c_set_bus(struct ngene *dev, int bus)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
if (!(dev->card_info->i2c_access & 2))
return;
if (dev->i2c_current_bus == bus)
@@ -980,28 +1025,46 @@
(struct ngene_channel *)i2c_get_adapdata(adapter);
struct ngene *dev = chan->dev;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
down(&dev->i2c_switch_mutex);
+ dprintk (KERN_DEBUG DEVICE_NAME ": > ngene_i2x_set_bus \n");
ngene_i2c_set_bus(dev, chan->number);
+ dprintk (KERN_DEBUG DEVICE_NAME ": < ngene_i2x_set_bus \n");
- if (num == 2 && msg[1].flags & I2C_M_RD && !(msg[0].flags & I2C_M_RD))
+ if (num == 2 && msg[1].flags & I2C_M_RD && !(msg[0].flags & I2C_M_RD)) {
+ dprintk (KERN_DEBUG DEVICE_NAME "> : num = 2 ngene_command_i2c_read \n");
if (!ngene_command_i2c_read(dev, msg[0].addr,
msg[0].buf, msg[0].len,
- msg[1].buf, msg[1].len, 0))
- goto done;
+ msg[1].buf, msg[1].len, 0)) {
+ dprintk (KERN_DEBUG DEVICE_NAME "<: ngene_command_i2c_read> ngene_i2x_set_bus \n");
+ goto done;
+ }
+ }
- if (num == 1 && !(msg[0].flags & I2C_M_RD))
+ if (num == 1 && !(msg[0].flags & I2C_M_RD)) {
+ dprintk (KERN_DEBUG DEVICE_NAME ": num = 1 ngene_command_i2c_write \n");
if (!ngene_command_i2c_write(dev, msg[0].addr,
- msg[0].buf, msg[0].len))
+ msg[0].buf, msg[0].len)) {
+ dprintk (KERN_DEBUG DEVICE_NAME ": num = 1 ngene_command_i2c_write \n");
goto done;
- if (num == 1 && (msg[0].flags & I2C_M_RD))
+ }
+ }
+ if (num == 1 && (msg[0].flags & I2C_M_RD)) {
+ dprintk (KERN_DEBUG DEVICE_NAME ">: read num = 1 ngene_command_i2c_write \n");
if (!ngene_command_i2c_read(dev, msg[0].addr, NULL, 0,
- msg[0].buf, msg[0].len, 0))
+ msg[0].buf, msg[0].len, 0)) {
+ dprintk (KERN_DEBUG DEVICE_NAME "<: read num = 1 ngene_command_i2c_write \n");
goto done;
+ }
+ }
up(&dev->i2c_switch_mutex);
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s failed \n", __func__);
return -EIO;
done:
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s succeeded \n", __func__);
up(&dev->i2c_switch_mutex);
return num;
}
@@ -1042,6 +1105,8 @@
static u32 ngene_i2c_functionality(struct i2c_adapter *adap)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
return I2C_FUNC_SMBUS_EMUL;
}
@@ -1062,6 +1127,8 @@
{
struct i2c_adapter *adap = &(dev->channel[dev_nr].i2c_adapter);
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
i2c_set_adapdata(adap, &(dev->channel[dev_nr]));
#ifdef I2C_CLASS_TV_DIGITAL
adap->class = I2C_CLASS_TV_DIGITAL | I2C_CLASS_TV_ANALOG;
@@ -1739,6 +1806,8 @@
static void swap_buffer(u32 *p, u32 len)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
while (len) {
*p = swab32(*p);
p++;
@@ -1783,6 +1852,8 @@
{
struct ngene_channel *chan = priv;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
#if 0
printk(KERN_INFO DEVICE_NAME ": tsin %08x %02x %02x %02x %02x\n",
len, ((u8 *) buf)[512 * 188], ((u8 *) buf)[0],
@@ -1805,6 +1876,8 @@
struct ngene *dev = chan->dev;
u32 alen;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
alen = dvb_ringbuffer_avail(&dev->tsout_rbuf);
alen -= alen % 188;
@@ -1837,6 +1910,8 @@
struct ngene *dev = chan->dev;
int ret;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
/*
printk(KERN_INFO DEVICE_NAME ": st %d\n", state);
msleep(100);
@@ -1910,6 +1985,8 @@
{
struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
struct ngene_channel *chan = dvbdmx->priv;
+
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
#if 0
struct ngene *dev = chan->dev;
@@ -1952,6 +2029,8 @@
{
struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
struct ngene_channel *chan = dvbdmx->priv;
+
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
#if 0
struct ngene *dev = chan->dev;
@@ -2220,6 +2299,8 @@
int (*stop_feed)(struct dvb_demux_feed *),
void *priv)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
dvbdemux->priv = priv;
dvbdemux->filternum = 256;
@@ -2241,6 +2322,8 @@
{
int ret;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
dmxdev->filternum = 256;
dmxdev->demux = &dvbdemux->dmx;
dmxdev->capabilities = 0;
@@ -2348,6 +2431,8 @@
struct SBufferHeader *Cur = rb->Head;
u32 j;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
if (!Cur)
return;
@@ -2379,6 +2464,8 @@
int j;
struct SBufferHeader *Cur = tb->Head;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
if (!rb->Head)
return;
free_ringbuffer(dev, rb);
@@ -2395,6 +2482,8 @@
u32 i;
struct ngene_channel *chan;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
for (i = STREAM_VIDEOIN1; i < MAX_STREAM; i++) {
chan = &dev->channel[i];
free_idlebuffer(dev, &chan->TSIdleBuffer, &chan->TSRingBuffer);
@@ -2430,6 +2519,8 @@
u64 PARingBufferNext;
struct SBufferHeader *Cur, *Next;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
descr->Head = NULL;
descr->MemSize = 0;
descr->PAHead = 0;
@@ -2489,6 +2580,8 @@
struct SBufferHeader *Cur;
void *SCListMem;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
if (SCListMemSize < 4096)
SCListMemSize = 4096;
@@ -2594,6 +2687,9 @@
/* Point to first buffer entry */
struct SBufferHeader *Cur = pRingBuffer->Head;
int i;
+
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
/* Loop thru all buffer and set Buffer 2 pointers to TSIdlebuffer */
for (i = 0; i < n; i++) {
Cur->Buffer2 = pIdleBuffer->Head->Buffer1;
@@ -2716,6 +2812,8 @@
{
int status = 0, i;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
dev->FWInterfaceBuffer = pci_alloc_consistent(dev->pci_dev, 4096,
&dev->PAFWInterfaceBuffer);
if (!dev->FWInterfaceBuffer)
@@ -2805,6 +2903,8 @@
static void ngene_release_buffers(struct ngene *dev)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
if (dev->iomem)
iounmap(dev->iomem);
free_common_buffers(dev);
@@ -2816,6 +2916,8 @@
static int ngene_get_buffers(struct ngene *dev)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
if (AllocCommonBuffers(dev))
return -ENOMEM;
if (dev->card_info->io_type[4] & NGENE_IO_TSOUT) {
@@ -2849,6 +2951,8 @@
{
int i;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
tasklet_init(&dev->event_tasklet, event_tasklet, (unsigned long)dev);
memset_io(dev->iomem + 0xc000, 0x00, 0x220);
@@ -2878,6 +2982,8 @@
char *fw_name;
int err, version;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
version = dev->card_info->fw_version;
switch (version) {
@@ -2922,6 +3028,8 @@
static void ngene_stop(struct ngene *dev)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
down(&dev->cmd_mutex);
i2c_del_adapter(&(dev->channel[0].i2c_adapter));
i2c_del_adapter(&(dev->channel[1].i2c_adapter));
@@ -2940,6 +3048,8 @@
int stat;
int i;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
pci_set_master(dev->pci_dev);
ngene_init(dev);
@@ -3452,6 +3562,8 @@
chan->dev->card_info->tuner_config[chan->number];
struct stv6110x_devctl *ctl;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
ctl = dvb_attach(stv6110x_attach, chan->fe, tunerconf,
&chan->i2c_adapter);
if (ctl == NULL) {
@@ -3569,6 +3681,8 @@
struct stv090x_config *feconf = (struct stv090x_config *)
chan->dev->card_info->fe_config[chan->number];
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
chan->fe = dvb_attach(stv090x_attach,
feconf,
&chan->i2c_adapter,
@@ -3600,6 +3714,8 @@
struct ngene_info *ni = dev->card_info;
int io = ni->io_type[chan->number];
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
#ifdef COMMAND_TIMEOUT_WORKAROUND
if (chan->running)
set_transfer(chan, 0);
@@ -3652,6 +3768,8 @@
struct ngene_info *ni = dev->card_info;
int io = ni->io_type[nr];
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
tasklet_init(&chan->demux_tasklet, demux_tasklet, (unsigned long)chan);
chan->users = 0;
chan->type = io;
@@ -3741,6 +3859,8 @@
{
int i, j;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
for (i = 0; i < MAX_STREAM; i++) {
if (init_channel(&dev->channel[i]) < 0) {
for (j = i - 1; j >= 0; j--)
@@ -3760,6 +3880,8 @@
struct ngene *dev = (struct ngene *)pci_get_drvdata(pdev);
int i;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
tasklet_kill(&dev->event_tasklet);
for (i = MAX_STREAM - 1; i >= 0; i--)
release_channel(&dev->channel[i]);
@@ -3775,6 +3897,8 @@
struct ngene *dev;
int stat = 0;
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
if (pci_enable_device(pci_dev) < 0)
return -ENODEV;
@@ -4306,6 +4430,8 @@
static pci_ers_result_t ngene_error_detected(struct pci_dev *dev,
enum pci_channel_state state)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
printk(KERN_ERR DEVICE_NAME ": PCI error\n");
if (state == pci_channel_io_perm_failure)
return PCI_ERS_RESULT_DISCONNECT;
@@ -4316,6 +4442,8 @@
static pci_ers_result_t ngene_link_reset(struct pci_dev *dev)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
printk(KERN_INFO DEVICE_NAME ": link reset\n");
return 0;
}
@@ -4328,6 +4456,8 @@
static void ngene_resume(struct pci_dev *dev)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
printk(KERN_INFO DEVICE_NAME ": resume\n");
}
@@ -4353,6 +4483,8 @@
static __init int module_init_ngene(void)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
printk(KERN_INFO
"nGene PCIE bridge driver, Copyright (C) 2005-2007 Micronas\n");
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
@@ -4364,6 +4496,8 @@
static __exit void module_exit_ngene(void)
{
+ dprintk (KERN_DEBUG DEVICE_NAME ": %s\n", __func__);
+
pci_unregister_driver(&ngene_pci_driver);
}
===================================================================
@@ -404,6 +404,7 @@
if (fe->ops.read_status)
fe->ops.read_status(fe, &s);
if (s != fepriv->status) {
+ dprintk("dvb_frontend_swzigzag add_event frontend status");
dvb_frontend_add_event(fe, s);
fepriv->status = s;
}
@@ -473,6 +474,7 @@
if (retval < 0) {
return;
} else if (retval) {
+ dprintk(" OK, if we've run out of trials at the fast speed. -> Slow speed \n");
/* OK, if we've run out of trials at the fast speed.
* Drop back to slow for the _next_ attempt */
fepriv->state = FESTATE_SEARCHING_SLOW;
@@ -634,24 +636,35 @@
*/
if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) {
if (fe->ops.search) {
- fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters);
+ dprintk(">search, status\n");
/* We did do a search as was requested, the flags are
* now unset as well and has the flags wrt to search.
*/
+ fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters);
+ dprintk("<search, status\n");
+
} else {
fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN;
}
}
/* Track the carrier if the search was successful */
if (fepriv->algo_status == DVBFE_ALGO_SEARCH_SUCCESS) {
- if (fe->ops.track)
+ if (fe->ops.track) {
+ dprintk(">track, status\n");
fe->ops.track(fe, &fepriv->parameters);
+ dprintk("<track, status\n");
+ }
} else {
fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
fepriv->delay = HZ / 2;
}
- fe->ops.read_status(fe, &s);
+
+ dprintk(">read status, status\n");
+ fe->ops.read_status(fe, &s);
+ dprintk("<read status, status\n");
+
if (s != fepriv->status) {
+ dprintk("dvb_frontend_thread, status\n");
dvb_frontend_add_event(fe, s); /* update event list */
fepriv->status = s;
if (!(s & FE_HAS_LOCK)) {
@@ -1506,23 +1519,34 @@
if (fepriv->exit)
return -ENODEV;
+ dprintk(" not fepriv->exit %s (%d)\n", __func__, _IOC_NR(cmd));
+
if ((file->f_flags & O_ACCMODE) == O_RDONLY &&
(_IOC_DIR(cmd) != _IOC_READ || cmd == FE_GET_EVENT ||
cmd == FE_DISEQC_RECV_SLAVE_REPLY))
return -EPERM;
+ dprintk(" >down interruptable %s (%d)\n", __func__, _IOC_NR(cmd));
if (down_interruptible (&fepriv->sem))
return -ERESTARTSYS;
+ dprintk(" <down interruptable %s (%d)\n", __func__, _IOC_NR(cmd));
- if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY))
+ if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) {
+ dprintk(" dvb_frontend_ioctl_properties %s (%d)\n", __func__, _IOC_NR(cmd));
err = dvb_frontend_ioctl_properties(inode, file, cmd, parg);
+ }
else {
+ dprintk(" dvb_frontend_ioctl_legacy %s (%d)\n", __func__, _IOC_NR(cmd));
fe->dtv_property_cache.state = DTV_UNDEFINED;
err = dvb_frontend_ioctl_legacy(inode, file, cmd, parg);
}
+ dprintk("> up %s (%d)\n", __func__, _IOC_NR(cmd));
+
up(&fepriv->sem);
- return err;
+ dprintk("<up %s (%d)\n", __func__, _IOC_NR(cmd));
+
+ return err;
}
static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
@@ -1870,6 +1894,7 @@
fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
dvb_frontend_wakeup(fe);
+ dprintk("dvb_frontend_add_event, before wakeup");
dvb_frontend_add_event(fe, 0);
fepriv->status = 0;
err = 0;
@@ -2018,17 +2043,24 @@
if ((file->f_flags & O_ACCMODE) != O_RDONLY)
fepriv->release_jiffies = jiffies;
- ret = dvb_generic_release (inode, file);
+ ret = dvb_generic_release (inode, file);
if (dvbdev->users == -1) {
if (fepriv->exit == 1) {
+ dprintk (" >Internal cleanup when closin DVB device %s\n", __func__);
fops_put(file->f_op);
file->f_op = NULL;
wake_up(&dvbdev->wait_queue);
+ dprintk (" <Internal cleanup when closin DVB device %s\n", __func__);
}
- if (fe->ops.ts_bus_ctrl)
+ if (fe->ops.ts_bus_ctrl) {
+ dprintk (" >Invoke fe->ops.ts_bus_ctrl %s\n", __func__);
fe->ops.ts_bus_ctrl(fe, 0);
- }
+ dprintk (" >Invoke fe->ops.ts_bus_ctrl %s\n", __func__);
+ }
+ } else {
+ dprintk (" !NOT Close DVB device %s\n", __func__);
+ }
return ret;
}