From patchwork Wed Dec 19 08:24:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10736831 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 6680B13BF for ; Wed, 19 Dec 2018 08:24:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 493442AC9F for ; Wed, 19 Dec 2018 08:24:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D8E92ACA3; Wed, 19 Dec 2018 08:24:09 +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 A944D2AC9F for ; Wed, 19 Dec 2018 08:24:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728075AbeLSIYI (ORCPT ); Wed, 19 Dec 2018 03:24:08 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:32838 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727721AbeLSIYH (ORCPT ); Wed, 19 Dec 2018 03:24:07 -0500 Received: by mail-it1-f194.google.com with SMTP id m8so10368732itk.0 for ; Wed, 19 Dec 2018 00:24:07 -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=W79rBrxGnb93lbkZiaWcxXd+OESd2r582tSzr9KIbuQ=; b=r8f6lSS2/t9384c/ZJghCODwKvdeievHyfBXPnya+/P4YfQNWiGnO2P3878pYcpPdu y85XqFHeKoTbN1lZ5O2OcSz2zYZq8hqXlbibn5rofmE6VXWGOznSSjbmp3yW6mm7NVAN DGc1xQgnAwwrCxHFoO0MDOlXcOw2ApOeNlfyaIS7QXEEQCi5nKfzHJjscUDeylCjKjBj NnpExE2BypMBZnyOO0TYUJDXLFzIa2aDoRITQNudWGBiq4OpAphTRD/Nfot3o7KxpDLs VgVqITO5HS2/YiEk5VDmCUzS/Do5ou4eZMv5H3vu8ikFwFXKBUvJpzA94Zkvvono3Zc1 91EQ== 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=W79rBrxGnb93lbkZiaWcxXd+OESd2r582tSzr9KIbuQ=; b=ny0jZiCZcfyr6jFxWovP9sjxht5vo5cGW5Djv+AZc73Hz0HSSCaSvKxnZch8pDQ5Iy EDSqYbUpDAx4BZa85/VMWCWlGDeWQiVbxO5OQKq4dD/9YTsnix8Ukjc5df+zvGr0LGl3 YWPtQNQ9rk2iJM+z8FPaLWcPlCAlD+a8RPCg6UVHPQFOYkIbhmCff30EXNf9yonfUBX7 yTmYllz1CQD8s8yZAtfOzUVyn70nrtmaO9RyW6tMftR7RHLSRrU4voTmc3ovwqjbt6WT qwXFvZtFrHbKOywge6EVI80j+dPdPDeYeODNLJQBWZGuSHgmrUylM+GyfwPQXqcai7Cl ENfg== X-Gm-Message-State: AA+aEWZvSzWLBIUtulIvAR+gzbA6tBos/wC5Ivcp37XIZd3tDaZKJHkz W0buX9Q5C8c2804CJNn3Lmrw0ZBbvPwd1g== X-Google-Smtp-Source: AFSGD/XY87/dkW8dWE0N/HCSuFv3rBbfL2yFARGHTLFKqorer5nFs+PaWwTr8MSj9bEFayxMSqXdyA== X-Received: by 2002:a24:45a1:: with SMTP id c33mr5656299itd.90.1545207846693; Wed, 19 Dec 2018 00:24:06 -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 j14sm8263816ioa.5.2018.12.19.00.24.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 00:24:06 -0800 (PST) Subject: [PATCH 1/12] scsi: arcmsr: Rename acb structure member roundup_ccbsize to ioqueue_size 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:24:03 +0800 Message-ID: <1545207843.4457.15.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 Rename acb structure member roundup_ccbsize to ioqueue_size Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index 9c397a2..256fe9a 100755 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h @@ -739,7 +739,7 @@ struct AdapterControlBlock #define ACB_ADAPTER_TYPE_C 0x00000002 /* hbc L IOP */ #define ACB_ADAPTER_TYPE_D 0x00000003 /* hbd M IOP */ #define ACB_ADAPTER_TYPE_E 0x00000004 /* hba L IOP */ - u32 roundup_ccbsize; + u32 ioqueue_size; struct pci_dev * pdev; struct Scsi_Host * host; unsigned long vir2phy_offset; diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 0f6751b..f3a7855 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -229,7 +229,7 @@ static void arcmsr_free_mu(struct AdapterControlBlock *acb) case ACB_ADAPTER_TYPE_B: case ACB_ADAPTER_TYPE_D: case ACB_ADAPTER_TYPE_E: { - dma_free_coherent(&acb->pdev->dev, acb->roundup_ccbsize, + dma_free_coherent(&acb->pdev->dev, acb->ioqueue_size, acb->dma_coherent2, acb->dma_coherent_handle2); break; } @@ -586,8 +586,8 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_B: { struct MessageUnit_B *reg; - acb->roundup_ccbsize = roundup(sizeof(struct MessageUnit_B), 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->roundup_ccbsize, + acb->ioqueue_size = roundup(sizeof(struct MessageUnit_B), 32); + dma_coherent = dma_zalloc_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); @@ -616,8 +616,8 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) case ACB_ADAPTER_TYPE_D: { struct MessageUnit_D *reg; - acb->roundup_ccbsize = roundup(sizeof(struct MessageUnit_D), 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->roundup_ccbsize, + acb->ioqueue_size = roundup(sizeof(struct MessageUnit_D), 32); + dma_coherent = dma_zalloc_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); @@ -658,8 +658,8 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) case ACB_ADAPTER_TYPE_E: { uint32_t completeQ_size; completeQ_size = sizeof(struct deliver_completeQ) * ARCMSR_MAX_HBE_DONEQUEUE + 128; - acb->roundup_ccbsize = roundup(completeQ_size, 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->roundup_ccbsize, + acb->ioqueue_size = roundup(completeQ_size, 32); + dma_coherent = dma_zalloc_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); @@ -668,7 +668,7 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) acb->dma_coherent_handle2 = dma_coherent_handle; acb->dma_coherent2 = dma_coherent; acb->pCompletionQ = dma_coherent; - acb->completionQ_entry = acb->roundup_ccbsize / sizeof(struct deliver_completeQ); + acb->completionQ_entry = acb->ioqueue_size / sizeof(struct deliver_completeQ); acb->doneq_index = 0; } break; @@ -3787,7 +3787,7 @@ static int arcmsr_iop_confirm(struct AdapterControlBlock *acb) cdb_phyaddr_hi32 = (uint32_t)((dma_coherent_handle >> 16) >> 16); writel(cdb_phyaddr, ®->msgcode_rwbuffer[5]); writel(cdb_phyaddr_hi32, ®->msgcode_rwbuffer[6]); - writel(acb->roundup_ccbsize, ®->msgcode_rwbuffer[7]); + writel(acb->ioqueue_size, ®->msgcode_rwbuffer[7]); writel(ARCMSR_INBOUND_MESG0_SET_CONFIG, ®->inbound_msgaddr0); acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; writel(acb->out_doorbell, ®->iobound_doorbell); From patchwork Wed Dec 19 08:27:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10736833 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 AFD0513AD for ; Wed, 19 Dec 2018 08:27:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95F262ACA1 for ; Wed, 19 Dec 2018 08:27:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A5A12ACA6; Wed, 19 Dec 2018 08:27:26 +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 2B6392ACA1 for ; Wed, 19 Dec 2018 08:27:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728072AbeLSI1Z (ORCPT ); Wed, 19 Dec 2018 03:27:25 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:36751 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727232AbeLSI1Z (ORCPT ); Wed, 19 Dec 2018 03:27:25 -0500 Received: by mail-it1-f194.google.com with SMTP id c9so8208941itj.1 for ; Wed, 19 Dec 2018 00:27:24 -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=BjIU07uw75gJi7hMfxzrb6YxnmuZ0Ii21pITOkRHldw=; b=Hyg7x9OtsQtmM1ozHUxJbCktX2YPox1aIrepvy/2grZ+ZxlINJd+/twL2/U0sUpFtY 0+y6YbdD+rZ+jeSeRs2HTLrBxtGHG4nZ8YWOPk8QboZfzLYboDgLlGFWf0Q+qQfAfCzn 54do0wLVTocWLRWBCTkR5NtV/hvGlQ43RfMgNcDH1VMd3FscwWKUAjYJYPxmNwBRNA6O OQ0t8VbWOSXL+c4eQeCi0grLROKvXRfytRc5GJtBbWRQaIwOUtGU3galAXLq7IdQFVS2 b9jpRMHnYlUIOe9llWxGb7jX35IXyBXkkktLHuiTKW22O67QQ+J6Gal8Kxz2QM0Mwr3O lFKg== 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=BjIU07uw75gJi7hMfxzrb6YxnmuZ0Ii21pITOkRHldw=; b=V3Reg8KZ3jymeRsVqer9vZuu2CoWGK8b7otKOag86DS6aR/pKBTP7TurzclQTuU0O8 0RYdQceZzCN3ecmO5TAu1F6NZcyGDX4VxoArQGNzJFZtCPfzf0OWsXJj4ILckRyw4Io+ fXCNq1ZL3AatqElUbY8M8IbtwTZ0idtO/PuQxRW/wJ8/gqaapmmMSZuQfEv9WUZEPtG1 yXA7AjZuxE1gsKz+gQYpsMONzS22yQTP/1k7Ut5cJKDtn7CwkIdBdG55fbd1Dbq8g9I1 Eb9tS1nY34KkEUJopCY512pTFf3V/t6urahvY4hDbVcOYoDPLpgkbBS0f/eDIQz/vB7W SSRg== X-Gm-Message-State: AA+aEWbxl8MeRH1tV5AiLgdsvUpUfeZUvf3rdOXih9+k0LWp8iMkDSdU naNT5fWU9/FhPlirdGTPQB6RBg== X-Google-Smtp-Source: AFSGD/U4r4r2Fg1S3HhnKytrfHwjBd7m0a2JHAKaSucRiTtHInTajY0miIWJfZl7aoXq1S5dZ7QtLw== X-Received: by 2002:a24:a0cb:: with SMTP id o194mr5294145ite.115.1545208044225; Wed, 19 Dec 2018 00:27:24 -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 u18sm7969329iom.15.2018.12.19.00.27.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 00:27:23 -0800 (PST) Subject: [PATCH 2/12] scsi: arcmsr: Rename arcmsr_free_mu to arcmsr_free_io_queue 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:27:20 +0800 Message-ID: <1545208040.4457.18.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 Rename arcmsr_free_mu to arcmsr_free_io_queue Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index f3a7855..f831c13 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -223,7 +223,7 @@ static struct pci_driver arcmsr_pci_driver = { **************************************************************************** */ -static void arcmsr_free_mu(struct AdapterControlBlock *acb) +static void arcmsr_free_io_queue(struct AdapterControlBlock *acb) { switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_B: @@ -990,7 +990,7 @@ scsi_host_remove: free_ccb_pool: arcmsr_free_ccb_pool(acb); free_hbb_mu: - arcmsr_free_mu(acb); + arcmsr_free_io_queue(acb); unmap_pci_region: arcmsr_unmap_pciregion(acb); pci_release_regs: @@ -1500,7 +1500,7 @@ static void arcmsr_free_pcidev(struct AdapterControlBlock *acb) pdev = acb->pdev; arcmsr_free_irq(pdev, acb); arcmsr_free_ccb_pool(acb); - arcmsr_free_mu(acb); + arcmsr_free_io_queue(acb); arcmsr_unmap_pciregion(acb); pci_release_regions(pdev); scsi_host_put(host); @@ -1558,7 +1558,7 @@ static void arcmsr_remove(struct pci_dev *pdev) } arcmsr_free_irq(pdev, acb); arcmsr_free_ccb_pool(acb); - arcmsr_free_mu(acb); + arcmsr_free_io_queue(acb); arcmsr_unmap_pciregion(acb); pci_release_regions(pdev); scsi_host_put(host);