From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Mike Galbraith <efault@gmx.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>, David Miller <davem@davemloft.net>,
torvalds@linux-foundation.org, linux-dvb-maintainer@linuxtv.org,
video4linux-list@redhat.com, linux-kernel@vger.kernel.org,
sfr@canb.auug.org.au, Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [patch, -git] drivers/media build fix for modular builds
Date: Wed, 30 Apr 2008 18:35:03 -0300 [thread overview]
Message-ID: <20080430183503.19b36166@gaivota> (raw)
In-Reply-To: <1209573069.4821.3.camel@marge.simson.net>
On Wed, 30 Apr 2008 18:31:09 +0200
Mike Galbraith <efault@gmx.de> wrote:
>
> On Wed, 2008-04-30 at 13:12 -0300, Mauro Carvalho Chehab wrote:
> > On Wed, 30 Apr 2008 17:48:10 +0200
> > Mike Galbraith <efault@gmx.de> wrote:
> >
> > >
> > > On Wed, 2008-04-30 at 12:25 -0300, Mauro Carvalho Chehab wrote:
> > >
> > > > Please try this patch. It should avoid an OOPS, if attach fails.
> > >
> > > Different oops.
> > >
> >
> > Detach order were wrong.
> >
> > Try this, please.
Ok, I found a way to simulate the error here. Just doing:
rm /lib/modules/`uname -r`/kernel/drivers/media/common/tuners/*
Produced the same OOPS.
The fix is easy: just removing the unregister function call. dvb_register
happens only at videobuf-dvb, that happens only if no error during attach. So,
the proper deallocation code is just calling dvb_detach.
By removing this, and the tuner modules, now no oops is generated:
[ 5399.093624] TUNER: Unable to find symbol tda829x_probe()
[ 5399.093638] tuner' 1-004b: chip found @ 0x96 (saa7133[0])
[ 5399.110946] DVB: Unable to find symbol tda9887_attach()
[ 5399.110955] tuner' 1-004b: Tuner attach for type = 74 failed.
[ 5399.119272] tuner' 1-004b: TUNER_SET_TYPE_ADDR
[ 5399.119284] tuner' 1-004b: Calling set_type_addr for type=54, addr=0xff, mode=0x0e, config=0x00
[ 5399.119294] tuner' 1-004b: set addr discarded for type 4, mask 0. Asked to change tuner at addr 0xff, with mask e
[ 5399.119307] tuner' 1-004b: VIDIOC_S_STD
[ 5399.119321] tuner' 1-004b: switching to v4l2
[ 5399.119330] tuner' 1-004b: VIDIOC_S_STD
[ 5399.120762] saa7133[0]: registered device video0 [v4l2]
[ 5399.120873] saa7133[0]: registered device vbi0
[ 5399.120942] saa7133[0]: registered device radio0
[ 5399.121320] tuner' 1-004b: TUNER_SET_STANDBY
[ 5399.145012] saa7134 ALSA driver for DMA sound loaded
[ 5399.145098] saa7133[0]/alsa: saa7133[0] at 0x8c000000 irq 20 registered as card -1
[ 5399.260248] tuner' 1-004b: VIDIOC_S_STD
[ 5399.187606] tuner' 1-004b: TUNER_SET_STANDBY
[ 5399.297878] DVB: Unable to find symbol tda827x_attach()
[ 5399.297886] saa7133[0]/dvb: no tda827x tuner found at addr: 61
I tried even to run userspace apps:
$ scandvb /home/v4l/dvb-apps/util/scan/dvb-t/uk-Storeton
scanning /home/v4l/dvb-apps/util/scan/dvb-t/uk-Storeton
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
main:2248: FATAL: failed to open '/dev/dvb/adapter0/frontend0': 2 No such file or directory
(to test dvb)
and:
$ cat /dev/video0
cat: /dev/video0: Invalid argument
(to test v4l)
There's one missing patch on your tree that will make it work again. I'm
enclosing it at the end of this email.
I've updated my -git tree with those patches. The same bug were also present on
em28xx-dvb and cx88-dvb (that have about the same code).
The fixes for those bugs are available at my -git tree. I've already sent a
pull request for their merge.
Cheers,
Mauro.
---
fix drivers/media/common/tuners/ build bug
From: Ingo Molnar <mingo@elte.hu>
x86.git randconfig testing found a build failure on latest -git:
drivers/built-in.o: In function `set_type':
tuner-core.c:(.text+0x2a9a26): undefined reference to `tea5761_attach'
tuner-core.c:(.text+0x2a9d05): undefined reference to `tda9887_attach'
tuner-core.c:(.text+0x2a9d51): undefined reference to `xc2028_attach'
tuner-core.c:(.text+0x2a9e22): undefined reference to `tda829x_attach'
tuner-core.c:(.text+0x2a9e3f): undefined reference to `microtune_attach'
drivers/built-in.o: In function `tuner_probe':
tuner-core.c:(.text+0x2aa18a): undefined reference to `tda829x_probe'
tuner-core.c:(.text+0x2aa302): undefined reference to `tea5761_autodetection'
with the following config:
http://redhat.com/~mingo/misc/config-Wed_Apr_30_10_21_40_CEST_2008.bad
the problem is caused by the drivers/media/common/tuners/ subdirectory
not being part of the kbuild hierarchy anymore, due to commit
7c91f0624 ("V4L/DVB(7767): Move tuners to common/tuners").
this seems similar to the problem also reported by Mike Galbraith.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
diff -r e9da55df0051 -r 048bf1530198 linux/drivers/media/common/Makefile
--- a/linux/drivers/media/common/Makefile Wed Apr 30 12:29:57 2008 -0300
+++ b/linux/drivers/media/common/Makefile Wed Apr 30 11:57:12 2008 +0000
@@ -2,6 +2,7 @@
saa7146_vv-objs := saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o
ir-common-objs := ir-functions.o ir-keymaps.o
+obj-y += tuners/
obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o
obj-$(CONFIG_VIDEO_SAA7146_VV) += saa7146_vv.o
obj-$(CONFIG_VIDEO_IR) += ir-common.o
Cheers,
Mauro
next prev parent reply other threads:[~2008-04-30 21:36 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 21:50 [GIT PATCHES] V4L/DVB updates and fixes for 2.6.26 Mauro Carvalho Chehab
2008-04-29 21:50 ` Mauro Carvalho Chehab
2008-04-29 21:59 ` Linus Torvalds
2008-04-29 23:49 ` [v4l-dvb-maintainer] " Michael Krufky
2008-04-29 23:49 ` Michael Krufky
2008-04-30 0:00 ` Mauro Carvalho Chehab
2008-04-30 0:00 ` Mauro Carvalho Chehab
2008-04-30 7:48 ` [patch, -git] drivers/media build fix for modular builds Ingo Molnar
2008-04-30 7:52 ` David Miller
2008-04-30 8:13 ` Ingo Molnar
2008-04-30 8:27 ` Mike Galbraith
2008-04-30 8:42 ` Mike Galbraith
2008-04-30 8:56 ` Mike Galbraith
2008-04-30 9:20 ` Mike Galbraith
2008-04-30 11:40 ` Andrew Morton
2008-04-30 13:03 ` Mike Galbraith
2008-04-30 14:39 ` [v4l-dvb-maintainer] " Michael Krufky
2008-04-30 15:29 ` Andrew Morton
2008-04-30 15:30 ` Mike Galbraith
2008-04-30 15:34 ` Andrew Morton
2008-04-30 15:39 ` Michael Krufky
2008-04-30 16:01 ` Mike Galbraith
2008-04-30 15:48 ` Mauro Carvalho Chehab
2008-04-30 15:25 ` Mauro Carvalho Chehab
2008-04-30 15:48 ` Mike Galbraith
2008-04-30 16:12 ` Mauro Carvalho Chehab
2008-04-30 16:31 ` Mike Galbraith
2008-04-30 21:35 ` Mauro Carvalho Chehab [this message]
2008-04-30 21:52 ` [v4l-dvb-maintainer] " Trent Piepho
2008-04-30 22:38 ` [v4l-dvb-maintainer] [patch, -git] drivers/media build fix fo r " mkrufky
2008-04-30 9:26 ` [patch, -git] drivers/media build fix for " Sam Ravnborg
2008-04-30 9:40 ` Mike Galbraith
2008-04-30 10:36 ` Ingo Molnar
2008-04-30 9:25 ` Sam Ravnborg
2008-04-30 9:37 ` Ingo Molnar
2008-04-30 9:55 ` Sam Ravnborg
2008-04-30 8:02 ` [v4l-dvb-maintainer] [GIT PATCHES] V4L/DVB updates and fixes for 2.6.26 Patrick Boettcher
2008-04-30 8:02 ` Patrick Boettcher
2008-04-30 19:03 ` Mauro Carvalho Chehab
2008-04-30 19:03 ` Mauro Carvalho Chehab
-- strict thread matches above, loose matches on Subject: below --
2008-05-07 3:49 [patch, -git] drivers/media build fix for modular builds Stephen Rothwell
2008-05-08 14:21 ` Thomas Backlund
2008-05-09 0:16 ` Gene Heskett
2008-05-09 0:18 ` David Miller
2008-05-09 5:57 ` Thomas Backlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080430183503.19b36166@gaivota \
--to=mchehab@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=efault@gmx.de \
--cc=linux-dvb-maintainer@linuxtv.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.