Bug 156818 - bttv driver resets card upon querying capabilities with VIDIOCGCAP ioctl
bttv driver resets card upon querying capabilities with VIDIOCGCAP ioctl
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
bzcl34nup
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-04 10:19 EDT by Harald Hoyer
Modified: 2015-01-04 17:19 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-06 20:09:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Harald Hoyer 2005-05-04 10:19:15 EDT
Description of problem:
radio tuner is reseted by gimp

Version-Release number of selected component (if applicable):
since FC1 or so

How reproducible:
every time

Steps to Reproduce:
1. listen to the radio
2. start gimp or update the gimp rpm
  
Actual results:
no more radio listening

Expected results:
leave my tuner alone!
Comment 1 Nils Philippsen 2005-05-04 11:34:58 EDT
I can't reproduce your problem -- my radio plays flawlessly if I start or update
the gimp. Please provide more info.
Comment 2 Harald Hoyer 2005-05-04 11:38:42 EDT
What info? I could show you the effect in personal!
Comment 3 Harald Hoyer 2005-05-04 11:39:52 EDT
FYI, this is a TV card with a radio tuner... not an external one disconnected
from the computer :)
Comment 4 Nils Philippsen 2005-05-06 12:43:01 EDT
[Tim: I'm Ccing you in case someone opens a similar bug against xsane/sane]

Ahh... interesting. I've tried this out on your machine and found this:

- Updating the gimp package didn't do anything to the running radio (which is to
be expected since it only installs some symlinks, updates the icon cache... in
the %post* scripts)
- Running the gimp _did_ reset the radio, it seemed to come from the xsane
plugin (which tries to determine what scanner-like hardware is present on the
system when starting the GIMP)
- I confirmed this with running the standalone xsane which tries to open
/dev/bttv, /dev/video[0-3] (as configured in your /etc/sane.d/v4l.conf)
- I tracked this to the v4l sane plugin sending the ioctl VIDIOCGCAP to
/dev/video0 (which is incidentally the same TV/radio card that gets reset) in
order to determine the card's capabilities.

To me it looks like the bug is in the bttv driver which resets the _radio_ part
of the card when querying its _video_ capabilities, therefore I reassign this to
kernel. NB: One could argue that the card shouldn't reset anything when querying
any capabilities, but let's not be greedy ;-).

Harald, as a workaround, commenting out the offending lines in
/etc/sane.d/v4l.conf should help.
Comment 5 Alexey Dobriyan 2006-08-16 08:42:48 EDT
VIDIOCGCAP is big hint.

bttv_do_ioctl() does the following check before checking ioctl command:

        if (btv->errors)
                bttv_reinit_bt848(btv);

However, ->errors are REset to 0 by bttv_reinit_bt848().
Where they are SEt, you ask? Ha!

Harald, please, test this:

--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -3085,7 +3085,7 @@ static int bttv_open(struct inode *inode
 		btv->c.nr,v4l2_type_names[type]);
 
 	/* allocate per filehandle data */
-	fh = kmalloc(sizeof(*fh),GFP_KERNEL);
+	fh = kzalloc(sizeof(*fh),GFP_KERNEL);
 	if (NULL == fh)
 		return -ENOMEM;
 	file->private_data = fh;


(I have no idea how Fedora users test one-liners)
Comment 6 Harald Hoyer 2006-08-16 09:21:37 EDT
hmm, seek the kmalloc in vmlinuz and toggle some bytes :)
Comment 7 Dave Jones 2006-10-16 20:09:11 EDT
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed.  See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.
Comment 8 Dave Jones 2006-11-24 17:52:50 EST
This bug has been mass-closed along with all other bugs that
have been in NEEDINFO state for several months.

Due to the large volume of inactive bugs in bugzilla, this
is the only method we have of cleaning out stale bug reports
where the reporter has disappeared.

If you can reproduce this bug after installing all the
current updates, please reopen this bug.

If you are not the reporter, you can add a comment requesting
it be reopened, and someone will get to it asap.

Thank you.
Comment 9 Nils Philippsen 2007-09-28 06:26:50 EDT
Thomas just saw the problem isn't fixed on Rawhide with
kernel-2.6.23-0.187.rc6.git7.fc8.
Comment 10 Bug Zapper 2008-04-03 12:08:33 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 11 Bug Zapper 2008-05-06 20:09:51 EDT
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

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