All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Scheller <d.scheller.oss@gmail.com>
To: linux-media@vger.kernel.org, mchehab@kernel.org,
	mchehab@s-opensource.com
Cc: jasmin@anw.at, d_spingler@gmx.de, rjkm@metzlerbros.de
Subject: [PATCH 13/14] [media] ddbridge: Kconfig option to control the MSI modparam default
Date: Sun,  9 Jul 2017 21:42:20 +0200	[thread overview]
Message-ID: <20170709194221.10255-14-d.scheller.oss@gmail.com> (raw)
In-Reply-To: <20170709194221.10255-1-d.scheller.oss@gmail.com>

From: Daniel Scheller <d.scheller@gmx.net>

It is known that MSI interrupts - while working quite well so far - can
still cause issues on some hardware platforms (causing I2C timeouts due
to unhandled interrupts). The msi variable/option is set to 1 by default.
So, add a Kconfig option prefixed with "EXPERIMENTAL" that will control
the default value of that modparam, defaulting to off for a better
user experience and (guaranteed) stable operation "per default".

Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
 drivers/media/pci/ddbridge/Kconfig         | 15 +++++++++++++++
 drivers/media/pci/ddbridge/ddbridge-main.c | 11 +++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/ddbridge/Kconfig b/drivers/media/pci/ddbridge/Kconfig
index c79a58fa5fc3..1330b2ecc72a 100644
--- a/drivers/media/pci/ddbridge/Kconfig
+++ b/drivers/media/pci/ddbridge/Kconfig
@@ -26,3 +26,18 @@ config DVB_DDBRIDGE
 	  - CineS2 V7/V7A and DuoFlex S2 V4 (ST STV0910-based)
 
 	  Say Y if you own such a card and want to use it.
+
+config DVB_DDBRIDGE_MSIENABLE
+	bool "Enable Message Signaled Interrupts (MSI) per default (EXPERIMENTAL)"
+	depends on DVB_DDBRIDGE
+	depends on PCI_MSI
+	default n
+	---help---
+	  Use PCI MSI (Message Signaled Interrupts) per default. Enabling this
+	  might lead to I2C errors originating from the bridge in conjunction
+	  with certain SATA controllers, requiring a reload of the ddbridge
+	  module. MSI can still be disabled by passing msi=0 as option, as
+	  this will just change the msi option default value.
+
+	  If you're unsure, concerned about stability and don't want to pass
+	  module options in case of troubles, say N.
diff --git a/drivers/media/pci/ddbridge/ddbridge-main.c b/drivers/media/pci/ddbridge/ddbridge-main.c
index fa4f663c5acb..83643bc21d09 100644
--- a/drivers/media/pci/ddbridge/ddbridge-main.c
+++ b/drivers/media/pci/ddbridge/ddbridge-main.c
@@ -46,10 +46,17 @@ MODULE_PARM_DESC(adapter_alloc,
 		 "0-one adapter per io, 1-one per tab with io, 2-one per tab, 3-one for all");
 
 #ifdef CONFIG_PCI_MSI
+#ifdef CONFIG_DVB_DDBRIDGE_MSIENABLE
 int msi = 1;
+#else
+int msi;
+#endif
 module_param(msi, int, 0444);
-MODULE_PARM_DESC(msi,
-		 " Control MSI interrupts: 0-disable, 1-enable (default)");
+#ifdef CONFIG_DVB_DDBRIDGE_MSIENABLE
+MODULE_PARM_DESC(msi, "Control MSI interrupts: 0-disable, 1-enable (default)");
+#else
+MODULE_PARM_DESC(msi, "Control MSI interrupts: 0-disable (default), 1-enable");
+#endif
 #endif
 
 int ci_bitrate = 70000;
-- 
2.13.0

  parent reply	other threads:[~2017-07-09 19:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09 19:42 [PATCH 00/14] ddbridge: bump to ddbridge-0.9.29 Daniel Scheller
2017-07-09 19:42 ` [PATCH 01/14] [media] ddbridge: move/reorder functions Daniel Scheller
2017-07-09 19:42 ` [PATCH 02/14] [media] ddbridge: split code into multiple files Daniel Scheller
2017-07-09 19:42 ` [PATCH 03/14] [media] ddbridge: bump ddbridge code to version 0.9.29 Daniel Scheller
2017-07-09 19:42 ` [PATCH 04/14] [media] ddbridge: split I/O related functions off from ddbridge.h Daniel Scheller
2017-07-09 19:42 ` [PATCH 05/14] [media] ddbridge: split off IRQ handling Daniel Scheller
2017-07-09 19:42 ` [PATCH 06/14] [media] ddbridge: split off hardware definitions and mappings Daniel Scheller
2017-07-09 19:42 ` [PATCH 07/14] [media] ddbridge: check pointers before dereferencing Daniel Scheller
2017-07-09 19:42 ` [PATCH 08/14] [media] ddbridge: only register frontends in fe2 if fe is not NULL Daniel Scheller
2017-07-09 19:42 ` [PATCH 09/14] [media] ddbridge: fix possible buffer overflow in ddb_ports_init() Daniel Scheller
2017-07-10  8:21   ` Ralph Metzler
2017-07-10 15:32     ` Daniel Scheller
2017-07-09 19:42 ` [PATCH 10/14] [media] ddbridge: remove unreachable code Daniel Scheller
2017-07-10  8:24   ` Ralph Metzler
2017-07-10 15:34     ` Daniel Scheller
2017-07-09 19:42 ` [PATCH 11/14] [media] ddbridge: fix impossible condition warning Daniel Scheller
2017-07-09 19:42 ` [PATCH 12/14] [media] ddbridge: fix dereference before check Daniel Scheller
2017-07-09 19:42 ` Daniel Scheller [this message]
2017-07-09 19:42 ` [PATCH 14/14] [media] MAINTAINERS: add entry for ddbridge Daniel Scheller
2017-07-10  8:11 ` [PATCH 00/14] ddbridge: bump to ddbridge-0.9.29 Ralph Metzler
2017-07-10 15:31   ` Daniel Scheller
2017-07-11  9:11     ` Ralph Metzler
2017-07-11 15:30       ` Daniel Scheller
2017-07-20 15:24         ` Mauro Carvalho Chehab
2017-07-20 18:25           ` Daniel Scheller
2017-07-20 21:16             ` Jasmin J.
2017-07-15 20:37 ` Richard Scobie
2017-07-23 12:16 ` 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=20170709194221.10255-14-d.scheller.oss@gmail.com \
    --to=d.scheller.oss@gmail.com \
    --cc=d_spingler@gmx.de \
    --cc=jasmin@anw.at \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=rjkm@metzlerbros.de \
    /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.