From: "Wu, Hao A" <hao.a.wu@intel.com>
To: Marcin Wojtas <mw@semihalf.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
"Gao, Liming" <liming.gao@intel.com>,
"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
"nadavh@marvell.com" <nadavh@marvell.com>,
"jsd@semihalf.com" <jsd@semihalf.com>,
"tm@semihalf.com" <tm@semihalf.com>
Subject: Re: [PATCH v3 3/3] MdeModulePkg/SdMmcPciHcDxe: Execute card detect only for RemovableSlot
Date: Mon, 17 Sep 2018 07:17:57 +0000 [thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A0931E44118@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1537050346-16445-4-git-send-email-mw@semihalf.com>
Hi,
Could you help to file a EDK2 Bugzilla tracker at:
https://bugzilla.tianocore.org/enter_bug.cgi?product=EDK2
to have a general description of the issue you met? And reference the
tracker within the commit message?
Really appreciate the help, thanks in advance.
With that,
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
> -----Original Message-----
> From: Marcin Wojtas [mailto:mw@semihalf.com]
> Sent: Sunday, September 16, 2018 6:26 AM
> To: edk2-devel@lists.01.org
> Cc: Tian, Feng; Kinney, Michael D; Gao, Liming; leif.lindholm@linaro.org; Wu,
> Hao A; ard.biesheuvel@linaro.org; nadavh@marvell.com; mw@semihalf.com;
> jsd@semihalf.com; tm@semihalf.com
> Subject: [PATCH v3 3/3] MdeModulePkg/SdMmcPciHcDxe: Execute card detect
> only for RemovableSlot
>
> Some devices can be non removable (such as eMMC) and checking
> Present State Register on host controller may falsely return
> an information that device is not present. Execute this
> check conditionally on the SloType field value.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> ---
> MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 18
> ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c
> b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c
> index f923930..bf9869d 100644
> --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c
> +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c
> @@ -661,12 +661,18 @@ SdMmcPciHcDriverBindingStart (
> //
> // Check whether there is a SD/MMC card attached
> //
> - Status = SdMmcHcCardDetect (PciIo, Slot, &MediaPresent);
> - if (EFI_ERROR (Status) && (Status != EFI_MEDIA_CHANGED)) {
> - continue;
> - } else if (!MediaPresent) {
> - DEBUG ((DEBUG_INFO, "SdMmcHcCardDetect: No device attached in
> Slot[%d]!!!\n", Slot));
> - continue;
> + if (Private->Slot[Slot].SlotType == RemovableSlot) {
> + Status = SdMmcHcCardDetect (PciIo, Slot, &MediaPresent);
> + if (EFI_ERROR (Status) && (Status != EFI_MEDIA_CHANGED)) {
> + continue;
> + } else if (!MediaPresent) {
> + DEBUG ((
> + DEBUG_INFO,
> + "SdMmcHcCardDetect: No device attached in Slot[%d]!!!\n",
> + Slot
> + ));
> + continue;
> + }
> }
>
> Status = SdMmcHcInitHost (Private, Slot);
> --
> 2.7.4
next prev parent reply other threads:[~2018-09-17 7:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 22:25 [PATCH v3 0/3] SdMmc fixes Marcin Wojtas
2018-09-15 22:25 ` [PATCH v3 1/3] MdeModulePkg/SdMmcPciHcDxe: Adjust eMMC clock and bus width sequence Marcin Wojtas
2018-09-17 7:17 ` Wu, Hao A
2018-09-17 22:43 ` Marcin Wojtas
2018-09-15 22:25 ` [PATCH v3 2/3] MdeModulePkg/SdMmcPciHcDxe: Fix SdMmcHcReset to set only necesery bits Marcin Wojtas
2018-09-17 7:17 ` Wu, Hao A
2018-09-17 15:00 ` Marcin Wojtas
2018-09-18 1:34 ` Wu, Hao A
2018-09-15 22:25 ` [PATCH v3 3/3] MdeModulePkg/SdMmcPciHcDxe: Execute card detect only for RemovableSlot Marcin Wojtas
2018-09-17 7:17 ` Wu, Hao A [this message]
2018-09-17 15:13 ` Marcin Wojtas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B80AF82E9BFB8E4FBD8C89DA810C6A0931E44118@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox