/** @file
The definition for USB hub.
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _USB_HUB_H_
#define _USB_HUB_H_
#include <IndustryStandard/Usb.h>
//
// Hub class control transfer target
//
#define USB_HUB_TARGET_HUB 0
//
// HUB class specific contrl transfer request type
//
#define USB_HUB_REQ_GET_STATUS 0
//
// USB hub class feature selector
//
#define USB_HUB_C_HUB_LOCAL_POWER 0
#define USB_HUB_PORT_CONNECTION 0
//
// Constant value for Port Status & Port Change Status of SuperSpeed port
//
//
// USB hub power control method. In gang power control
//
#define USB_HUB_GANG_POWER_CTRL 0
//
// USB hub status bits
//
//
// Host software return timeout if port status doesn't change
// after 500ms(LOOP * STALL = 100 * 5ms), set by experience
//
#pragma pack(1)
//
// Hub descriptor, the last two fields are of variable lenght.
//
typedef struct {
typedef struct {
#pragma pack()
typedef struct {
/**
uses this hub as translator.Remember to clear the TT
buffer of transaction translator, not that of the
parent.
@param UsbDev The Usb device.
@param Port The port of the hub.
@param DevAddr Address of the failed transaction.
@param EpNum The endpoint number of the failed transaction.
@param EpType The type of failed transaction.
@retval EFI_SUCCESS The TT buffer is cleared.
@retval Others Failed to clear the TT buffer.
**/
);
/**
Test whether the interface is a hub interface.
@param UsbIf The interface to test.
@retval TRUE The interface is a hub interface.
@retval FALSE The interface isn't a hub interface.
**/
);
/**
Ack the hub change bits. If these bits are not ACKed, Hub will
always return changed bit map from its interrupt endpoint.
@param UsbDev The Usb device.
@retval EFI_SUCCESS The hub change status is ACKed.
@retval Others Failed to ACK the hub status.
**/
);
extern USB_HUB_API mUsbHubApi;
extern USB_HUB_API mUsbRootHubApi;
#endif