From patchwork Thu Nov 23 01:31:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10072573 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 4EE8F60353 for ; Thu, 23 Nov 2017 09:31:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3684B29F07 for ; Thu, 23 Nov 2017 09:31:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2951929F08; Thu, 23 Nov 2017 09:31:24 +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 AEC5329F01 for ; Thu, 23 Nov 2017 09:31:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751906AbdKWJbX (ORCPT ); Thu, 23 Nov 2017 04:31:23 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:46176 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751462AbdKWJbV (ORCPT ); Thu, 23 Nov 2017 04:31:21 -0500 Received: by mail-io0-f194.google.com with SMTP id q64so13174175iof.13 for ; Thu, 23 Nov 2017 01:31:21 -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=azymLuNSqYhYSP0MR5i7x1Vg8FA2JObddqseTGasgvY=; b=g+CW+S7T/H9D8bslbXCjXzYTXcRhqA28meNCaSYI7kefwH4MXQxCAMavSUf3bo/eFK FAusuUsFUud/pDmVAwpr0+OsJ+zU4mQlPzft7kBuO2RYMVGYtyGhPY2GfpnzQs2svOAh AeEy+mLYcFvXhR8sDb+sKW4Oi4NSFQiBX60VHtdGLENJtZrE3OcbHntE/suD0paQlqQt MXzJX1tkgOgoNnTilLldlhvX8iicEierFhEydpnyjTv4URvmvDYgnqdnkpmRpdtRHBHD Gx+AZ7HgEccgHAJReb4v7947C/Cz1m66FvPslQ8X0WZRrOB9SPepaI34AuKi+BHiT89/ +LEw== 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=azymLuNSqYhYSP0MR5i7x1Vg8FA2JObddqseTGasgvY=; b=UARBDnw32mtkfbQjVIzyXHQ0rjWSOP6rtnXpXaxwUElc5PZn2vRo6zRpLY0YSbgIXB hPgcdBAmBIWv7BG03H6jsUB54zjsBBBKl8AyPM+gVvshFmJz/HiijE2hKjDYH/m615zM QHZDXNIS56y4UIxIdoyGdCN88bpS4O8OFQZsZu5LJuDkTPL3+UABAN9qz7gqcmLXygD3 IGbXk6c3thIM32dNGZdQr6CLFKN1Q3nRrYqopW2jObEZExcCjMMlNbpJtDrv/yUk+JX2 0o7Q6NIcv7+dzaveYYTRH8kLD+Ww+nOsD3TILUmXXcBEK6MZPIGMr2ltORIeyayI0DlU 1JTA== X-Gm-Message-State: AJaThX77JGfEbl9tDiHR7g7prGMb3ZS9YGs/l0fgHly1jLfvgD9k7kKe g18fTdSp+KkscOA19KZlDAmoqg== X-Google-Smtp-Source: AGs4zMaeVd/HEF0TzOHB48o2O2I+Oxdi6VIABXMpDXJgOU0mj3UFQ1md8LU7GXCCojsxiSdItJZRzg== X-Received: by 10.107.183.67 with SMTP id h64mr26121012iof.46.1511429480968; Thu, 23 Nov 2017 01:31:20 -0800 (PST) Received: from [192.168.0.119] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id 14sm3032567itj.34.2017.11.23.01.31.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 01:31:19 -0800 (PST) Subject: [PATCH 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, jthumshirn@suse.de, hare@suse.de, dan.carpenter@oracle.com, hch@infradead.org Date: Thu, 23 Nov 2017 09:31:14 +0800 Message-ID: <1511400674.9832.23.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 it does not work properly. 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-23 16:02:28.000000000 +0800 +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-11-23 16:09:24.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); else