From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Trent Piepho <xyzzy@speakeasy.org>
Cc: Markus Rechberger <mrechberger@gmail.com>,
linux-dvb@linuxtv.org, linux-kernel@vger.kernel.org,
Manu Abraham <abraham.manu@gmail.com>
Subject: Re: [linux-dvb] Re: DST/BT878 module customization (.. was: Critical points about ...)
Date: Thu, 03 May 2007 11:02:56 -0300 [thread overview]
Message-ID: <1178200976.12651.104.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.58.0705020348080.309@shell2.speakeasy.net>
Em Qua, 2007-05-02 às 04:10 -0700, Trent Piepho escreveu:
> On Tue, 1 May 2007, Mauro Carvalho Chehab wrote:
> > However, when dst is selected, I got those errors:
>
> When I made this patch I was basing it off a patch I made around 9 months
> ago. I thought since that one was ok, this would be ok too, and in my
> hurry to get it done I've clearly put too little effort into checking it,
> and I'm sorry to have wasted your time.
>
> I promise, this time it's right!
> http://linuxtv.org/hg/~tap/dst-new
Confirmed. Now the patch is properly working. My tests were done with a
board with DST. Those are the results:
1) when DST is unselected, on a board with DST, it will print the errors
indicating that the Kconfig items were not selected:
DVB: registering new adapter (bttv0).
DVB: Unable to find symbol dst_attach()
frontend_init: Could not find a Twinhan DST.
dvb-bt8xx: A frontend driver was not found for device 109e/0878 subsystem fbfb/f800
The only issue is the wrong printk msg, stating that a "frontend driver"
were not found. As this issue also happens with the current driver, due
the usage of dvb_attach() macro, I don't see any regressions.
It would be nice, however, to have a patch making dvb_attach more
generic, by e.g. having a variant that allows passing another message.
Trying to run dvb programs like scan and kaffeine will properly fail.
2) With DST selected, the driver works properly.
The changes also solved the issue of removing the dst drivers. Before
the patch, sometimes it is required to force removal of dst module with
the '-f' flag, since the module count were wrong.
---
I'll risk to make a briefing of the technical points:
<SUMMARY>
Current issues:
1) allow deselecting DST/DST_CA support, since this is not needed by
some supported boards;
2) sometimes, module removal don't work with dst, since usage count
becomes wrong;
3) if dst or dst_ca is not properly loaded, the printk message wrongly
indicates that "A frontend driver was not found"
The Trent's original patch were written on Aug, 2006 (*). The current
version fixes (1) and (2). It doesn't touch on (3). There aren't any
other patches properly fixing (1) and (2).
There's an argument against the prototype changes on dst_attach and
dst_ca_attach since they aren't frontend.
</SUMMARY>
(*) Notice: I can't remember why the patches were not applied on that
time. I think somebody nacked they, although I didn't found any record
about the patch on my mailbox.
About the usage of frontend support for a non-frontend module, I really
can't see any issues at the current implementation, since even before
the patch, all DST initialization are done by a routine called
"frontend_init()". Even dst not being a frontend, the initialization
gets the result of the attachment process, using it as a "frontend":
state = kmalloc(sizeof (struct dst_state), GFP_KERNEL);
state->config = &dst_config;
state->i2c = card->i2c_adapter;
state->bt = card->bt;
state->dst_ca = NULL;
dvb_attach(dst_attach, state, &card->dvb_adapter);
card->fe = &state->frontend;
(comments and error checks removed to make code cleaner)
The patch basically moved state initialization to dst_attach. The above
code, after the patch is:
card->fe = dvb_attach(dst_attach, &dst_config, card->bt, card->i2c_adapter);
So, I didn't noticed any regressions by running the modified driver nor
I couldn't identify any regressions by inspecting the source code.
The end result seems also cleaner and easier to understand, preserving
all characteristics of the original code. Also, it uses dvb_attach the
same way as the other dvb helper modules.
If later any changes will be needed to allow using DST on different
configurations, future patches probably will need to move dst
initialization to other places, and use different callbacks for it,
altering the above initialization. I can't see why those changes would
possibly avoid any further changes at the driver.
That's said, I intend to commit the two patches, fixing the current
issues, at this weekend.
I'm open to other technical reviews of the patches.
--
Cheers,
Mauro
next prev parent reply other threads:[~2007-05-03 14:05 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-30 21:17 DST/BT878 module customization (.. was: Critical points about ...) Markus Rechberger
2007-05-01 6:40 ` [linux-dvb] " Simon Arlott
2007-05-01 9:00 ` Markus Rechberger
2007-05-01 9:31 ` Uwe Bugla
2007-05-01 22:57 ` Trent Piepho
2007-05-02 13:30 ` Manu Abraham
2007-05-02 15:51 ` Uwe Bugla
2007-05-02 16:43 ` Manu Abraham
2007-05-02 16:45 ` Manu Abraham
2007-05-02 17:33 ` Markus Rechberger
2007-05-03 11:20 ` Uwe Bugla
2007-05-03 14:44 ` Manu Abraham
2007-05-03 15:31 ` Uwe Bugla
2007-05-03 15:48 ` Manu Abraham
2007-05-03 15:59 ` Markus Rechberger
2007-05-03 16:17 ` Manu Abraham
2007-05-03 17:19 ` Markus Rechberger
[not found] ` <1178215045.12651.124.camel@localhost>
2007-05-03 19:03 ` Manu Abraham
2007-05-03 21:00 ` Markus Rechberger
2007-05-03 21:42 ` Manu Abraham
2007-05-03 22:06 ` Markus Rechberger
2007-05-03 22:31 ` Manu Abraham
2007-05-03 23:09 ` Markus Rechberger
2007-05-04 0:47 ` hermann pitton
2007-05-04 1:30 ` Uwe Bugla
2007-05-04 0:07 ` Uwe Bugla
2007-05-05 18:06 ` Mauro Carvalho Chehab
2007-05-05 18:46 ` Manu Abraham
2007-05-07 20:54 ` Mauro Carvalho Chehab
2007-05-07 21:25 ` Manu Abraham
2007-05-07 21:34 ` Michael Krufky
2007-05-07 21:49 ` Manu Abraham
2007-05-07 21:51 ` Uwe Bugla
[not found] ` <a3ef07920705031119x332db12dob997e5ebc6a8e218@mail.gmail.com>
2007-05-03 20:49 ` Markus Rechberger
2007-05-03 16:25 ` Uwe Bugla
2007-05-03 16:05 ` Uwe Bugla
2007-05-03 16:15 ` Manu Abraham
2007-05-03 16:30 ` Michael Krufky
2007-05-03 16:35 ` Manu Abraham
2007-05-07 23:33 ` Trent Piepho
2007-05-08 0:00 ` Manu Abraham
2007-05-01 14:55 ` Mauro Carvalho Chehab
2007-05-01 16:40 ` [linux-dvb] " Uwe Bugla
2007-05-01 18:30 ` Uwe Bugla
2007-05-01 18:50 ` Simon Arlott
2007-05-01 19:34 ` Uwe Bugla
2007-05-01 20:35 ` Simon Arlott
2007-05-01 21:29 ` Uwe Bugla
2007-05-01 19:20 ` e9hack
2007-05-01 19:26 ` Uwe Bugla
2007-05-01 23:16 ` Trent Piepho
2007-05-02 2:03 ` Mauro Carvalho Chehab
2007-05-02 11:10 ` Trent Piepho
2007-05-02 12:04 ` Uwe Bugla
2007-05-03 14:02 ` Mauro Carvalho Chehab [this message]
2007-05-03 15:15 ` Manu Abraham
2007-05-03 15:36 ` Uwe Bugla
2007-05-04 5:13 ` Trent Piepho
2007-05-04 9:23 ` Mauro Carvalho Chehab
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=1178200976.12651.104.camel@localhost \
--to=mchehab@infradead.org \
--cc=abraham.manu@gmail.com \
--cc=linux-dvb@linuxtv.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mrechberger@gmail.com \
--cc=xyzzy@speakeasy.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