From: Daniel Scheller <d.scheller.oss@gmail.com>
To: linux-media@vger.kernel.org, mchehab@kernel.org,
mchehab@s-opensource.com
Subject: [PATCH 0/8] ddbridge improvements and cleanups
Date: Sun, 17 Dec 2017 16:40:41 +0100 [thread overview]
Message-ID: <20171217154049.1125-1-d.scheller.oss@gmail.com> (raw)
From: Daniel Scheller <d.scheller@gmx.net>
This series improves on a few things in ddbridge:
* Fix up a KASAN report which pops up with all TDA18212-equipped hardware
by changing the order of all frontend driver teardown. This was
originally thought to be a problem of the tda18212 driver, see
https://patchwork.linuxtv.org/patch/45992/ (though other drivers with
that problem may remain).
* Fix up CI resources cleanup handling, and further cosmetics and code
move, all CI related
* Frontend cleanup improvements when handling errors (ie. when on one
port the device initialisation fails). Whenever a tuner module fails
now, everything should be cleaned up properly (and early) now, while
all other (working) tuners are being usable. Proper errors are printed
to the kernel log about this.
Mauro, I'm pretty sure you like this overall approach better, compared
to https://patchwork.linuxtv.org/patch/45810/ :-) In fact, I picked up
your idea of counting ports and act accordingly. Partial hardware setup
now starts up all working parts properly, while releasing resources
early when the nonworking parts are handled. If no ports could be started
at all, the driver instance will fail gracefully and report this to
upper layers.
I verified this by simply removing tda18212.ko with this DD setup:
* CineCTv6 bridge card (stv0367+tda18212 soldered on it, handled as
port 0), one DuoFlex C2T2 connected to port 1 (cxd2841er+tda18212)
* Octopus CI Duo, one DuoFlex C2T2I (cxd2841er+tda18212) connected to
port 1, one SingleCI module (cxd2099) connected to port 2
Upon modprobe ddbridge, the CTv6 will completely fail due to the tuner
driver not initialising (it's not there, actually). The OctoCIDUO
will fail on the C2T2I Flex, but starts up the CI hardware, registers
it's en50221 device nodes and things work fine with it. Unload cleans
up everything, no leaked usecounts, no KASAN complaints. Putting back
tda18212.ko, modprobe ddbridge - registers everything. Unload cleans
up everything properly aswell.
Not entirely sure, but patch 1 might be something for stable (ie. 4.14).
Daniel Scheller (8):
[media] ddbridge: unregister I2C tuner client before detaching fe's
[media] ddbridge: fix resources cleanup for CI hardware
[media] ddbridge: deduplicate calls to dvb_ca_en50221_init()
[media] ddbridge: move CI detach code to ddbridge-ci.c
[media] ddbridge: completely tear down input resources on failure
[media] ddbridge: fix deinit order in case of failure in ddb_init()
[media] ddbridge: detach first input if the second one failed to init
[media] ddbridge: improve ddb_ports_attach() failure handling
drivers/media/pci/ddbridge/ddbridge-ci.c | 17 +++--
drivers/media/pci/ddbridge/ddbridge-ci.h | 1 +
drivers/media/pci/ddbridge/ddbridge-core.c | 108 ++++++++++++++++++-----------
3 files changed, 81 insertions(+), 45 deletions(-)
--
2.13.6
next reply other threads:[~2017-12-17 15:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-17 15:40 Daniel Scheller [this message]
2017-12-17 15:40 ` [PATCH 1/8] [media] ddbridge: unregister I2C tuner client before detaching fe's Daniel Scheller
2017-12-17 15:40 ` [PATCH 2/8] [media] ddbridge: fix resources cleanup for CI hardware Daniel Scheller
2017-12-17 15:40 ` [PATCH 3/8] [media] ddbridge: deduplicate calls to dvb_ca_en50221_init() Daniel Scheller
2017-12-17 15:40 ` [PATCH 4/8] [media] ddbridge: move CI detach code to ddbridge-ci.c Daniel Scheller
2017-12-17 15:40 ` [PATCH 5/8] [media] ddbridge: completely tear down input resources on failure Daniel Scheller
2017-12-17 15:40 ` [PATCH 6/8] [media] ddbridge: fix deinit order in case of failure in ddb_init() Daniel Scheller
2017-12-17 15:40 ` [PATCH 7/8] [media] ddbridge: detach first input if the second one failed to init Daniel Scheller
2017-12-17 15:40 ` [PATCH 8/8] [media] ddbridge: improve ddb_ports_attach() failure handling Daniel Scheller
2017-12-17 16:00 ` [PATCH 0/8] ddbridge improvements and cleanups Daniel Scheller
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=20171217154049.1125-1-d.scheller.oss@gmail.com \
--to=d.scheller.oss@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mchehab@s-opensource.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.