From patchwork Tue Dec 5 01:28:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10092541 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 8D29B60327 for ; Tue, 5 Dec 2017 09:28:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C01A2889A for ; Tue, 5 Dec 2017 09:28:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 805B3288A1; Tue, 5 Dec 2017 09:28:17 +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 70F242889A for ; Tue, 5 Dec 2017 09:28:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbdLEJ2P (ORCPT ); Tue, 5 Dec 2017 04:28:15 -0500 Received: from mail-it0-f47.google.com ([209.85.214.47]:36983 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752730AbdLEJ2N (ORCPT ); Tue, 5 Dec 2017 04:28:13 -0500 Received: by mail-it0-f47.google.com with SMTP id d137so13687096itc.2 for ; Tue, 05 Dec 2017 01:28:13 -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=RKnYXI3casdFVfkexGXDMiO++X06Uk7TxkbSFPCuG0E=; b=iKZH1b2o9X6dNfE1YxyhEvJcPS4Na7BF4W+Wmg7r1eQN1ljEeI4u7hYhsFO6tV1a/4 F2YE3uYypnCl1limQw68oe3BeQVuO+BM+DqknSnfGUCjEFCRCD5NB0zYoJ8cxTRJgCut 1xpFYzyRFXh1wcON7taHG4T6+qdSIWJbDAFHL5ZScYIwFj3cF2VNl1C07MaD2YehDOcN 4COmDysEUosJSQlNJCXuzZjl4jY7wmLA4Bt86uIhKncoJFoIaVCHdyRQuP3mXKpFTmxs +mrYmb3gSgPmKVldd6Qx8ozbfAdfkNZfWLfE4/5xJqHoDIjbY69Mzti5UvUYrxjOzw3Y Dk6A== 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=RKnYXI3casdFVfkexGXDMiO++X06Uk7TxkbSFPCuG0E=; b=gXmvi8SjNCkKhMVYIrK1t3nXLBL1h2ikrNxf4NRt6B6hvbtGWow/ZUe2JaKhe+UVY8 12G+9SKDay99HJGAH2e99oDQGAwawQusEooTdbS303JnKDUY79jWpw6UpFgnfWnJwSJN KFPvwIYkxRaLnH1qa15nY9JzZidxfyLDhi5/V1nxetSKI+kPYDU4YC+cwLQBm6AzpPTt qYeVq3/1qEM5JZIU0Ty4pnlMOWL5I23ND1ZJbdRK71CMRELX1pK08/w/eN/M4OG7sBoD r8EWyZj3GQpHjIMg4zDlHM7d4VgRgAgYHcp1/TN6RUTfDbyE8ucuGPmn7kGjv/A4/IBT byMQ== X-Gm-Message-State: AKGB3mK1Fkks1fMN9hDwY+A8Swie833cLZegcylE+pLgtQYtkA1rukAh jcWBeUDouS3uarHyNireCQJAIbum X-Google-Smtp-Source: AGs4zMYOu5kxENLHRT0D6RRjRtS+FvSca5neTcqFXmxSsUpSRtWXAURCMQJ9stjHLDPT01dgzsfWLg== X-Received: by 10.36.39.8 with SMTP id g8mr9377233ita.42.1512466093105; Tue, 05 Dec 2017 01:28:13 -0800 (PST) Received: from [192.168.0.105] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id q62sm4916352itb.31.2017.12.05.01.28.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 01:28:11 -0800 (PST) Subject: [PATCH 1/17] scsi: arcmsr: redefine ACB_ADAPTER_TYPE_A, _B, _C, _D and subsequent changes. From: Ching Huang To: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: James.Bottomley@HansenPartnership.com, sfr@canb.auug.org.au Date: Tue, 05 Dec 2017 09:28:04 +0800 Message-ID: <1512437284.4577.30.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 redefine ACB_ADAPTER_TYPE_A, _B, _C, _D and subsequent changes. Signed-off-by: Ching Huang diff -uprN a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h --- a/drivers/scsi/arcmsr/arcmsr.h 2017-12-05 10:45:50.000000000 +0800 +++ b/drivers/scsi/arcmsr/arcmsr.h 2017-08-03 18:54:46.000000000 +0800 @@ -621,10 +621,10 @@ struct MessageUnit_D { struct AdapterControlBlock { uint32_t adapter_type; /* adapter A,B..... */ - #define ACB_ADAPTER_TYPE_A 0x00000001 /* hba I IOP */ - #define ACB_ADAPTER_TYPE_B 0x00000002 /* hbb M IOP */ - #define ACB_ADAPTER_TYPE_C 0x00000004 /* hbc P IOP */ - #define ACB_ADAPTER_TYPE_D 0x00000008 /* hbd A IOP */ + #define ACB_ADAPTER_TYPE_A 0x00000000 /* hba I IOP */ + #define ACB_ADAPTER_TYPE_B 0x00000001 /* hbb M IOP */ + #define ACB_ADAPTER_TYPE_C 0x00000002 /* hbc L IOP */ + #define ACB_ADAPTER_TYPE_D 0x00000003 /* hbd M IOP */ u32 roundup_ccbsize; struct pci_dev * pdev; struct Scsi_Host * host; diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c --- a/drivers/scsi/arcmsr/arcmsr_hba.c 2017-12-05 10:45:30.000000000 +0800 +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-12-05 11:47:40.000000000 +0800 @@ -1785,7 +1785,7 @@ arcmsr_Read_iop_rqbuffer_data(struct Ada uint8_t __iomem *iop_data; uint32_t iop_len; - if (acb->adapter_type & (ACB_ADAPTER_TYPE_C | ACB_ADAPTER_TYPE_D)) + if (acb->adapter_type > ACB_ADAPTER_TYPE_B) return arcmsr_Read_iop_rqbuffer_in_DWORD(acb, prbuffer); iop_data = (uint8_t __iomem *)prbuffer->data; iop_len = readl(&prbuffer->data_len); @@ -1871,7 +1871,7 @@ arcmsr_write_ioctldata2iop(struct Adapte uint8_t __iomem *iop_data; int32_t allxfer_len = 0; - if (acb->adapter_type & (ACB_ADAPTER_TYPE_C | ACB_ADAPTER_TYPE_D)) { + if (acb->adapter_type > ACB_ADAPTER_TYPE_B) { arcmsr_write_ioctldata2iop_in_DWORD(acb); return; }