MdeModulePkg/EhciDxe: factor out EhcIsDebugPortInUse()
The EhcReset(), EhcGetRootHubPortStatus() and EhcDriverBindingStart() functions need to see whether the host controller (or a specific port on the host controller) can be accessed, dependent on the controller having (or the specific port being) an in-use debug port. Because the condition isn't simple, extract it to a separate function. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Suggested-by: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -77,6 +77,8 @@ typedef struct _USB2_HC_DEV USB2_HC_DEV;
|
||||
#define USB_DEBUG_PORT_IN_USE BIT10
|
||||
#define USB_DEBUG_PORT_ENABLE BIT28
|
||||
#define USB_DEBUG_PORT_OWNER BIT30
|
||||
#define USB_DEBUG_PORT_IN_USE_MASK (USB_DEBUG_PORT_IN_USE | \
|
||||
USB_DEBUG_PORT_OWNER)
|
||||
|
||||
//
|
||||
// EHC raises TPL to TPL_NOTIFY to serialize all its operations
|
||||
|
Reference in New Issue
Block a user