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);