From patchwork Tue Nov 28 01:32:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10079037 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 1117A6056A for ; Tue, 28 Nov 2017 09:32:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B526291E8 for ; Tue, 28 Nov 2017 09:32:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3BED291EB; Tue, 28 Nov 2017 09:32:49 +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=-5.4 required=2.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI autolearn=unavailable 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 0C243291E8 for ; Tue, 28 Nov 2017 09:32:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751395AbdK1Jcb (ORCPT ); Tue, 28 Nov 2017 04:32:31 -0500 Received: from mail-pl0-f50.google.com ([209.85.160.50]:41257 "EHLO mail-pl0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845AbdK1Jc3 (ORCPT ); Tue, 28 Nov 2017 04:32:29 -0500 Received: by mail-pl0-f50.google.com with SMTP id u14so10307664plm.8 for ; Tue, 28 Nov 2017 01:32:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=areca-com-tw.20150623.gappssmtp.com; s=20150623; h=subject:from:to:date:message-id:mime-version :content-transfer-encoding; bh=a3c4MlyNS/Nc/7jOXpiH5dd6VWvtq/FfNX1ismvdn3E=; b=gohPAcBGRL6KogUmk+kIy3Tjt0UgJUz428JVTjw9Vy6QT21YSdit5MU669TqvXAt2k Myu4hsdVaKa4FHbQO7eaPLt/5XY7lX4JACkoJmWv8wrpCwwvjH21qvUg+jwZyUOdBfVv N92A2hsXt1dgJj7b8uLrr4LAroJcH3dgDwOkFiZCoE37QTmwFyW5Z8RFK+zfPhXBM3Bw f3dE85HudF/E1W28OpiS2uMXXFvYnJCKPQOw0U9ZpF4V5MXSRggOOxfBhsPdin0WoT9e jj/DzNIUiASGriYdBzLOB8p8i3K+WYU/ULmZugoFU2Kzu9d4OiplzqH8NxWlsT00nTbU 5BIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:date:message-id:mime-version :content-transfer-encoding; bh=a3c4MlyNS/Nc/7jOXpiH5dd6VWvtq/FfNX1ismvdn3E=; b=Z7FcYJQKgMKrf6X4Ymq9+VB/x/tAz8l1p6mT4gaiE4HQ6Nm3JrD/jC4HxOJIK/VglK 39EYR+prL8tX//fRTIDcZ1gVYbRa62xyub2CxCnpObzwPuK25mtzTY9aO7OqviXeEBBs He3CMfHIfzfa3Tn7RI0lw6GuYR2lSQYVV+m0JTxYhMIjJ0SgqbQncwAzGWiGKb9amQCS T2WIrgIqse8dkN6PIOIOv3wQEcu9InL2VGL1f2syG+hJ2Mb+nluL7bzHTc7jg4/ysb/o V4uXIXn/vd3cc/qMAp7FkLzxAIjZZE4tGaBG0V1M68N7IeZVKsybW0XMjlcwStB7gMXJ gdzQ== X-Gm-Message-State: AJaThX5ESFWjQnbF+CWHEls/LolwXCnwY3Z4ZK8dns/IQHDCqxqBV77C if4KZW+rPOsuoxIgwqQgQogZTxLF X-Google-Smtp-Source: AGs4zMZnUE70mJeHt6cVleZyYb/b+ZaWZWAGiLTb3xa3nU20W3gnF7h6vKbTjS9hDzGKvCb4khUkeQ== X-Received: by 10.84.169.1 with SMTP id g1mr7318220plb.134.1511861548874; Tue, 28 Nov 2017 01:32:28 -0800 (PST) Received: from [192.168.0.59] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id y131sm38632935pfg.125.2017.11.28.01.32.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Nov 2017 01:32:27 -0800 (PST) Subject: [PATCH v2 2/3] scsi: arcmsr: Add driver module parameter msix_enable From: Ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, dan.carpenter@oracle.com, hch@infradead.org Date: Tue, 28 Nov 2017 09:32:24 +0800 Message-ID: <1511832744.4399.24.camel@Centos6.3-64> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-37.el6) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ching Huang Add module parameter msix_enable to has a chance to disable msix interrupt if between controller and system has msix INT compatible issue. Signed-off-by: Ching Huang diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c --- a/drivers/scsi/arcmsr/arcmsr_hba.c 2017-11-24 15:16:20.000000000 +0800 +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-11-24 15:17:46.000000000 +0800 @@ -75,6 +75,10 @@ MODULE_DESCRIPTION("Areca ARC11xx/12xx/1 MODULE_LICENSE("Dual BSD/GPL"); MODULE_VERSION(ARCMSR_DRIVER_VERSION); +static int msix_enable = 1; +module_param(msix_enable, int, S_IRUGO); +MODULE_PARM_DESC(msix_enable, "Enable MSI-X interrupt(0 ~ 1), msix_enable=1(enable), =0(disable)"); + static int msi_enable = 1; module_param(msi_enable, int, S_IRUGO); MODULE_PARM_DESC(msi_enable, "Enable MSI interrupt(0 ~ 1), msi_enable=1(enable), =0(disable)"); @@ -829,12 +833,15 @@ arcmsr_request_irq(struct pci_dev *pdev, unsigned long flags; int nvec, i; + if (msix_enable == 0) + goto msi_int0; nvec = pci_alloc_irq_vectors(pdev, 1, ARCMST_NUM_MSIX_VECTORS, PCI_IRQ_MSIX); if (nvec > 0) { pr_info("arcmsr%d: msi-x enabled\n", acb->host->host_no); flags = 0; } else { +msi_int0: if (msi_enable == 1) { nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI); if (nvec == 1) {