media: ddbridge: Kconfig option to control the MSI modparam default
authorDaniel Scheller <d.scheller@gmx.net>
Sat, 12 Aug 2017 11:56:01 +0000 (07:56 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 11:09:33 +0000 (07:09 -0400)
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>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ddbridge/Kconfig
drivers/media/pci/ddbridge/ddbridge-main.c

index c79a58f..1330b2e 100644 (file)
@@ -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.
index 420335f..181d5f1 100644 (file)
@@ -47,10 +47,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;