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::141; helo=mail-it1-x141.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x141.google.com (mail-it1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (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 1655D2116327F for ; Mon, 8 Oct 2018 05:21:31 -0700 (PDT) Received: by mail-it1-x141.google.com with SMTP id i191-v6so11533312iti.5 for ; Mon, 08 Oct 2018 05:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nq3ELKWDML6XJIraKfkwgWfl9hydDe19D5/MYZKYU9I=; b=BKsyMAakiK1QWnb5A2KdjTIKUXFLBioVq48XQawRSPyNFr3UIoT3AW6v6RPJyA5Ab/ pEX6KW1MLUwq7nHze9oVLDaTJ7+ID6W2hm6fv7mo/dBMTpJwemT8QDqH2+6CQMUJWlin T8LEXkvNGvzQ6/JIrDTX98arEi7XAjZ0SkpMw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nq3ELKWDML6XJIraKfkwgWfl9hydDe19D5/MYZKYU9I=; b=Fe+Q+uYVOtKc1gwcuTKt8HjaHQ36CS2+wrPNDW3u7NX/ZH+9BgrvDuu7yRigDFwF8V TxeyGmlxBHXN7L2k6OtXWN/SWvnyQgIbOeF6TBMPKNN4v3NHsKLK255l0E2y8g0CNLq5 UP3LtFspiEOywmPO5hUC7PEJyr6OUShh+TzzuR0Cr0mit0If1W/7yZa9I1qOKZHt3BhJ SLNEjvId44mD9Si70YK5/LaGXwVba2Uic7YuXzE9iaS6JXQqVrfLPA9SX73wBP3J5p4s LuaVn9JXl8FLY2buX0ji8nB7XjeXEGYFOBQSk3vF3OLWT9IAUM3l112mVfzD/eBNiK4/ ZjrA== X-Gm-Message-State: ABuFfohE0Hp1QBj4OyL/U+2/UHuAZwx/h7WaCwSCaHdtnP6n4OOyb/VO 6aNl8XYFmVUGFF0zGUY9QPgQUOt7a0ianGMcIAwh5g== X-Google-Smtp-Source: ACcGV63/ZYj5aisYMiet3QemW9bAiqkgCOH2xGgbR6EXJcJORIEaPa35a47kTiACxNgFAdb/xxGYcqqPEq0DNWAVzGY= X-Received: by 2002:a24:7804:: with SMTP id p4-v6mr12341394itc.123.1539001291040; Mon, 08 Oct 2018 05:21:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:5910:0:0:0:0:0 with HTTP; Mon, 8 Oct 2018 05:21:30 -0700 (PDT) In-Reply-To: <1538745911-22484-2-git-send-email-mw@semihalf.com> References: <1538745911-22484-1-git-send-email-mw@semihalf.com> <1538745911-22484-2-git-send-email-mw@semihalf.com> From: Ard Biesheuvel Date: Mon, 8 Oct 2018 14:21:30 +0200 Message-ID: To: Marcin Wojtas , "Zeng, Star" , Eric Dong , Ruiyu Ni Cc: "edk2-devel@lists.01.org" , "Tian, Feng" , "Kinney, Michael D" , "Gao, Liming" , Leif Lindholm , "Wu, Hao A" , Nadav Haklai , =?UTF-8?B?SmFuIETEhWJyb8Wb?= , Tomasz Michalec Subject: Re: [PATCH v2 1/4] MdeModulePkg/SdMmcPciHcDxe: Add an optional parameter in NotifyPhase X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2018 12:21:32 -0000 Content-Type: text/plain; charset="UTF-8" (add MdeModulePkg maintainers) On 5 October 2018 at 15:25, Marcin Wojtas wrote: > In order to ensure bigger flexibility in the NotifyPhase > routine of the SdMmcOverride protocol, enable using an > optional phase-specific data. This will allow to exchange > more information between the protocol producer driver > and SdMmcPciHcDxe in the newly added callbacks. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marcin Wojtas > --- > MdeModulePkg/Include/Protocol/SdMmcOverride.h | 4 +++- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 12 ++++++++---- > 2 files changed, 11 insertions(+), 5 deletions(-) > > diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h b/MdeModulePkg/Include/Protocol/SdMmcOverride.h > index 0766252..178945f 100644 > --- a/MdeModulePkg/Include/Protocol/SdMmcOverride.h > +++ b/MdeModulePkg/Include/Protocol/SdMmcOverride.h > @@ -63,6 +63,7 @@ EFI_STATUS > @param[in] PhaseType The type of operation and whether the > hook is invoked right before (pre) or > right after (post) > + @param[in,out] Data The pointer to a phase-specific data. > > @retval EFI_SUCCESS The override function completed successfully. > @retval EFI_NOT_FOUND The specified controller or slot does not exist. > @@ -74,7 +75,8 @@ EFI_STATUS > (EFIAPI * EDKII_SD_MMC_NOTIFY_PHASE) ( > IN EFI_HANDLE ControllerHandle, > IN UINT8 Slot, > - IN EDKII_SD_MMC_PHASE_TYPE PhaseType > + IN EDKII_SD_MMC_PHASE_TYPE PhaseType, > + IN OUT VOID *OptParam Please use the same name in the comment block and in the actual prototype. Also, could we use PhaseData as the name perhaps? With those changes Reviewed-by: Ard Biesheuvel > ); > > struct _EDKII_SD_MMC_OVERRIDE { > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c > index 25771dc..02eb4ad 100644 > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c > @@ -444,7 +444,8 @@ SdMmcHcReset ( > Status = mOverride->NotifyPhase ( > Private->ControllerHandle, > Slot, > - EdkiiSdMmcResetPre); > + EdkiiSdMmcResetPre, > + NULL); > if (EFI_ERROR (Status)) { > DEBUG ((DEBUG_WARN, > "%a: SD/MMC pre reset notifier callback failed - %r\n", > @@ -494,7 +495,8 @@ SdMmcHcReset ( > Status = mOverride->NotifyPhase ( > Private->ControllerHandle, > Slot, > - EdkiiSdMmcResetPost); > + EdkiiSdMmcResetPost, > + NULL); > if (EFI_ERROR (Status)) { > DEBUG ((DEBUG_WARN, > "%a: SD/MMC post reset notifier callback failed - %r\n", > @@ -1087,7 +1089,8 @@ SdMmcHcInitHost ( > Status = mOverride->NotifyPhase ( > Private->ControllerHandle, > Slot, > - EdkiiSdMmcInitHostPre); > + EdkiiSdMmcInitHostPre, > + NULL); > if (EFI_ERROR (Status)) { > DEBUG ((DEBUG_WARN, > "%a: SD/MMC pre init notifier callback failed - %r\n", > @@ -1122,7 +1125,8 @@ SdMmcHcInitHost ( > Status = mOverride->NotifyPhase ( > Private->ControllerHandle, > Slot, > - EdkiiSdMmcInitHostPost); > + EdkiiSdMmcInitHostPost, > + NULL); > if (EFI_ERROR (Status)) { > DEBUG ((DEBUG_WARN, > "%a: SD/MMC post init notifier callback failed - %r\n", > -- > 2.7.4 >