Bug 8875 - When playing dvb-t programs, usb dongle is unplugged out. dvb-core module ( dvb_unregister_frontend function ) can't release successfully.
Summary: When playing dvb-t programs, usb dongle is unplugged out. dvb-core module ( d...
Status: CLOSED OBSOLETE
Alias: None
Product: v4l-dvb
Classification: Unclassified
Component: dvb-core (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: dvb-core
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-10 00:37 UTC by chialing.lu
Modified: 2012-05-17 14:42 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.22.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description chialing.lu 2007-08-10 00:37:27 UTC
Most recent kernel where this bug did not occur: 2.6.22.1
Distribution:
Hardware Environment: IBM X32 notebook
Software Environment:Fedora 7 + xine-lib-1.1.7
Problem Description:
When playing dvb-t programs, usb dongle is plugged out. 
dvb-core module ( dvb_unregister_frontend function ) can't release successfully. 
Then release function in dvb_frontend_ops isn't called.
 

Steps to reproduce:When playing dvb-t programs, plug in and plug out dvb usb dongle 10-20 times.
Comment 1 chialing.lu 2007-08-13 00:21:04 UTC
whne driver doesn't unload successfully , hang in dvb_unregister_frontend() function 

dvb_unregister_frontend ()
{
……………………..
	if(dvbdev->users< -1)  
		wait_event(   ,user==-1)
……………………..
}
Although dvb_frontend_release() function added 1 to dvbdev->user and wake_up event, dvb_unregister_frontend cann't go ahead.
Comment 2 chialing.lu 2007-08-30 06:00:13 UTC
static int dvb_frontend_open(struct inode *inode, struct file *file)
{ 
   //********************important*************************
   if(fepriv->exit) return -ENODEV;   //add this in the first line.
   if((ret = dvb_generic_opne.........
   ........ 
}
To aviod dvbdev->users++ in dvb_frontend_open() after dvb_frontend_release() and before wait_event wake up in dvb_unregister_frontend (). It will cause wait_event NEVER be wake up---dvbdev->users is always equal to -2.
Comment 3 chialing.lu 2007-08-30 06:11:03 UTC
This is my solution. Is it right?
> static int dvb_frontend_open(struct inode *inode, struct file *file)
> { 
>    //********************important*************************
>    if(fepriv->exit) return -ENODEV;   //add this in the first line.
>    if((ret = dvb_generic_opne.........
>    ........ 
> }
> To aviod dvbdev->users++ in dvb_frontend_open() after dvb_frontend_release()
> and before wait_event wake up in dvb_unregister_frontend (). It will cause
> wait_event NEVER be wake up---dvbdev->users is always equal to -2.

Note You need to log in before you can comment on or make changes to this bug.