[Hardy Regression] cx22702 no longer works

Bug #209971 reported by Albin Tonnerre
24
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Stefan Bader
Hardy
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Medium
Stefan Bader

Bug Description

Binary package hint: linux-source-2.6.24

Hi,

The cx22702 driver has been broken for about the last two weeks here, resulting in the TV card not working (Hauppauge HVR 1300).
The only clue I have about are the messages from dmesg when trying to initialize the card or using it:

[ 63.319425] cx22702_readreg: readreg error (ret == -121)
[ 63.320341] cx22702_writereg: writereg error (reg == 0x0d, val == 0x00, ret == -121)

repeated a large number of times.

I have not had the time to downgrade to an older kernel yet, but will do it if necessary
Please let me know if there's anything I can do to provide more informations about it

------
cat /proc/version_signature
Ubuntu 2.6.24-12.22-generic

uname -a
Linux pc-ras4041.res.insa 2.6.24-12-generic #1 SMP Wed Mar 12 22:31:43 UTC 2008 x86_64 GNU/Linux

Revision history for this message
Albin Tonnerre (lutin) wrote :
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Albin,

Care to test the latest 2.6.24-14 kernel to verify this issue still exists? If so, can you attach your full dmesg ouput which also captures these errors. Thanks.

Changed in linux:
status: New → Incomplete
Revision history for this message
Albin Tonnerre (lutin) wrote :

Hi Leann,
I tested with with 2.6.24-15, and this still happens. Besides, a oops now seems to happen.
Attached is the dmesg output

Cheers

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Doesn't work with any version. Seems like hardy is overwriting the GPIO ... Talked to the developper of the cx22702 driver and it looks like thats the problem.

when u do:

modprobe cx8802 debug=1

u get:

[ 120.714905] cx88[0]/2-mpeg: cx8802_request_release() Post release GPIO=3b

he told me the GPIO value is wrong. I managed after few rmmod's and modprobes to get another GPIO (not 3b). And then my card was working perfect!

He was going to make some patches. Will keep you informed !

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Tried loading modules in the http://godard.b.free.fr/dotclear/index.php?2007/04/04/13-hauppauge-wintv-hvr1300-under-linux following order, and seems like its working ...

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Workaround:

/etc/init.d/hal stop

unload modules
load modules

and everything is fine ...
when u run HAL again, its fucked up again ....

Seems like HAL is doing stopid

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

http://linuxtv.org/hg/~stoth/v4l-dvb/rev/67b7ef217867

This fixxed it !!! Thx stoth for the support !!!

Revision history for this message
Frank Haverkamp (f-haverkamp) wrote :

I think what I reported in https://bugs.launchpad.net/ubuntu/+bug/212226 is the same or at least a very similar problem.
I am getting those messages multiple times:
[ 240.344223] cx22702_readreg: readreg error (ret == -121)
[ 240.345198] cx22702_writereg: writereg error (reg == 0x0d, val == 0x00, ret == -121)

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Still occurs in 2.6.24-16 ! Recompiled module with patch, and works perfect again ...

Revision history for this message
aeneas (aeneascarver) wrote :

Please apply the patch! I've got the HVR-1300 too and I get exactly the same errors!

@Dupond Jean-Louis: Where did you apply the patch? I've downloaded the latest v4l sources, but the modules don't work with 2.6.24 -- there's unresolved symbols. Did you recmpile the ubuntu modules from the source packages? Thanks.

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

U can see on http://linuxtv.org/hg/~stoth/v4l-dvb/rev/67b7ef217867 what is changed.
If u download the SOURCE + PATCH, of the kernel u use (http://packages.ubuntu.com). U can add those changes to the ubuntu modules :) compile the thing, copy the compiled module u need. and reboot the banana ;)

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

New link for patch: http://linuxtv.org/hg/~stoth/v4l-dvb/rev/e55d97ff8bba

Patch:

--- a/linux/drivers/media/video/cx88/cx88-cards.c Fri Apr 18 19:29:12 2008 -0300
+++ b/linux/drivers/media/video/cx88/cx88-cards.c Sat Apr 05 12:45:57 2008 -0400
@@ -1410,6 +1410,10 @@ static const struct cx88_board cx88_boar
}},
/* fixme: Add radio support */
.mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
+ .radio = {
+ .type = CX88_RADIO,
+ .gpio0 = 0xe780,
+ },
},
[CX88_BOARD_ADSTECH_PTV_390] = {
.name = "ADS Tech Instant Video PCI",

Revision history for this message
Fabian (fsturm) wrote :

Hi!

I first had the problem with a null pointer dereference and oops in the cx88 kernel module.
This seems to be bug #212271 and the fix from https://launchpad.net/~stefan-bader-canonical/+archive
made the kernel boot again and load the dvb drivers.

Now it seems I am stuck with the cx22702_writereg bug.

From the comment above, how can I unload and reload the modules?
Since they are so many, I seems it does not make sense to do it one by one.

Thanks, Fabian

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Reboot ? :)

Revision history for this message
Fabian (fsturm) wrote :

Okay but the comment said "/etc/init.d hal stop".
But that won't be enough since it will be reloaded on reboot.

I will than have to remove hal completely from the runlevel.
So that's why I asked :-)

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

If u patch the kernel with the patch I pasted here, u can just keep using HAL like normal ... stopping HAL is just a workaround when your not using the patch ...

Revision history for this message
Charles Elwood (charles-technomancer) wrote :

I have the same problem on at least 2 different machines with at least 2 different models of HVR-1300 (five cards in total) using the cx88 driver.

I can confirm that the above patch does fix my instances of the readreg/writereg problem with the current linux-image-2.6.24-16.30.

Is there any extra info that can be of use? I've compiled one too many kernels today :-p

Revision history for this message
Charles Elwood (charles-technomancer) wrote :

for some reason there's a badly behaved link (at last for me)

Patch available on http://linuxtv.org/hg/~stoth/v4l-dvb/summary article entitled "cx88: enable radio GPIO correctly."

This is a massive showstopper not because the hardware doesn't work, but the malfunctioning hardware barfs [*] cx22702_readreg: readreg error (ret == -121) into /var/log/[syslog,kernel,messages] generating about 1Gb of logfile evey hour.

Revision history for this message
Fabian (fsturm) wrote :

Just wanted to add that the latest linux modules version from https://launchpad.net/~stefan-bader-canonical/+archive
adds the patch from above and fixes my hvr1300 problems.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi All,

Just adding the upstream git commit id and description. This will automatically be included in the Intrepid Ibex 8.10 kernel but I'll also milestone this for Hardy's 8.04.1 point release. Thanks.

commit 6b92b3bd7ac91b7e255541f4be9bfd55b12dae41
Author: Steven Toth <email address hidden>
Date: Sat Apr 5 16:45:57 2008 -0300

    V4L/DVB (7642): cx88: enable radio GPIO correctly

    cx88: enable radio GPIO correctly.

    Signed-off-by: Steven Toth <email address hidden>
    Signed-off-by: Mauro Carvalho Chehab <email address hidden>

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
milestone: none → ubuntu-8.04.1
status: Incomplete → Triaged
Revision history for this message
Frank Haverkamp (f-haverkamp) wrote :

Is there an estimate already when this fix will be available? Thanks.

Revision history for this message
Michael Krufky (mkrufky) wrote :

Please be aware that the GPIO fix, above, is already queued for 2.6.24.6-stable, and the review period ends today -- this fix will be merged into the vanilla 2.6.24.6-stable kernel today or tomorrow, the latest.

http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=commitdiff;h=75d5d102be039d3e54fda2bb3b8446d5334cbeec

"v4l-cx88-enable-radio-gpio-correctly.patch"

Please also be advised that the "fix" is merely a workaround -- the actual bug is in Ubuntu's hald, which is writing GPIOs to this PCI card.

How is hald doing this? WHY is hald doing this? We only see this issue in Ubuntu -- nobody else has reported this issue using other distros.

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Cherry-pick this patch from stable 2.6.24.y when it becomes available.

Changed in linux:
assignee: ubuntu-kernel-team → stefan-bader-canonical
status: Triaged → In Progress
Revision history for this message
Michael Krufky (mkrufky) wrote :

2.6.24.6 available now:

http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=commitdiff;h=dcd8f5bca3782f180c028446710edc16ebce73f6

I highly recommend that you cherry-pick the ivtv fix as well. I didn't search through Launchpad bug reports to see if Ubuntu users are complaining about this, but it's definitely worth merging:

http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=commitdiff;h=ef4fe7f473ba8edf4fb6931fab80fec45fbfbf01

-Mike

Revision history for this message
Stefan Bader (smb) wrote :

SRU Justification:

Impact: Generates huge amount of logdata

Fix description: The fix adds code to assign the correct values to enable the radio GPIO. Without this the driver (or HAL) is generating a hoge amount of log error message data (see https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/209971/comments/18). The patch itself is straight forward and is verified to fix the problem.

Patch: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=commitdiff;h=dcd8f5bca3782f180c028446710edc16ebce73f6

Testcase: Load the driver modules on a system with the hardware and check the system logs. Has been verified through PPA build (see https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/209971/comments/19)

Revision history for this message
Fabian (fsturm) wrote :

I did the following upgrade yesterday: linux-ubuntu-modules-2.6.24-16-generic (2.6.24-16.23ubuntu3) to 2.6.24-16.23ubuntu4 and now I have the readreg/writereg error again. So my hvr 1300 does no longer work :-(

Was the patch https://bugs.launchpad.net/ubuntu/+source/linux/+bug/209971/comments/12 included in the ubuntu3 version omitted in the ubuntu4 version?

Revision history for this message
Cio (tuomo-aro) wrote :

I have this same issue with HVR-1300 running under Hardy kernel 2.6.24.17. After boot, the DVB channels are not tuned in MythTV. No channels are not found for my DBV card setup in the Myth backend channel scan either. However, if I use create a temporary V4L card entry and try to scan the channels for it, I still don't find any at that point but then scanning the channels for the DVB card entry miraculously starts working and I see no more readreg/writereg errors in logs.

Please consider this just as related information, not a workaround! I don't want to go through this long and awkward process after every boot.

Revision history for this message
Stefan Bader (smb) wrote :

Initially I had the patch in LUM. But the DVB modules are now (based on another request) again build only in the kernel package. The patch has been included there but still has to be released (in hardy-proposed). But this is the reason I did not include it in the latest ppa lum. You would have to wait for a kernel -17-32. Or might use the ppa -18-31 (this has some more code for regression testing, so it might help to evaluate two things).

Revision history for this message
Stefan Bader (smb) wrote :

310636e0ae1942b760354fafc10e179be40b1d1c in hardy

Changed in linux:
status: In Progress → Fix Committed
Revision history for this message
Charles Elwood (charles-technomancer) wrote :

> You would have to wait for a kernel -17-32

Is that a typo or is 2.6.24-17.31 unfixed?

Revision history for this message
Carles Casas (carles-casas) wrote :

Tested in kernel 2.6.24-18.32 and is not working yet

Revision history for this message
.Ulli (ulli) wrote :

same problem here

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here

Changed in linux:
status: New → Fix Committed
Revision history for this message
.Ulli (ulli) wrote :

Now the boot is possible without this error, but the error still persists.

The line 541 within the attached dmesg is the start of a channel-scan using MythTV 0.21.0+fixes16838-0ubuntu3.1 (hardy-proposed).

Revision history for this message
aeneas (aeneascarver) wrote :

No, this does not work with 2.6.24-18.20 -- I still get the readreg error:
[ 1950.480335] cx22702_readreg: readreg error (ret == -121)

It worked with the -18 PPA from Stefan though....

Revision history for this message
aeneas (aeneascarver) wrote :

Sorry, I meant: It does not work with linux-image-2.6.24-18-generic, version: 2.6.24-18.32

Revision history for this message
Steve Langasek (vorlon) wrote :

According to the changelog, this bug is fixed only in linux 2.6.24-19.33 or later (the kernel currently available in hardy-proposed). Please try that kernel and report any results here.

Steve Langasek (vorlon)
Changed in linux:
milestone: none → ubuntu-8.04.1
milestone: ubuntu-8.04.1 → none
Revision history for this message
Carles Casas (carles-casas) wrote :

Tested with last kernel 2.6.24-19-generic at hardy-proposed.

Strange, dmesg shows a couple of cx22702_readreg errors, but the card is working perfectly using me-tv.

And the good news is that the analog driver also works out of the box without unloading and loading the modules in a different order again.
tested with tvviewer.

Thanks for solving this issue.

Revision history for this message
aeneas (aeneascarver) wrote :

Tested with the latest kernel: 2.6.24-19.33 : everything works again!

Thanks a lot.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in linux:
status: Fix Committed → Fix Released
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

This is "Fix Released" for Intrepid.

Changed in linux:
status: Fix Committed → Fix Released
Revision history for this message
Tim Swait (timswait) wrote :

This bug seems to have returned. I have just upgraded a Mythbuntu system from Intrepid to Karmic (kernel 2.6.31.14) and the HVR-1300 card has stopped working. The symptoms sound similar to above, can't tune in to any of the channels in it's channel list and unable to find anything when scanning. The signal to noise ratio never varies from exactly 50% when it's scanning, which seems odd. I've tried removing a reinstalling the modules listed here: http://godard.b.free.fr/dotclear/index.php?2007/04/04/13-hauppauge-wintv-hvr1300-under-linux, but half of them I can't remove as they are apparently in use, how can I reload these modules in the right order and is this likely to help if I did?

Revision history for this message
Tim Swait (timswait) wrote :

Whoops, I meant I ugraded from Jaunty (not intrepid) to Karmic.

Revision history for this message
Marco il Serio (marco-ernst) wrote :

Confirmed, HVR1300 not scanning (tried Me-TV and w_scan) or tuning in to know channels after upgrading to Karmic. Tried V4L-Update, No Success. dmesg shows no Readreg errors.

W-Scan:
ERROR: Sorry - i couldn't get any working frequency/transponder
 Nothing to scan!!

Revision history for this message
DFdario (dfdario) wrote :

Those having problem with Karmic should have a loot to Bug #439163

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.