From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 64260210F202D for ; Wed, 15 Aug 2018 06:12:16 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id g6-v6so1108410wrp.0 for ; Wed, 15 Aug 2018 06:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=0492ICui3yVfYpkwxuO3qW7vft8X7BlNgCB+VKJMyEo=; b=k1NEQkjjsvw7ikCuZJNTGUlv4srWsU7eEu1WJbB9dSSG23zxyKYHGTONGOvzbR48yi SiRB0+u2EDM4Q97OsnbkqECbe8gn0B8RwS2W+wLZyoN/l1DP0on1hegK/Qq9L8D9pPrD WiDs5huxelxQNX7ZiRJ0kGWu/lC4luz4umqVE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=0492ICui3yVfYpkwxuO3qW7vft8X7BlNgCB+VKJMyEo=; b=hmEo52uJnSHBb8zXD4IMy/PgruMD2G9nl3GZMzDV2xqjQ1ogejUppNK4ejXQgreWiD EimQ9gbm7SnAudRzGcYJMRRi6tu4iW5y2c9mWYYtM7W5E9HBcMKWyCAAs8lF66c4A64m Hf0WhWtglEMprZEDpGHFmxmaUqBr++arpfmgC1F1jqF3KBFKfVvdpzxApGp33VEw0aO1 95uhX9/jb4wb9ee/ZV13XpNVsV5TptM3+TSNwL379zGBvJJip5j+sB7jlgTRY5Ttzybn cvWGlm8H0KswLJdN7yaRgVD33gTrV67AZVCV/Neosd9/ZaWsryDGycF5MSwRkODdcD4x oXqQ== X-Gm-Message-State: AOUpUlHSg6m1rRBcT7wpSuQBorDvQPuPKIfHhvqVoryLISAbXjBWuH1R ggSOmjs3YI1akcgXc/e6j8ztEA== X-Google-Smtp-Source: AA+uWPxSzYgfdbyEP5fdp8/xiL8eVavg/V68EIWMuIeZLjXoUT3SI0wZtbtcT1KKBFYY7xlRZZA4NQ== X-Received: by 2002:adf:b456:: with SMTP id v22-v6mr16004887wrd.187.1534338734589; Wed, 15 Aug 2018 06:12:14 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id h7-v6sm22584440wrs.8.2018.08.15.06.12.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Aug 2018 06:12:13 -0700 (PDT) Date: Wed, 15 Aug 2018 14:12:10 +0100 From: Leif Lindholm To: Ming Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, Heyi Guo Message-ID: <20180815131210.v4a5ep6645b2e64i@bivouac.eciton.net> References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-8-ming.huang@linaro.org> <20180802173647.paepialtuopbe6y5@bivouac.eciton.net> <22f0c26b-0666-82b5-2b1c-f71af63526a4@linaro.org> <20180808095909.tavnft3vmycftxc7@bivouac.eciton.net> <12d71306-5d19-837c-3827-8be1883b693a@linaro.org> <20180808125306.nllzdcfbnbc57wt7@bivouac.eciton.net> <5b310aff-f2f0-5b89-00fc-a778fe15a1a1@linaro.org> <20180814152645.w2675ilc7mjqbu4a@bivouac.eciton.net> <7dd91d29-9a72-9ebc-a96a-2d4c691018b1@linaro.org> MIME-Version: 1.0 In-Reply-To: <7dd91d29-9a72-9ebc-a96a-2d4c691018b1@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v1 07/38] Silicon/Hisilicon/D06: Wait for all disk ready X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 13:12:16 -0000 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Aug 15, 2018 at 12:01:25PM +0800, Ming wrote: > > > 在 8/14/2018 11:26 PM, Leif Lindholm 写道: > > On Fri, Aug 10, 2018 at 09:44:29AM +0800, Ming wrote: > >>> Which is exactly what an event is for. > >>> At the point where the SAS controller driver is currently updating the > >>> variable, it can instead call SignalEvent (). > >>> > >>> The WaitForDiskReady () function can be changed to wait/check for that event. > >> > >> As current solution(using variables) have run stable, I prefer don't change > >> SAS driver and this wait function. Is it OK? > > > > You can leave the driver out if you wish, but it cannot go into the > > 18.08 release with this design. > > With event, two problem should be solved: > 1 How to share the event between SAS driver and PlatformBootManagerLib; > 2 How to avoid waiting for D03/D05; > > For the two problems I plan to install a protocal in D06 SAS driver and > locate the protocal in PlatformBootManagerLib. if fail to locate (D03/D05), > it will not wait. > struct _HISI_SAS_NOTIFY_PROTOCAL { > EFI_EVENT WaitDiskEvent; > }; > How about this? That works for me (If you rename it PROTOCAL-> PROTOCOL, and give it a typedef without the _). / Leif