From patchwork Thu Nov 23 01:27:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10072567 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 B092560353 for ; Thu, 23 Nov 2017 09:27:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A98B029EFE for ; Thu, 23 Nov 2017 09:27:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E60729F00; Thu, 23 Nov 2017 09:27:25 +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 40B5729EFE for ; Thu, 23 Nov 2017 09:27:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbdKWJ1Y (ORCPT ); Thu, 23 Nov 2017 04:27:24 -0500 Received: from mail-io0-f175.google.com ([209.85.223.175]:38751 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbdKWJ1X (ORCPT ); Thu, 23 Nov 2017 04:27:23 -0500 Received: by mail-io0-f175.google.com with SMTP id h205so25270584iof.5 for ; Thu, 23 Nov 2017 01:27:23 -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=N6jSeosGNdIS2eNYjF4CSU91OIuv43pyF+HNkyswOwA=; b=eZEoW4bL3zi9i7nsUjtJhVWWDCSMFoWmu0k2SbmwODfzAAcuEPQO+TzJ2BMU4Z4Ehf yRu+hENOtWXIsYixpuZ+zF3mjYw95dOgz/1W7etjVyQWUWqKpBCMoSnzMYeaC3SOUtC5 7TtNjou9FbosRjx4YA8lWLsUVhDQltiO7V6abbABOm0xSns510WzSrWBzbwtT/VfCiAW 4IRE8r9h9ze823mpbaLE3OjeM5u4uG/uwKFUrrTO5BVi4cOVhHH82Tj0BP6iJxDmXEaP BjynVXOvVYSRWXJcYyhDks8S6yPykQ/0wjO1I9O+bVcyVRTG8zI6aYtpxEB/dsc9jckP XEGA== 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=N6jSeosGNdIS2eNYjF4CSU91OIuv43pyF+HNkyswOwA=; b=KwWIeahTSvCcQ/3MGr8K2ja5MryHSRSRIktRDszlW2wD8jsLIcU8OJDUnpySMxDPLi Bb/VKBVrE7LUHLbo0dPUiUdHc4YOTRwYmYWY4mL5ivLs1s2tWpw6EliUquMbnfhv7MWb sV16JE368pQwBS3rn8LjTvWiZuWc+VG9twqVX2uSPLpKReQex6i4lqYSBMmHK5ZOUAHf ADhHy1OiI2gLcZXO25cU0JCPjF7Ynab6DXhuQ4Zgoxn9oNYgoL4SQoYGe1jIBdRmoaAJ 0EBJwS32Fx7sS1YgeAjSOZpQqwe2A1QTUHRPpxT8h6pYQCV1vWrWlRoo51t2w2BVQ6I9 ax5g== X-Gm-Message-State: AJaThX5MEqxv8la76LQgDvajqRJuGgDfBfo1OQPkMSTxHiiA9bW7yGTR 76WE4m52mXdnedr+acwYKR2JRQ== X-Google-Smtp-Source: AGs4zMY8+TxpjFpX/d+JjYrr9HnKX4K29ygQpl4Eg3H8oRNzOxmbz1QZPZ39Z2fhGTE0OEM2SO72Rg== X-Received: by 10.107.164.225 with SMTP id d94mr25690474ioj.175.1511429242703; Thu, 23 Nov 2017 01:27:22 -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 g100sm1371879iod.84.2017.11.23.01.27.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 01:27:21 -0800 (PST) Subject: [PATCH 1/3] scsi: arcmsr: Add driver module parameter msi_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:27:19 +0800 Message-ID: <1511400439.9832.19.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 msi_enable to has a chance to disable msi 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 14:29:26.000000000 +0800 +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-11-23 16:02:28.000000000 +0800 @@ -75,6 +75,10 @@ MODULE_DESCRIPTION("Areca ARC11xx/12xx/1 MODULE_LICENSE("Dual BSD/GPL"); MODULE_VERSION(ARCMSR_DRIVER_VERSION); +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)"); + static int host_can_queue = ARCMSR_DEFAULT_OUTSTANDING_CMD; module_param(host_can_queue, int, S_IRUGO); MODULE_PARM_DESC(host_can_queue, " adapter queue depth(32 ~ 1024), default is 128"); @@ -831,11 +835,15 @@ arcmsr_request_irq(struct pci_dev *pdev, pr_info("arcmsr%d: msi-x enabled\n", acb->host->host_no); flags = 0; } else { - nvec = pci_alloc_irq_vectors(pdev, 1, 1, - PCI_IRQ_MSI | PCI_IRQ_LEGACY); + if (msi_enable == 1) + nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI); + else + nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY); if (nvec < 1) return FAILED; + if (msi_enable == 1) + pr_info("arcmsr%d: msi enabled\n", acb->host->host_no); flags = IRQF_SHARED; }