From patchwork Tue Dec 12 10:48:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10106617 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 2236B602B3 for ; Tue, 12 Dec 2017 10:48:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2ABFE29B6E for ; Tue, 12 Dec 2017 10:48:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DFCA29B7D; Tue, 12 Dec 2017 10:48:32 +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=-6.9 required=2.0 tests=BAYES_00,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 84AB929B6E for ; Tue, 12 Dec 2017 10:48:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbdLLKsa (ORCPT ); Tue, 12 Dec 2017 05:48:30 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:43376 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbdLLKs2 (ORCPT ); Tue, 12 Dec 2017 05:48:28 -0500 Received: by mail-pf0-f196.google.com with SMTP id e3so13888403pfi.10 for ; Tue, 12 Dec 2017 02:48:28 -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=Cx3G7BYubPJugsrVW43bC+fcfRz0htlfGUNetfdpFhE=; b=js4vzzOntBVN0QIQuvsvCsh8WWWNjBWhyvGMkJwEy/qKDOKeDqlPuDfhK3ojYaWx7D zKIXBRGOQEVbvpsC1i/zrHHxAtoodG6RjkQZBPL0NdJrn7YbunEvP6Jc2acZ3obndV8T zFIQAKFPw1Y12vI/D7xGJVHX/Oh9CS9AekBThhUsYYlzLaFv76UMoXIzSUfKGnoeZy8c IpmYJIpiD/0T04u5kJMOeIKiXAIRtC9E7CYs/4uwG6wxgjMtZ3TsXDG1tuifgUon9Jts NAc99Z9sTDnJ4o7LC6aJuajV5hsFXQGS2NasY3D1KXzatRci+RmFUIhK9vghiUYzOmN1 5t7w== 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=Cx3G7BYubPJugsrVW43bC+fcfRz0htlfGUNetfdpFhE=; b=KLKuycxnRA3uk04av5kdV24yY7L8W27RlWo6rHTmO/aQv/blBZR44muFe4/2wlFBhi Y9QsjqFL/f2EHYhDLJlV8FSY/uL6HIc5zjg0RfRJWhO/15i+jco6LRDF38UmcfGYsmR5 fsGsyKRZHFBI8Yr2iccbHKKSarlvA/lz04G16kRjfhz0yka+6gCb/7lpfQNcmDSYOKgk hwtHq81cjCRRstmDwyhaobbz/pE/C5ua04CiJXwRnEJllAPCI6rINbVdQRzsMKrNyzkS mtOWY75IEcNOspyno9On7SD8xlzfAl9V1vglNAvvkL2m9jWydKvlxjzfvHVtYQPktu/Z PHjg== X-Gm-Message-State: AKGB3mK0C6jZrKlc6RdSWnMghJ5I+yJ9vak80u44hA7YMZK8rXCX3a9M kzcnyvxp4+eWkjRcm90Dz91JjQ== X-Google-Smtp-Source: ACJfBotcG0b/rDHuG3x4QK6cc8r+T+hEERRGvHTE1TBJizbcss6UujOSXmyoXiRWjDmePcPSaJLSCA== X-Received: by 10.84.201.6 with SMTP id u6mr1864246pld.16.1513075708280; Tue, 12 Dec 2017 02:48:28 -0800 (PST) Received: from [192.168.0.110] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id p24sm27116107pfh.170.2017.12.12.02.48.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 02:48:27 -0800 (PST) Subject: [PATCH 2/4] scsi: arcmsr: waiting for iop firmware ready before issue get_config command to iop 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: Tue, 12 Dec 2017 18:48:24 +0800 Message-ID: <1513075704.5249.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 waiting for iop firmware ready before issue get_config command to iop for adapter type A and D Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 9b587ca..dfaea8f 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -2966,6 +2966,7 @@ static bool arcmsr_hbaA_get_config(struct AdapterControlBlock *acb) char __iomem *iop_firm_version = (char __iomem *)(®->message_rwbuffer[17]); char __iomem *iop_device_map = (char __iomem *)(®->message_rwbuffer[21]); int count; + arcmsr_wait_firmware_ready(acb); writel(ARCMSR_INBOUND_MESG0_GET_CONFIG, ®->inbound_msgaddr0); if (!arcmsr_hbaA_wait_msgint_ready(acb)) { printk(KERN_NOTICE "arcmsr%d: wait 'get adapter firmware \ @@ -3149,6 +3150,7 @@ static bool arcmsr_hbaD_get_config(struct AdapterControlBlock *acb) writel(ARCMSR_ARC1214_IOP2DRV_MESSAGE_CMD_DONE, acb->pmuD->outbound_doorbell);/*clear interrupt*/ } + arcmsr_wait_firmware_ready(acb); /* post "get config" instruction */ writel(ARCMSR_INBOUND_MESG0_GET_CONFIG, reg->inbound_msgaddr0); /* wait message ready */