From patchwork Tue Nov 28 01:28:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10079033 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 89975602BC for ; Tue, 28 Nov 2017 09:29:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83ABD291E8 for ; Tue, 28 Nov 2017 09:29:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77A02291EB; Tue, 28 Nov 2017 09:29:10 +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 08614291E8 for ; Tue, 28 Nov 2017 09:29:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752129AbdK1J2v (ORCPT ); Tue, 28 Nov 2017 04:28:51 -0500 Received: from mail-it0-f44.google.com ([209.85.214.44]:35192 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754AbdK1J2t (ORCPT ); Tue, 28 Nov 2017 04:28:49 -0500 Received: by mail-it0-f44.google.com with SMTP id x28so202215ita.0 for ; Tue, 28 Nov 2017 01:28:49 -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=Y3t8qi7mXfDyM6uzpulpxqzjKsEWYBNPgMU31CnJoQI=; b=W6bAn1O2dQeYCcZPtJNWO9MlR3Nd9hR3rxKEXr4IsZkMkXYT4aR28351rSEyuT1BgU JRUEcubc4fe9LFcmTchJrdsl3Tao9+S5resd9rgyhTVuZuiex6H46ZAiGozMQNDqdezr PyR4fyoC8rQOm3KMq+EkHw4ToFACdT/CxbC9IMuk5TM1j0P6EwLJ1lthrVpkl9Y+ig2z 3Oiqil9ewmY0mHNqh+4Y9Ir/1Z3aKmtuSNtqRIELaRRISuNqsv/IKm2BHf+uvp8R/qmb P0J9JQsu2Qp2Z700VyBQ/nWSTjZQxbfXpSngtRkNbcYH7JUaOBi4tM5BvlX/h7dilGEe rYDQ== 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=Y3t8qi7mXfDyM6uzpulpxqzjKsEWYBNPgMU31CnJoQI=; b=Zwl8WwMvZqSBQH/LCzgFveE7rHY/x8iy8xMCbSFP3ioGkWeIhmWQvREN/7hLr2GG+t stuQXYhFYttbn9PVKZjIx5/PgVMHRVkBj+wTwSzal8w1Y7ranw1YB8mREXYJPPZrhy3D sjmzTpzxMB/M9egYR1DU0sZ4bFMp2/izkcPkpDrjZi5bB27ledUGUySopMk2pEtSlA0G mnbbx/i10FxJNj8mx7m3vYr7rJENCsyvCLekdHOw4vslebIqhphQVvYtTuqJadqB6+i8 S1Zr4o6kOmPWks6YYbPa9tcZ4FsstYfk3DRiWAajx2f/Q/tRgz6eRnumNJhvAG52PgXl RSng== X-Gm-Message-State: AJaThX7tkF3/7rO8W1FuBlAsK3SWF9MkJX442/F7Eb7hLFKzLiub8TC3 xfvmyPup3U5lW+dew3RYTYL1Lw== X-Google-Smtp-Source: AGs4zMaB32FzWXNCz2UwfpJoBAOVzacaSw5I38AOnwHIdlMGeBX4Nh/tgS+NS8OFh3gQOIYRRmVNng== X-Received: by 10.36.246.8 with SMTP id u8mr1563687ith.2.1511861328737; Tue, 28 Nov 2017 01:28:48 -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 n2sm4659681ioc.27.2017.11.28.01.28.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Nov 2017 01:28:47 -0800 (PST) Subject: [PATCH v2 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, dan.carpenter@oracle.com, hch@infradead.org Date: Tue, 28 Nov 2017 09:28:44 +0800 Message-ID: <1511832524.4399.20.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 between controller and system has msi 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-23 14:29:26.000000000 +0800 +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-11-24 15:16:20.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,17 @@ 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); + if (nvec == 1) { + dev_info(&pdev->dev, "msi enabled\n"); + goto msi_int1; + } + } + nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY); if (nvec < 1) return FAILED; - +msi_int1: flags = IRQF_SHARED; }