From patchwork Tue Dec 5 02:26:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10092653 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 F20AF6035E for ; Tue, 5 Dec 2017 10:26:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAAF6223A5 for ; Tue, 5 Dec 2017 10:26:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF8FA289ED; Tue, 5 Dec 2017 10:26:50 +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=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 69D41223A5 for ; Tue, 5 Dec 2017 10:26:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753003AbdLEK0t (ORCPT ); Tue, 5 Dec 2017 05:26:49 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:40336 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783AbdLEK0r (ORCPT ); Tue, 5 Dec 2017 05:26:47 -0500 Received: by mail-it0-f67.google.com with SMTP id f190so300239ita.5 for ; Tue, 05 Dec 2017 02:26:47 -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:cc:date:message-id:mime-version :content-transfer-encoding; bh=zIS6ev0FgQFlu0D3+aE6nQ0I5S/C+KbjKMLq0+IFfAI=; b=lZoPmfAwBzaUcI6U5a431liR2hv8IZskrd5bSAM7a3Keuvy5TvBHJnOTIemhvDP87z Y4VoBx+gQtVKaTkBl/VM0Pjfud3qyZ00RNZ1OBRmsKJ1bdwsbpVPW4pmFGQQBfTyADdv NXQGERbQ8errXbude5n2mzJri1z+9fUCdQCqgdDbBxLHrGAzJ6u0p1on6JxPFpv8OXkE D4uxeO9rzbno9xnzmEGXgToHF2UviF8A/fiR0wIPOUbL+B+35vJilUYDM/+KxtQ5Zamr QA4Uq197iLCf6Nl2G3wJJ3Heethkq/gTUZ9ajZgZ4yMzAit+bIR84ZO7DfoUnHP2OoGs BJfg== 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:cc:date:message-id:mime-version :content-transfer-encoding; bh=zIS6ev0FgQFlu0D3+aE6nQ0I5S/C+KbjKMLq0+IFfAI=; b=hxWtMhTfNMfSFEiV65u32YEE2YMquT83caSpaK/3tctjX2KKPzNCH6jjJxBqQ4AVAC BQf8as5eMHkh+UALTJ7ESfIVwbDgWihl1Fll81UpCDbpSLM1XbV+fAVAN3HtEWOaQDYy ZqXygHNvl29wRGdlH+hBZ5oE8B8ugS3QfiT8DOrb7ENJtEbxtUAed4hBWprrQECnHnvc AtkifvHkI+FHY1elJPijBQFOEz20xWYabgXTBscvxk3aaM8OVES4OQDm11ei93G+oWrJ SB7tj7peX7haNoWiCkTV8Jh65x56nB8kZLLlAIb8i7H2hPobdNnv/Ok+49TaEq9wMQJv gS4g== X-Gm-Message-State: AJaThX4nJVGM1V8yxtUfJSPlXBVOha3/zsX4eqSwEE5eM8CD8NVPbwjw JWV3wIKOPtc9ILZ7qqo5NU4tKg== X-Google-Smtp-Source: AGs4zMY1FJhw2VqwvbbbV8z7IhuusWPV89E48zwL8DBzj+iq5zu86Vqu5awaZ42FvdmcA6XGvNXHwQ== X-Received: by 10.107.112.14 with SMTP id l14mr28624242ioc.185.1512469606671; Tue, 05 Dec 2017 02:26:46 -0800 (PST) Received: from [192.168.0.105] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id c141sm6946562ioe.13.2017.12.05.02.26.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 02:26:45 -0800 (PST) Subject: [PATCH 16/17] scsi: arcmsr: Add driver module parameter msix_enable From: Ching Huang To: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: James.Bottomley@HansenPartnership.com, sfr@canb.auug.org.au Date: Tue, 05 Dec 2017 10:26:38 +0800 Message-ID: <1512440798.4577.83.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-12-05 16:59:58.000000000 +0800 +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-12-05 17:04:52.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) {