From patchwork Thu Jan 17 03:40:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10767493 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 3E72014E5 for ; Thu, 17 Jan 2019 03:40:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D2912F882 for ; Thu, 17 Jan 2019 03:40:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21D422F88F; Thu, 17 Jan 2019 03:40:56 +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 C1A002F882 for ; Thu, 17 Jan 2019 03:40:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbfAQDkz (ORCPT ); Wed, 16 Jan 2019 22:40:55 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46775 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728177AbfAQDky (ORCPT ); Wed, 16 Jan 2019 22:40:54 -0500 Received: by mail-pg1-f193.google.com with SMTP id w7so3767905pgp.13 for ; Wed, 16 Jan 2019 19:40:54 -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=073snM5C8tLLsyr5QOcJderOjEQwtrw46iKbrgLbkBY=; b=aBQAJ/QGLLKeo/Sh+bpsPimJwKkiCu2r3sZxYeYZ65oJioO+i2hR2KE3guTBs45W7N D8xiYLt0kmMU+A4sh05qf34za0WEN86EdKbp/rB4VND/1CJfWoeUFlqT8samKtLVC+Ca cFVKtXpNEYQh77/9bXgYnbhW3bObFRTHp0ckbMW2codGcuNXT8ndKo+TuSGVNSdXan8r 9ES5/yAZsHvvm10cixoBcegaBxgKaSF3F5nB8HFRWiC/pzQcJjHXMAEwi8asiGIXGuri qSWdxPtcpw33LOjNN61J/LuQSPfYVLjR4fqkENX9XxRIyPwrx8bBcTKLXWIzGPdyHRjb 92+Q== 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=073snM5C8tLLsyr5QOcJderOjEQwtrw46iKbrgLbkBY=; b=plmxLofaS1dyX/+uJHQ+0s4QPva6ZKSgncswnrCQWCEq98AfWmR9I2Z9r5BogX5W68 sYwhqhGvoBr/h5G76fTdrCKo4+oI7GNl4CTxgDFHTO9/h0n91n4dsHRah7SUzWQMbdrH 5WA8Vv3s+nEU0K/ryYQfna4IcuprtBfZ8qGGDhuiA9De2Q+dlUzDp+yI1wyqEglz/iHB Yzia22IWOtoef0xqzeQBv/OT1T5p2fx1sNI8RYSyM/PlSwYaAgk3KZ7dEcu0c8hx2BHe cFsGTfuOKsCriqRohbcP7/JiU2jpW3DpDEH42UpwAq8Ozk592Fe2BGRbiMQkoj+YiJdK m76w== X-Gm-Message-State: AJcUuke7KVgvumebHXB9+Z4WM8Hv31DRdl0gtm6xgh3dsgX7K/M9ywML 3SqGlwzajywM3yRFK5aMhXN2Ng== X-Google-Smtp-Source: ALg8bN62ewq3wexhbsp9rdT0SIBdLBjJT6A30XdieuHDlDSqzl+LFvZBuLmzqtSsfC5tG8ppM8RhPw== X-Received: by 2002:a62:4641:: with SMTP id t62mr13092128pfa.141.1547696453925; Wed, 16 Jan 2019 19:40:53 -0800 (PST) Received: from [192.168.0.79] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id f67sm360605pff.29.2019.01.16.19.40.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 19:40:53 -0800 (PST) Subject: [PATCH 1/3] scsi: arcmsr: Use dma_alloc_coherent to replace dma_zalloc_coherent 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: Thu, 17 Jan 2019 11:40:50 +0800 Message-ID: <1547696450.4339.17.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 Due to dma_zalloc_coherent will be phase out, so use dma_alloc_coherent to replace it. Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 9f85d5a..5736434 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -642,7 +642,7 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_B: { acb->ioqueue_size = roundup(sizeof(struct MessageUnit_B), 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->ioqueue_size, + dma_coherent = dma_alloc_coherent(&pdev->dev, acb->ioqueue_size, &dma_coherent_handle, GFP_KERNEL); if (!dma_coherent) { pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no); @@ -656,7 +656,7 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) break; case ACB_ADAPTER_TYPE_D: { acb->ioqueue_size = roundup(sizeof(struct MessageUnit_D), 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->ioqueue_size, + dma_coherent = dma_alloc_coherent(&pdev->dev, acb->ioqueue_size, &dma_coherent_handle, GFP_KERNEL); if (!dma_coherent) { pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no); @@ -672,7 +672,7 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) uint32_t completeQ_size; completeQ_size = sizeof(struct deliver_completeQ) * ARCMSR_MAX_HBE_DONEQUEUE + 128; acb->ioqueue_size = roundup(completeQ_size, 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->ioqueue_size, + dma_coherent = dma_alloc_coherent(&pdev->dev, acb->ioqueue_size, &dma_coherent_handle, GFP_KERNEL); if (!dma_coherent){ pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no); From patchwork Thu Jan 17 03:45:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10767497 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 439AA14E5 for ; Thu, 17 Jan 2019 03:45:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CF4E2D8A3 for ; Thu, 17 Jan 2019 03:45:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C2512D9DF; Thu, 17 Jan 2019 03:45:08 +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 A36E42D8A3 for ; Thu, 17 Jan 2019 03:45:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728252AbfAQDpH (ORCPT ); Wed, 16 Jan 2019 22:45:07 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43090 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728152AbfAQDpG (ORCPT ); Wed, 16 Jan 2019 22:45:06 -0500 Received: by mail-pl1-f196.google.com with SMTP id gn14so4041441plb.10 for ; Wed, 16 Jan 2019 19:45:06 -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=rRQzgU5z/NPfrgHuTm6KB2ev9Kvfh2XOpogWLR16sW0=; b=VSDwgXPRL7nvx3InzaIyIsQE23gxqDSgXdfCmNA4OnDDpKM0LR8JiTiiluaxLz4uv3 OxLLi/sguygzU/1Zyd6qsAUznRr1zo34K2Qy5nUxE3Vbr2ud/PRtwDU2G+um/8UDYM+Y PS4y1BegoIOXFAZakosjoYvIQ3KUCfmktTwyPLj0pI1W2v5MoiIax0zI8v8kAi4iMl4G aAGGC7eopCGKE36ZlrwAPDIw3M8dKKAiFs/dDceVKLH8tCDRmftLo26svfTDTEF8/gR5 SLTB6b/4h00gz2B3pJcPYNc9MzHhPX3EQRVmuwBz0vPnkGCfhWs93r8bFqZoIt/FC4A/ gikw== 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=rRQzgU5z/NPfrgHuTm6KB2ev9Kvfh2XOpogWLR16sW0=; b=DvbOvgB27a4qPYCHwm59fNzW1bs+kxdPGXDRFYJAa+cw7xozwsfe/2PdUAhj1b2aI4 GO8c+1WMV3Qdin3zXekoxR3Ph/Cw7Z3E/1F6szzqyy9fknJ2XLiWohLm5MTtHlbJe/XT NZhn6GEcUa5d3dQkggrrRtExWEhIDlVJsz0ga+j7V42eOJvilQ5u17v9O0b96307rgeg 96NnIysjs6laOZ28XP7pZKhCK/hyvddOayprFrcwrdumChjURaxWC6fNaLs2y1Z5EWEU lQbIeTUxYtGfzw9ByqeP/CD9MvBsy9z7fnh8L7GV3XrSqXKhiGzdO0xaoVsBsUAa4i/2 Qe8Q== X-Gm-Message-State: AJcUukfYviSCIkDmI9puvYvgmQdNjBEAbWslpY1u8VtWk6A5dxRu6/pT bUQRfEr8PJVh2dlRgZYaiAWhsA== X-Google-Smtp-Source: ALg8bN5HR0uPxjHjxRvpxBsAh5HlMO/3slRbg4XfHYIHiIKVpmKl8wjjiOu1X/O+djHadlM9BtoMlA== X-Received: by 2002:a17:902:8e8a:: with SMTP id bg10mr13325644plb.192.1547696706020; Wed, 16 Jan 2019 19:45:06 -0800 (PST) Received: from [192.168.0.79] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id w23sm253702pgc.72.2019.01.16.19.45.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 19:45:05 -0800 (PST) Subject: [PATCH 2/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2 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: Thu, 17 Jan 2019 11:45:03 +0800 Message-ID: <1547696703.4339.21.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 part 2. Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index a94c513..b98c632 100755 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h @@ -508,9 +508,9 @@ struct MessageUnit_A struct MessageUnit_B { uint32_t post_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; - uint32_t done_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; + volatile uint32_t done_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; uint32_t postq_index; - uint32_t doneq_index; + volatile uint32_t doneq_index; uint32_t __iomem *drv2iop_doorbell; uint32_t __iomem *drv2iop_doorbell_mask; uint32_t __iomem *iop2drv_doorbell; diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 5736434..88053b1 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -1113,7 +1113,11 @@ static int arcmsr_resume(struct pci_dev *pdev) switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_B: { struct MessageUnit_B *reg = acb->pmuB; - reg->post_qbuffer[0] = 0; + uint32_t i; + for (i = 0; i < ARCMSR_MAX_HBB_POSTQUEUE; i++) { + reg->post_qbuffer[i] = 0; + reg->done_qbuffer[i] = 0; + } reg->postq_index = 0; reg->doneq_index = 0; break; From patchwork Thu Jan 17 03:47:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10767499 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 CE6341390 for ; Thu, 17 Jan 2019 03:47:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8D9A2E311 for ; Thu, 17 Jan 2019 03:47:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD0E72E83C; Thu, 17 Jan 2019 03:47: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 553072E311 for ; Thu, 17 Jan 2019 03:47:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728289AbfAQDrv (ORCPT ); Wed, 16 Jan 2019 22:47:51 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45561 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728279AbfAQDrv (ORCPT ); Wed, 16 Jan 2019 22:47:51 -0500 Received: by mail-pg1-f196.google.com with SMTP id y4so3779967pgc.12 for ; Wed, 16 Jan 2019 19:47: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=55pVNeFKzPaW8QlgBj+2v+k8YuG65KRmocIt1/5rBWI=; b=zL+KZsmo+vMJ/aqnQFhGrZ9iIBj/VJ3wDIdM07bamAKu+mcqFx6bD+++8M98Ac44Ub 4xfewk5bq1a9iB9E9FUOywmqGhqGL83cpkfmp3jUoEiyHnFwPyJEYT0tX5dW0H7nbYb0 g2GbMrrdBk5mXPdhuqYo2qMPrDf7re4QcB9srUYEdhjjp85HyeY9L3v4pTdvNc/Nu9XQ +VD1cNh+4SyYDkZDUDjbU6KTdx5DRME/aSMRkltsXx3vyay75oZIB1IFgUrUNxp8cWyy uQpenNZAllC+kXO2V5QozetXqfHOiIhrtszbmFmQulLfURMKok2tHwt4qKqlKCFsZfe+ tyQw== 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=55pVNeFKzPaW8QlgBj+2v+k8YuG65KRmocIt1/5rBWI=; b=RfFeWrA8YOwecGnpbjGCRt+s+oRqE7DuOlj5idrD8C5OQS+zuU6kMEqYVm/9OuhJ4o fvXJr94pas3dJ9XnoX3Ard2TiAt5MhF2CALrbW13nQRqtahmnPGN5nERZpkkybLpuPQr EGXqKgi6ikNuYAf1Uxh0PYSES/4hbTTDLouxtoOV7HHsXmltLx0+jxHy2FRiG5crqJzv 62BrsKWsgroQkTqg8UuinmtrllIhsWthMwJlsy/OEejdUr88h6w2VtHjKYj20k+ZRNTl WSCKSoiPYkF3MctZHGdrLx8E2I3UpRvLquz5xuGnno1N5rI4fYB8aHd6sZa/83ZZJ97t GWxg== X-Gm-Message-State: AJcUukdCGYIfKMYC1VXQkBi5FuYHXCyefHnfrItWJqpFrtiRaMKNNty7 0aNnFXO6crQL7Do4oBQqXonO5g== X-Google-Smtp-Source: ALg8bN76BAmuTEO/FhBVOCKJM8WpBJiQElk+jmdxavFUJA5M+8BMG/9E6fg83xDuQUv4rBkvCPS0Pw== X-Received: by 2002:a62:c21c:: with SMTP id l28mr13195449pfg.74.1547696870898; Wed, 16 Jan 2019 19:47:50 -0800 (PST) Received: from [192.168.0.79] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id c13sm310421pfo.121.2019.01.16.19.47.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 19:47:50 -0800 (PST) Subject: [PATCH 3/3] scsi: arcmsr: Update driver version to v1.40.00.10-20190116 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: Thu, 17 Jan 2019 11:47:48 +0800 Message-ID: <1547696868.4339.24.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-20190116. Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index b98c632..6033bcc 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.10-20181217" +#define ARCMSR_DRIVER_VERSION "v1.40.00.10-20190116" #define ARCMSR_SCSI_INITIATOR_ID 255 #define ARCMSR_MAX_XFER_SECTORS 512 #define ARCMSR_MAX_XFER_SECTORS_B 4096