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.
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.
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.
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.