From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Mark Lord <kernel@teksavvy.com>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>,
Eddi De Pieri <eddi@depieri.net>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 5/8] [media] em28xx: initial support for HAUPPAUGE HVR-930C again
Date: Tue, 06 Dec 2011 11:43:40 -0200 [thread overview]
Message-ID: <4EDE1C0C.2060701@redhat.com> (raw)
In-Reply-To: <4EDE0FD7.4020603@teksavvy.com>
On 06-12-2011 10:51, Mark Lord wrote:
> On 11-12-05 06:47 PM, Devin Heitmueller wrote:
>> On Mon, Dec 5, 2011 at 6:32 PM, Eddi De Pieri<eddi@depieri.net> wrote:
>>> Sorry, I think I applied follow patch on my tree while I developed
>>> the driver trying to fix tuner initialization.
>>>
>>> http://patchwork.linuxtv.org/patch/6617/
>>>
>>> I forgot to remove from my tree after I see that don't solve anything.
>>
>> Ok, great. At least that explains why it's there (since I couldn't
>> figure out how on Earth the patch made sense otherwise).
>>
>> Eddi, could you please submit a patch removing the offending code?
>
>
> That's good.
>
> But there definitely still is a race between modules in there somewhere.
> The HVR-950Q tuners use several: xc5000, au8522, au0828, ..
> and unless au0828 is loaded *last*, with a delay before/after,
> the dongles don't always work. Preloading all of the modules
> before allowing hardware detection seems to help.
>
> Even just changing from a mechanical hard drive to a very fast SSD
> is enough to change the behaviour from not-working to working
> (and sometimes the other way around).
>
> I tried to track this down a couple of years ago,
> and found cross-module calls failing because the
> target functions hadn't been loaded yet.
> But my lack of notes from 2-3 years ago isn't helpful here.
>
> Here's a similar report from 2 years ago, as valid today as it was then:
>
> http://www.mythtv.org/pipermail/mythtv-users/2010-January/279912.html
The driver who binds everything is the bridge driver. In your case, it is
the au0828 driver.
What you're experiencing seems to be some race issue inside it, and not at xc5000.
On a quick look on it, I'm noticing that there's no lock at au0828_usb_probe().
Also, it uses a separate lock for analog and for digital:
mutex_init(&dev->mutex);
mutex_init(&dev->dvb.lock);
Probably, the right thing to do would be to use just one lock for both rising
it at usb_probe, lowering it just before return 0. This will avoid any open
operations while the device is not fully initialized. Btw, newer udev's open
the analog part of the driver just after V4L register, in order to get the
device capabilities. This is known to cause race conditions, if the locking
schema is not working properly.
Regards,
Mauro.
next prev parent reply other threads:[~2011-12-06 13:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 14:56 [PATCH 1/8] [media] dvb: Allow select between DVB-C Annex A and Annex C Mauro Carvalho Chehab
2011-11-20 14:56 ` [PATCH 2/8] [media] Properly implement ITU-T J.88 Annex C support Mauro Carvalho Chehab
2011-11-20 14:56 ` [PATCH 3/8] [media] em28xx: Fix some Terratec entries (H5 and XS) Mauro Carvalho Chehab
2011-11-20 14:56 ` [PATCH 4/8] [media] xc5000: Add support for get_if_frequency Mauro Carvalho Chehab
2011-11-20 14:56 ` [PATCH 5/8] [media] em28xx: initial support for HAUPPAUGE HVR-930C again Mauro Carvalho Chehab
2011-11-20 14:56 ` [PATCH 6/8] [media] em28xx: Fix CodingStyle issues introduced by changeset 82e7dbb Mauro Carvalho Chehab
2011-11-20 14:56 ` [PATCH 7/8] [media] em28xx: Add IR support for em2884 Mauro Carvalho Chehab
2011-11-20 14:56 ` [PATCH 8/8] [media] em28xx: Add IR support for HVR-930C Mauro Carvalho Chehab
2011-12-05 18:23 ` [PATCH 5/8] [media] em28xx: initial support for HAUPPAUGE HVR-930C again Devin Heitmueller
2011-12-05 18:35 ` Mauro Carvalho Chehab
2011-12-05 18:46 ` Devin Heitmueller
2011-12-05 20:01 ` Devin Heitmueller
2011-12-05 23:32 ` Eddi De Pieri
2011-12-05 23:47 ` Devin Heitmueller
2011-12-06 12:51 ` Mark Lord
2011-12-06 13:43 ` Mauro Carvalho Chehab [this message]
2011-12-06 13:56 ` Devin Heitmueller
2011-12-06 15:28 ` Mark Lord
2011-12-06 15:35 ` Devin Heitmueller
2011-12-06 15:44 ` Mauro Carvalho Chehab
2011-12-07 9:59 ` Mauro Carvalho Chehab
2011-11-20 20:27 ` [PATCH 1/8] [media] dvb: Allow select between DVB-C Annex A and Annex C Rémi Denis-Courmont
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=4EDE1C0C.2060701@redhat.com \
--to=mchehab@redhat.com \
--cc=dheitmueller@kernellabs.com \
--cc=eddi@depieri.net \
--cc=kernel@teksavvy.com \
--cc=linux-media@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox