MdeModulePkg/SdMmcPciHc: Reset the slot when sd device is connected
The original code doesn't reset the slot when there is device change. It may bring issue on device identification procedure of some SD cards. Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@Intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
@@ -275,6 +275,13 @@ SdMmcPciHcEnumerateDevice (
|
|||||||
if ((Status == EFI_MEDIA_CHANGED) && (MediaPresent == TRUE)) {
|
if ((Status == EFI_MEDIA_CHANGED) && (MediaPresent == TRUE)) {
|
||||||
DEBUG ((EFI_D_INFO, "SdMmcPciHcEnumerateDevice: device connected at slot %d of pci %p\n", Slot, Private->PciIo));
|
DEBUG ((EFI_D_INFO, "SdMmcPciHcEnumerateDevice: device connected at slot %d of pci %p\n", Slot, Private->PciIo));
|
||||||
//
|
//
|
||||||
|
// Reset the specified slot of the SD/MMC Pci Host Controller
|
||||||
|
//
|
||||||
|
Status = SdMmcHcReset (Private->PciIo, Slot);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//
|
||||||
// Reinitialize slot and restart identification process for the new attached device
|
// Reinitialize slot and restart identification process for the new attached device
|
||||||
//
|
//
|
||||||
Status = SdMmcHcInitHost (Private->PciIo, Slot, Private->Capability[Slot]);
|
Status = SdMmcHcInitHost (Private->PciIo, Slot, Private->Capability[Slot]);
|
||||||
|
Reference in New Issue
Block a user