Cutting down on unnecessary per-controller delays when starting up the USB

stack. The root hubs do not really need a powerup delay and as they are not
used until all initialization is done, this gives plenty of time to stabilize
the power. Therefore remove the powerup delay for root hubs and reduce the
stabilization time to zero. Also remove the define for the first explore delay
as it is not used.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24727 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2008-04-01 20:37:57 +00:00
parent 1059b4e746
commit a93bd0c452
7 changed files with 11 additions and 11 deletions

View File

@ -204,7 +204,7 @@ BusManager::AllocateDevice(Hub *parent, uint8 port, usb_speed speed)
if (deviceDescriptor.device_class == 0x09) {
TRACE(("USB BusManager: creating new hub\n"));
Hub *hub = new(std::nothrow) Hub(parent, port, deviceDescriptor,
deviceAddress, speed);
deviceAddress, speed, false);
if (!hub) {
TRACE_ERROR(("USB BusManager: no memory to allocate hub\n"));
FreeAddress(deviceAddress);

View File

@ -12,7 +12,7 @@
Hub::Hub(Object *parent, int8 hubPort, usb_device_descriptor &desc,
int8 deviceAddress, usb_speed speed)
int8 deviceAddress, usb_speed speed, bool isRootHub)
: Device(parent, hubPort, desc, deviceAddress, speed),
fInterruptPipe(NULL)
{
@ -71,7 +71,8 @@ Hub::Hub(Object *parent, int8 hubPort, usb_device_descriptor &desc,
InterruptCallback, this);
// Wait some time before powering up the ports
snooze(USB_DELAY_HUB_POWER_UP);
if (!isRootHub)
snooze(USB_DELAY_HUB_POWER_UP);
// Enable port power on all ports
for (int32 i = 0; i < fHubDescriptor.num_ports; i++) {

View File

@ -483,7 +483,7 @@ public:
Hub(Object *parent, int8 hubPort,
usb_device_descriptor &desc,
int8 deviceAddress,
usb_speed speed);
usb_speed speed, bool isRootHub);
virtual ~Hub();
virtual status_t Changed(change_item **changeList,

View File

@ -26,7 +26,6 @@
#define USB_DELAY_SET_ADDRESS_RETRY 200000
#define USB_DELAY_SET_ADDRESS 10000
#define USB_DELAY_SET_CONFIGURATION 50000
#define USB_DELAY_FIRST_EXPLORE 5000000
#define USB_DELAY_HUB_EXPLORE 1000000
// For bandwidth calculation

View File

@ -76,7 +76,7 @@ static ehci_root_hub_configuration_s sEHCIRootHubConfig =
USB_DESCRIPTOR_HUB, // Descriptor type
0x0f, // Number of ports
0x0000, // Hub characteristics
50, // Power on to power good (in 2ms units)
0, // Power on to power good (in 2ms units)
0, // Maximum current (in mA)
0x00, // All ports are removable
0xff // Depricated power control mask
@ -123,7 +123,7 @@ static ehci_root_hub_string_s sEHCIRootHubStrings[3] = {
EHCIRootHub::EHCIRootHub(Object *rootObject, int8 deviceAddress)
: Hub(rootObject, rootObject->GetStack()->IndexOfBusManager(rootObject->GetBusManager()),
sEHCIRootHubDevice, deviceAddress, USB_SPEED_HIGHSPEED)
sEHCIRootHubDevice, deviceAddress, USB_SPEED_HIGHSPEED, true)
{
}

View File

@ -76,7 +76,7 @@ static ohci_root_hub_configuration_s sOHCIRootHubConfig =
USB_DESCRIPTOR_HUB, // Type
0, // Number of ports
0x0000, // Hub characteristics
50, // Power on to power good
0, // Power on to power good
0, // Current
0x00, // Both ports are removable
0xff // Depricated power control mask
@ -122,7 +122,7 @@ static ohci_root_hub_string_s sOHCIRootHubStrings[3] = {
OHCIRootHub::OHCIRootHub(Object *rootObject, int8 deviceAddress)
: Hub(rootObject, rootObject->GetStack()->IndexOfBusManager(rootObject->GetBusManager()),
sOHCIRootHubDevice, deviceAddress, USB_SPEED_FULLSPEED)
sOHCIRootHubDevice, deviceAddress, USB_SPEED_FULLSPEED, true)
{
}

View File

@ -79,7 +79,7 @@ static uhci_root_hub_configuration_s sUHCIRootHubConfig =
USB_DESCRIPTOR_HUB, // Descriptor type
2, // Number of ports
0x0000, // Hub characteristics
50, // Power on to power good (in 2ms units)
0, // Power on to power good (in 2ms units)
0, // Maximum current (in mA)
0x00, // Both ports are removable
0xff // Depricated power control mask
@ -127,7 +127,7 @@ static uhci_root_hub_string_s sUHCIRootHubStrings[3] = {
UHCIRootHub::UHCIRootHub(Object *rootObject, int8 deviceAddress)
: Hub(rootObject, rootObject->GetStack()->IndexOfBusManager(rootObject->GetBusManager()),
sUHCIRootHubDevice, deviceAddress, USB_SPEED_FULLSPEED)
sUHCIRootHubDevice, deviceAddress, USB_SPEED_FULLSPEED, true)
{
}