From patchwork Wed Nov 8 23:26:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10050323 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 5879D60381 for ; Thu, 9 Nov 2017 07:27:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47C3929747 for ; Thu, 9 Nov 2017 07:27:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B0722A9E7; Thu, 9 Nov 2017 07:27:20 +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 E1F6729747 for ; Thu, 9 Nov 2017 07:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752719AbdKIH1I (ORCPT ); Thu, 9 Nov 2017 02:27:08 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:52071 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbdKIH1G (ORCPT ); Thu, 9 Nov 2017 02:27:06 -0500 Received: by mail-io0-f193.google.com with SMTP id b186so8773420iof.8 for ; Wed, 08 Nov 2017 23:27: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:date:message-id:mime-version :content-transfer-encoding; bh=dR3so7Z1GtRpECpf2J04vGyJF8hPLyncMPi0rn0r8G0=; b=IfankXVhuB2N1Dy2Z3FzQJSn15+3tbuS5jFfMlseg21bwT+X/cFU1XIvNUeszyd1HO JMDhrmeNsUk9Rh4eIeeB3cFN4sGajRqSj4cXSWXZy+Fg7iIEf5VK/iMgk5A3L9vIZPDV MOlw8Xl247DlABYJyRva2C8i3KT+RWp+QWdh1VstSxHVFFCut/1ULYDL1FAAQcOMNgmm V3D1PJ8QFP+VnuDbyJ2lzgk6rxSY2tABWgoMUndK6h9QST4W/oL0CqvQR228tfF40Uf3 eOoJLt1jwq9fC5+T0Qu3L916tw6qIqaljeV3T3+JqybxMV9lR0hmNjyJtN9WTP9elyxw vKKg== 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=dR3so7Z1GtRpECpf2J04vGyJF8hPLyncMPi0rn0r8G0=; b=JXbHNXjyYDIZbjKk+D+Hge3DDPkhmUUtzV3wpwUvBHHTyWVfPZBSr/36kA4DSeZe2M 25fspPNzzpqvR94zOqb0db+8vToxpQxfXyY0aPTl97E8SSQzViklqQ71wYDBosLVwJVK StNTdJ4tb5UBf8vla6FWa1MCXj/rYLYJ9uGk+sYnWGaRQ5/m5BIUf0pDsYUhtrdxX/6J 3AiWD5Ue3ALdlgInd8UISKPCC6qjICaZx29FsjJkZV3kJ9EWGOQTSQLM8s8m0pVZZSA/ yVhONPe2hjJN0RZBB5tfBDufZuTyuMZBaWtISMlVQyAn8w2rzdJ40Bu+fZIAC9LDLUjB /4Dw== X-Gm-Message-State: AJaThX4Omvor6zQXWnGivEDP61Gt9cCUMPgzm58F9LVUOJccRgBbNopb Sx+LMFg7FFh5nOlEX5j/8ArGwQ== X-Google-Smtp-Source: AGs4zMYkWwmEyw85c3KE+iPSDMQ+1uXbG5qmdOIGVtkPFaeiw4r1Yjl03BlxnXgzm3r/ZVJn8D//cg== X-Received: by 10.107.140.143 with SMTP id o137mr3904057iod.206.1510212426200; Wed, 08 Nov 2017 23:27:06 -0800 (PST) Received: from [192.168.0.106] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id o207sm3258167itc.27.2017.11.08.23.27.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 23:27:04 -0800 (PST) Subject: [PATCH 1/13] scsi: arcmsr: redefine ACB_ADAPTER_TYPE_A, _B, _C, _D and subsequent changes. From: Ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, jthumshirn@suse.de, hare@suse.de, dan.carpenter@oracle.com, hch@infradead.org Date: Thu, 09 Nov 2017 07:26:58 +0800 Message-ID: <1510183618.4523.56.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-07-31 11:50:44.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-07-31 11:50:16.000000000 +0800 +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-11-08 18:46:42.000000000 +0800 @@ -1789,7 +1789,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); @@ -1875,7 +1875,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; }