]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
MdeModulePkg/Xhci: Add 10ms delay before sending SendAddr cmd to dev
authorFeng Tian <feng.tian@intel.com>
Wed, 23 Nov 2016 01:46:32 +0000 (09:46 +0800)
committerFeng Tian <feng.tian@intel.com>
Thu, 24 Nov 2016 04:44:50 +0000 (12:44 +0800)
commit26b85012802ed8a2ff3db96d102121323aabcc0c
tree311cb016369a40fdad613964bac0df2088925764
parent7fa1376c5c97d18eac719f35e5e85356d3c1b033
MdeModulePkg/Xhci: Add 10ms delay before sending SendAddr cmd to dev

We send ADDRESS DEVICE CMD in XhcInitializeDeviceSlot(), which will
cause XHC issue a USB SET_ADDRESS request to the USB Device.

According to USB spec, there should have a 10ms delay before this
operation after resetting a given port.

But in original code, there is a possible path which may have no such
10ms delay:
UsbHubResetPort()->UsbHubSetPortFeature()->Stall(20)->UsbHubGetPortSt
atus()->XhcPollPortStatusChange()->(if RESET_C bit is set)->
XhcInitializeDeviceSlot()->(if RESET_C bit is set)->Stall(10)

So this patch is used to fix above issue.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Tested-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.h
MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c