From patchwork Wed Dec 19 08:53:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10736921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F2356C5 for ; Wed, 19 Dec 2018 08:53:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E8172AA56 for ; Wed, 19 Dec 2018 08:53:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5287D2AEC7; Wed, 19 Dec 2018 08:53:52 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 511AA2AA56 for ; Wed, 19 Dec 2018 08:53:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728528AbeLSIxu (ORCPT ); Wed, 19 Dec 2018 03:53:50 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:37084 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727868AbeLSIxt (ORCPT ); Wed, 19 Dec 2018 03:53:49 -0500 Received: by mail-io1-f65.google.com with SMTP id k4so3546009iop.4 for ; Wed, 19 Dec 2018 00:53:48 -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=WgdFPlLFkxQ/SMzDT9mj9aSUL5NFG4zY5RYSkN5hQ6g=; b=zBny0wqgIMvX+4jx0R61m3BbKSNWuWtyyP3M9qRtRwG2A8L8rNfy7twXruFZaF4guC W7DMaXRinMlM/bVGCxZsPr17xgSUppYOEbdheiMYA2WWbzfoznWCZMHc8SEWwOmUF0aH g97Q5BFFw3fKFeNGUMOLcIfnJssUAFz/8aF4I2U3RZ0avit7rHZ7zSWOOln+kcV09Qdz 96fVxukApFZX0NraRRyvycsX6dkGMdz8lv0B6Qw68u+MShIhk2y7lo7kQJuZe1iTClac nmgm63Ch1ivTjt9JBfhSufuRGuZ20RFx0zN02TItUl5Th71RQV0l+ZCMEDLffHgmgYjh mT9A== 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=WgdFPlLFkxQ/SMzDT9mj9aSUL5NFG4zY5RYSkN5hQ6g=; b=m5qVkYb8YDqRR93+F5EPkDwS35lV0v+weaoWwXhrwJ4raY1rSNjMACnMgM25HMw1uW yBefb6jhpRj6suEl1JAwdUIP01VUK3LmH/TRTGWilTfLCiB0sgWSWUBSEBe6eRk8aZEB d4G7TjFWKu1SGUTHZ3IzxPXTngmw7UJjKSrx+Ai3FIlfZqmiT++0c9jwWqwNiWj2MLSu JVhIgnvWX5DRIPsIYYcbZfKCg74qasH15BiDQt5TGG8Jqqvx7/tPalrOw15hbaI9Usck dnYWCIs90UA5/rvwIyRcdBgy4+QrVyyPn+M28flrtQNadnepegDvKAvtqaul6fFGS+sg Kmwg== X-Gm-Message-State: AA+aEWaMcGxZMWIxPJVNCQvCgspX76wu13586uCT7jsUpYRQZ2XRs7Ws MxuA6TfGidKMLoaX/Hyl86G+kH1CEFkcXw== X-Google-Smtp-Source: AFSGD/X5f4Abkn6+amqimBhCexsWKKnCxBrsL/EDSHHgH6KiQfmZjDbOzqPDxWGVFL2UsyEQjTaJoA== X-Received: by 2002:a5e:8611:: with SMTP id z17mr17438309ioj.35.1545209627879; Wed, 19 Dec 2018 00:53:47 -0800 (PST) Received: from [192.168.0.130] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id o21sm8354301ioa.71.2018.12.19.00.53.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 00:53:47 -0800 (PST) Subject: [PATCH 9/12] scsi: arcmsr: Add an option of set dma_mask_64 for ACB_ADAPTER_TYPE_A From: Ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dan.carpenter@oracle.com, hch@infradead.org, colin.king@canonical.com Date: Wed, 19 Dec 2018 16:53:44 +0800 Message-ID: <1545209624.4457.41.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 an option of set dma_mask_64 for ACB_ADAPTER_TYPE_A Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 8cc2134..45f1374 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -91,6 +91,10 @@ static int cmd_per_lun = ARCMSR_DEFAULT_CMD_PERLUN; module_param(cmd_per_lun, int, S_IRUGO); MODULE_PARM_DESC(cmd_per_lun, " device queue depth(1 ~ 128), default is 32"); +static int dma_mask_64 = 0; +module_param(dma_mask_64, int, S_IRUGO); +MODULE_PARM_DESC(dma_mask_64, " set DMA mask to 64 bits(0 ~ 1), dma_mask_64=1(64 bits), =0(32 bits)"); + static int set_date_time = 0; module_param(set_date_time, int, S_IRUGO); MODULE_PARM_DESC(set_date_time, " send date, time to iop(0 ~ 1), set_date_time=1(enable), default(=0) is disable"); From patchwork Wed Dec 19 08:56:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10736927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 077876C5 for ; Wed, 19 Dec 2018 08:56:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9EC82AECA for ; Wed, 19 Dec 2018 08:56:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCC552AEE3; Wed, 19 Dec 2018 08:56:42 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 616F92AECA for ; Wed, 19 Dec 2018 08:56:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728518AbeLSI4k (ORCPT ); Wed, 19 Dec 2018 03:56:40 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:34120 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728511AbeLSI4j (ORCPT ); Wed, 19 Dec 2018 03:56:39 -0500 Received: by mail-io1-f68.google.com with SMTP id l22so418736ioh.1 for ; Wed, 19 Dec 2018 00:56:38 -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=RCWcP8gJB4rirILN0bofC1oYAZg1YWh8X8mwW4mc0QA=; b=vEQIdfS0S0Ssr7Xv/sk+/8IcYU6LzhY0Fvnq7kW5RO4wY4L70Py0vxrGhZHoAzbK/U e0jeOkXmFpDE5QSqy/EnEOTyqOlMKeBpBUai+C0OOV/pcW3lPt0TeRIKgHWPvgC9ynNQ 9G+xSLpGDUdVl4ht5Uw3Vru6Zx3P+hHHIf7SooJdz9ULYKCL/K+sZsemJFauxlPnRcvh Gbua595lW1bFW6Ss62Sku2tqoK+T5ybjJV6CltHy3etTBQlWWmyPNf6esxxzaRq5kPRf YbBRdkubnFefgXFxH5t+9DRZ+3YWK60/l9TJdWerkU5gHWVV/CH5jW1dnCiu+K6Xr0yb srqw== 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=RCWcP8gJB4rirILN0bofC1oYAZg1YWh8X8mwW4mc0QA=; b=IltXDiARoCazHeAEPjXMsaF95GB/NZmGpf9YwcLzNbTCxa18txomJ2gWyKg7XrOD4G Hvjtx8q21kzl17VGgsV7hZHVEMJANtqmx9za5w+63TN7HAMYfJmvgHKvqhW3LePX6DOj dGKjmdqti4oP2Z4QlPOwBS9N2cBdEFwGqDACdfdGUk/dWCaEa9wLJcrHfpTfZI+lhWeK CQkBZOHQT8vvgjiFSXw08YP5/5Z/8nXuHyFpepCGiImIJrZ167RhLqCAcUMvZDjFsgRq iKuNgALodtbP9WntyVU8vH38skA9dKcLmXjLKP3DuFjXVqI0tWFnJ4ufAMbk8YDatOs8 OUKA== X-Gm-Message-State: AJcUukdsf7k7FYofbHrr8qaAy5Q0Y6YmWnRrCtXMWUJAbxLUzG/PWDD7 2Vetz8kxKc1qH6m1Tp4Ca7O5Zg== X-Google-Smtp-Source: ALg8bN6Ik59OvwITCdmVBOaTPTDCr29jK8K3XqfhXSwE7i47Srftsuw6fILMBhttrfbAb9QZ1f1rJw== X-Received: by 2002:a5d:83c4:: with SMTP id u4mr1025620ior.213.1545209797961; Wed, 19 Dec 2018 00:56:37 -0800 (PST) Received: from [192.168.0.130] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id b25sm2938460itd.37.2018.12.19.00.56.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 00:56:37 -0800 (PST) Subject: [PATCH 10/12] scsi: arcmsr: Separate 'set dma mask' as a function From: Ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dan.carpenter@oracle.com, hch@infradead.org, colin.king@canonical.com Date: Wed, 19 Dec 2018 16:56:34 +0800 Message-ID: <1545209794.4457.44.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 Separate 'set dma mask' as a function Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 45f1374..30dff6c 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -927,6 +927,31 @@ static void arcmsr_init_set_datetime_timer(struct AdapterControlBlock *pacb) add_timer(&pacb->refresh_timer); } +static int arcmsr_set_dma_mask(struct AdapterControlBlock *acb) +{ + struct pci_dev *pcidev = acb->pdev; + + if (IS_DMA64) { + if (((acb->adapter_type == ACB_ADAPTER_TYPE_A) && !dma_mask_64) || + dma_set_mask(&pcidev->dev, DMA_BIT_MASK(64))) + goto dma32; + if (dma_set_coherent_mask(&pcidev->dev, DMA_BIT_MASK(64)) || + dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64))) { + printk("arcmsr: set DMA 64 mask failed\n"); + return -ENXIO; + } + } else { +dma32: + if (dma_set_mask(&pcidev->dev, DMA_BIT_MASK(32)) || + dma_set_coherent_mask(&pcidev->dev, DMA_BIT_MASK(32)) || + dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32))) { + printk("arcmsr: set DMA 32-bit mask failed\n"); + return -ENXIO; + } + } + return 0; +} + static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id) { struct Scsi_Host *host; @@ -941,22 +966,15 @@ static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id) if(!host){ goto pci_disable_dev; } - error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); - if(error){ - error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); - if(error){ - printk(KERN_WARNING - "scsi%d: No suitable DMA mask available\n", - host->host_no); - goto scsi_host_release; - } - } init_waitqueue_head(&wait_q); bus = pdev->bus->number; dev_fun = pdev->devfn; acb = (struct AdapterControlBlock *) host->hostdata; memset(acb,0,sizeof(struct AdapterControlBlock)); acb->pdev = pdev; + acb->adapter_type = id->driver_data; + if (arcmsr_set_dma_mask(acb)) + goto scsi_host_release; acb->host = host; host->max_lun = ARCMSR_MAX_TARGETLUN; host->max_id = ARCMSR_MAX_TARGETID; /*16:8*/ @@ -986,7 +1004,6 @@ static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id) ACB_F_MESSAGE_WQBUFFER_READED); acb->acb_flags &= ~ACB_F_SCSISTOPADAPTER; INIT_LIST_HEAD(&acb->ccb_free_list); - acb->adapter_type = id->driver_data; error = arcmsr_remap_pciregion(acb); if(!error){ goto pci_release_regs; @@ -1077,7 +1094,6 @@ static int arcmsr_suspend(struct pci_dev *pdev, pm_message_t state) static int arcmsr_resume(struct pci_dev *pdev) { - int error; struct Scsi_Host *host = pci_get_drvdata(pdev); struct AdapterControlBlock *acb = (struct AdapterControlBlock *)host->hostdata; @@ -1089,15 +1105,8 @@ static int arcmsr_resume(struct pci_dev *pdev) pr_warn("%s: pci_enable_device error\n", __func__); return -ENODEV; } - error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); - if (error) { - error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); - if (error) { - pr_warn("scsi%d: No suitable DMA mask available\n", - host->host_no); - goto controller_unregister; - } - } + if (arcmsr_set_dma_mask(acb)) + goto controller_unregister; pci_set_master(pdev); if (arcmsr_request_irq(pdev, acb) == FAILED) goto controller_stop; From patchwork Wed Dec 19 08:59:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10736931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9DB7B13AD for ; Wed, 19 Dec 2018 08:59:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8800E29F73 for ; Wed, 19 Dec 2018 08:59:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BED529F8E; Wed, 19 Dec 2018 08:59:58 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 133F329F73 for ; Wed, 19 Dec 2018 08:59:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728408AbeLSI7w (ORCPT ); Wed, 19 Dec 2018 03:59:52 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:38815 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727950AbeLSI7w (ORCPT ); Wed, 19 Dec 2018 03:59:52 -0500 Received: by mail-io1-f65.google.com with SMTP id l14so15029682ioj.5 for ; Wed, 19 Dec 2018 00:59:51 -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=j+h2YCxm7+KpXp0tpxHu9VDkXi6qv8hQffWn/Z4nLN0=; b=WgPhDiu3u8HpvnFgSU8q6nLjj/UySTp0J7S1jP9t3jdAx3EVTLe7kFVkWBcJadqLSb NOyJ+IA1UaCBPt2FVj0z9ZsliPMyP3nx7zQ9c9HRq/7JtuFtD2GsTQ+1TaswQ3EJ5SoA RgvXz50Sp01aAboPCKYDmwDY2ORc6z22NlDfB0bp0vBgqMMEH7270ZAtQdIEBF6hUFNf U8+VsbIHHTeqa9cLWli0eQpl47iOHkv+iwV07jLMPtP9PmKNo6NBZEVAC6gJwWlpitzs 8LcBSfRS/AvO5PEGCnb8mA2I+k740jsv8TuF2/Q2BEmQ65tzYRiVHHpSoWTCO838o/s4 Cfxw== 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=j+h2YCxm7+KpXp0tpxHu9VDkXi6qv8hQffWn/Z4nLN0=; b=QDV7BBlpsPNbePEz3XeLZUMAGHvCIwlel6lgqeyNjKzdbFeIxvhETtrT8nht8Y+cjL a6eA9VwhDAYNe5zO2ZpB34saLA0yxRPxYCmtk3Aj18dinBDhF8rbsS8nY6qZ8Z7z/aM+ qdKzxvE2yWEGGkcTq65TomFtvF7fe8uKoL5cjqnLtNA35M4q58471iEAXQcoLz7E2f0c lajYTtIQ1FYkMAFtVgKpY5jnbq3xVKl7SBaa2Jal68G44Ejro6Hbvuidk8RosA7WLXrt y4WAxs/LjAXkI66XWXVkra0fboKglt+WDBOyi7qE1PkXXRiJ9tus0oia+BiHD/K+75tI QsXg== X-Gm-Message-State: AA+aEWbuZEUQ58xTfrG9NR1lTKZlglkezli9s4H9Rgq5PrwPBbO4gxrC ag33OZomV4yqEAOanKhezuTcOA== X-Google-Smtp-Source: AFSGD/XIe+NpHvwiMLYBpxZgq4jj1S03ZnKMnKJdBZN+GekYQifgn7n8PmADqhV6GPCic23Ur/OUwA== X-Received: by 2002:a5d:91c7:: with SMTP id k7mr18720489ior.31.1545209991385; Wed, 19 Dec 2018 00:59:51 -0800 (PST) Received: from [192.168.0.130] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id a16sm403683iol.11.2018.12.19.00.59.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 00:59:50 -0800 (PST) Subject: [PATCH 11/12] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B From: Ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dan.carpenter@oracle.com, hch@infradead.org, colin.king@canonical.com Date: Wed, 19 Dec 2018 16:59:48 +0800 Message-ID: <1545209988.4457.47.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 Fix suspend/resume of ACB_ADAPTER_TYPE_B Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 30dff6c..9f85d5a 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -1110,12 +1110,21 @@ static int arcmsr_resume(struct pci_dev *pdev) pci_set_master(pdev); if (arcmsr_request_irq(pdev, acb) == FAILED) goto controller_stop; - if (acb->adapter_type == ACB_ADAPTER_TYPE_E) { + switch (acb->adapter_type) { + case ACB_ADAPTER_TYPE_B: { + struct MessageUnit_B *reg = acb->pmuB; + reg->post_qbuffer[0] = 0; + reg->postq_index = 0; + reg->doneq_index = 0; + break; + } + case ACB_ADAPTER_TYPE_E: writel(0, &acb->pmuE->host_int_status); writel(ARCMSR_HBEMU_DOORBELL_SYNC, &acb->pmuE->iobound_doorbell); acb->in_doorbell = 0; acb->out_doorbell = 0; acb->doneq_index = 0; + break; } arcmsr_iop_init(acb); arcmsr_init_get_devmap_timer(acb); From patchwork Wed Dec 19 09:02:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10736933 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 417B06C2 for ; Wed, 19 Dec 2018 09:02:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B52E2AA6B for ; Wed, 19 Dec 2018 09:02:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A3772AAA3; Wed, 19 Dec 2018 09:02:14 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 B3ED32AA6B for ; Wed, 19 Dec 2018 09:02:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728343AbeLSJCN (ORCPT ); Wed, 19 Dec 2018 04:02:13 -0500 Received: from mail-it1-f193.google.com ([209.85.166.193]:50196 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727868AbeLSJCN (ORCPT ); Wed, 19 Dec 2018 04:02:13 -0500 Received: by mail-it1-f193.google.com with SMTP id z7so8584624iti.0 for ; Wed, 19 Dec 2018 01:02:12 -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=EwN8VWRtxA4fG8RzQPWuFuWC/ns2jSuFgGSopCTHtl8=; b=CrClnKsjYxNgCdwA6wPR5TrDWQiZP2suV78nuWaZWlgDfKCQEpqLIA7g+zEvQMaqTj rLgu5Wtdy4n3LVqu/umqthswOFSws7XHHExt8mX5CvqegAf48lxQsHK+kLpNB9Ys09pq nu5W33wPzWvew6RGhhykVjiWVOsDxpiQflCW0NsNKmRFQ95Fop0ZHYjA4dljTe/+6zBU WCOQhhED4Y0ZLzvF2jbH9ORB7VxQW/CRCxr5cRdDskIG48WJIfHiB6Oh48sCwat5pMwO zdQUv71oWVGSxeNga06LLyU/lL7VyXG/BUP0QhZJJ4sGUevUEsU8sWyn5mfv7EH+wiH0 yeDw== 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=EwN8VWRtxA4fG8RzQPWuFuWC/ns2jSuFgGSopCTHtl8=; b=h5oZCkdXg852fUmMJtC6KJ6X8+RuWgeNcpkP/AK5XttchvsUIC+ALlaGDDYYUi7FvP B80bOc/brI6MAo5fqyElNjW7elYW0HJm2cXBqsOXucm63e7cTujuFYRYaHg2EdbRC1Nv xtZIK/+driND11lzkLzm9JiM5O4fMgqj2jrcxw7C4cVxmtZAvYRbmLMO9w49kLlrNRii gHe4BvxsFea3+ViuklGo71iH5VZt9Tm7/IqOIHIgSpSWnmM/ExPYcpCBhIJmjrcEGCcl 7NZqKNZckDFwcNnYw3GwfYhofGBWv2HmsNt101b3hhN892zT7vAPSJzFhF5CnJ8h5SOp mwFg== X-Gm-Message-State: AA+aEWbdGuEVyVg/4dNfEyYRlX0NrI+cbNyOe5Nh1H7Pq6DeqDeHgV7H xN1NNCG7d0qpXIt3EWhd0wgtyA== X-Google-Smtp-Source: AFSGD/Usj4qLd/D/2FZ5Iqnn1derTEbofO4sYY+bzVjVZ97EWhX93uZtyuEeXF1NhsJU6xdBGUNSOw== X-Received: by 2002:a24:64b:: with SMTP id 72mr5349161itv.59.1545210132271; Wed, 19 Dec 2018 01:02:12 -0800 (PST) Received: from [192.168.0.130] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id b188sm3045973itc.9.2018.12.19.01.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 01:02:11 -0800 (PST) Subject: [PATCH 12/12] scsi: arcmsr: Update driver version to v1.40.00.10-20181217 From: Ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dan.carpenter@oracle.com, hch@infradead.org, colin.king@canonical.com Date: Wed, 19 Dec 2018 17:02:08 +0800 Message-ID: <1545210128.4457.50.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 Update driver version to v1.40.00.10-20181217 Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index 9041edc..a94c513 100755 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h @@ -49,7 +49,7 @@ struct device_attribute; #define ARCMSR_MAX_OUTSTANDING_CMD 1024 #define ARCMSR_DEFAULT_OUTSTANDING_CMD 128 #define ARCMSR_MIN_OUTSTANDING_CMD 32 -#define ARCMSR_DRIVER_VERSION "v1.40.00.09-20180709" +#define ARCMSR_DRIVER_VERSION "v1.40.00.10-20181217" #define ARCMSR_SCSI_INITIATOR_ID 255 #define ARCMSR_MAX_XFER_SECTORS 512 #define ARCMSR_MAX_XFER_SECTORS_B 4096