From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::442; helo=mail-pf1-x442.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (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 C1CCC21B02822 for ; Tue, 14 Aug 2018 21:01:39 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id y10-v6so10190332pfn.8 for ; Tue, 14 Aug 2018 21:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Cttij+oqN+3PcKohEcYK2twDadKtcIOU/8nocvpeSxo=; b=HYrvUxDSnM6xCHViWmKIETqXzXIo8cXDVx1cyZxLRBGGZIHE8z3feqee985KUvqSzq G9nIg9zqo9cOFJ9f4ONyNBhKTvzv6gNLgMdbaLanKD8bdSB/f+bmcCiO2/U0VJKDSC1M +QE/a+IVTU+nfAe89JsYUgwv5YqSB8Y6N7F6o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Cttij+oqN+3PcKohEcYK2twDadKtcIOU/8nocvpeSxo=; b=R6BLcnc7QDDYXQsd8opA/+JxPM9nm4YnUfAR3ylaGAUr1r+dG6CTOGbVjUWDCw/gJh T21UgM4R2Whgg9nnhSYfmxNZcshTtMxZIKhiUnxANaK0IZeWzAQ7LVeMAwqP88ldqh5z p1jG32jcrJv1NyrRjHWPLtSHVQc+KkbqRLxWjaR9MMizScOcLhr981M7oC1eST87jgAG JvFnEHZTccPGmkZJi2WmAAbLk8A8bjMdYu/lXNUxln6wKxh//0q24uxWWX8YjO+3T3J/ pyG+CJceyJIKJYplJCfGF1e3LFxsHXRIZdtBo83Yh2XFjze0cGain6NmHR73gYhyfW+U qX3Q== X-Gm-Message-State: AOUpUlFgc3P3JDcUSxOdR6gm+D3ON4UEp7J11G95J9dkOIZL5rd/0nwY M9J2HPVlphCK0+301PciSi2yaw== X-Google-Smtp-Source: AA+uWPzJijO0lBAFtAiGerGLlyKGZOG6Xe60rAN3hPT6UcsaeYzaP3ab/D6mylm+hK3rhJ2LnBXFyA== X-Received: by 2002:a63:9311:: with SMTP id b17-v6mr23555735pge.261.1534305699147; Tue, 14 Aug 2018 21:01:39 -0700 (PDT) Received: from [10.174.0.166] ([64.64.108.240]) by smtp.gmail.com with ESMTPSA id k64-v6sm32731817pgd.47.2018.08.14.21.01.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Aug 2018 21:01:38 -0700 (PDT) To: Leif Lindholm 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 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> From: Ming Message-ID: <7dd91d29-9a72-9ebc-a96a-2d4c691018b1@linaro.org> Date: Wed, 15 Aug 2018 12:01:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180814152645.w2675ilc7mjqbu4a@bivouac.eciton.net> 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 04:01:39 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 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? > > This is why it is important to publish the code as soon as possible - > especially for new platform ports. And to publish bits that are > possible earlier, rather than wait and do everything in one go once > the whole port is done. > > Best Regards, > > Leif >