From patchwork Sun Jul 23 18:16:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9858529 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0DB66603FD for ; Sun, 23 Jul 2017 18:17:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08279283BF for ; Sun, 23 Jul 2017 18:17:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F04AD28562; Sun, 23 Jul 2017 18:17:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01970283BF for ; Sun, 23 Jul 2017 18:17:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751547AbdGWSQz (ORCPT ); Sun, 23 Jul 2017 14:16:55 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34131 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbdGWSQt (ORCPT ); Sun, 23 Jul 2017 14:16:49 -0400 Received: by mail-wr0-f193.google.com with SMTP id o33so8345480wrb.1 for ; Sun, 23 Jul 2017 11:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=78tc3vPpOD+Hmt/q5JC7pJOZHdW3r8qXKZWCVnKVoKo=; b=iPFqicBNVr2iLQ3G2b6zogVg/wISOfvyS5KgAw4mfAlfs414QEsTXjx4hT+9Tr5w+8 m8INYQwfDmtyEzL+0GczleEOLptd5lKiXvjBpHrHRym77RYgtvRH9ov2O9Q372cMMRh+ 5WHlxDGjC2P6qlGwpZZus8xOQwIktsRm6/d5412y1tr10oxbBBZMnKheMFGFFj8XJIG0 NSzcFK2a1rSw1g1jQcjjHR6ufm3FRFPVQ9MEo0zY1isjnWxuX3NJeKnjl4q0a1o8CPaI CNb7E4DNaVUeK5k35PrlwysTnlYpbVn03/WrV+idFwtCWzATczwsdPM1r+ZPxuaYh3JX czoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=78tc3vPpOD+Hmt/q5JC7pJOZHdW3r8qXKZWCVnKVoKo=; b=e8a6/aUW73FjvstP2Dteefopd2BMlDSEVunIfN7z2Jm2F2cvbjwiAKZnUZZxV2p6gj 5S/IlPpTQwcqyFPBQEVftjk1UZTCL20A9Mj7ZnHqR2sac+bV62ZmIH41L7/VzC9M66SZ muij9APgxKJ++9tpazfR173awnl/QaWCH/FGfblul+by9d1YXtneYfzROIq9hcUc+6+U VJi5Qd10UumjetJyqEpqN/W4jbytvV0phib9ZtU/2lCdQCrWE7cW1OtMSeihsNgtyySf YT4LxiuTM7gSvizWfEKeqdUzqNbD0C+lGC4EKF8XD7xu3oKMTZ5SCs2/hQ/I4KYFmT1S z9ag== X-Gm-Message-State: AIVw1139TLJt4tdnPbg7AzeLfxN07cFBpiAKbs820ppNtNdMoRr7S222 a28SsynITfidAskm X-Received: by 10.223.133.3 with SMTP id 3mr9485876wrh.64.1500833808380; Sun, 23 Jul 2017 11:16:48 -0700 (PDT) Received: from dvbdev.wuest.de (ip-84-118-193-88.unity-media.net. [84.118.193.88]) by smtp.gmail.com with ESMTPSA id 93sm13247338wra.82.2017.07.23.11.16.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Jul 2017 11:16:46 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Cc: r.scobie@clear.net.nz, jasmin@anw.at, d_spingler@freenet.de, Manfred.Knick@t-online.de, rjkm@metzlerbros.de Subject: [PATCH RESEND 13/14] [media] ddbridge: Kconfig option to control the MSI modparam default Date: Sun, 23 Jul 2017 20:16:29 +0200 Message-Id: <20170723181630.19526-14-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170723181630.19526-1-d.scheller.oss@gmail.com> References: <20170723181630.19526-1-d.scheller.oss@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daniel Scheller 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 Signed-off-by: Daniel Scheller Tested-by: Richard Scobie Tested-by: Jasmin Jessich Tested-by: Dietmar Spingler Tested-by: Manfred Knick --- 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;