USB: Rename USB_SPEED_SUPER to USB_SPEED_SUPERSPEED.
For consistency's sake with the others.
This commit is contained in:
@@ -492,7 +492,7 @@ Device::InitEndpoints(int32 interfaceIndex)
|
|||||||
Pipe* pipe = NULL;
|
Pipe* pipe = NULL;
|
||||||
|
|
||||||
usb_endpoint_companion_descriptor* comp_descr = NULL;
|
usb_endpoint_companion_descriptor* comp_descr = NULL;
|
||||||
if (fSpeed == USB_SPEED_SUPER) {
|
if (fSpeed == USB_SPEED_SUPERSPEED) {
|
||||||
// We should have a companion descriptor for this device.
|
// We should have a companion descriptor for this device.
|
||||||
// Let's find it: it'll be the "i"th one.
|
// Let's find it: it'll be the "i"th one.
|
||||||
size_t k = 0;
|
size_t k = 0;
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ Hub::Explore(change_item **changeList)
|
|||||||
// This is for XHCI, which anyway rechecks the port speed
|
// This is for XHCI, which anyway rechecks the port speed
|
||||||
// This will in no way work for non-root USB3.0 Hubs
|
// This will in no way work for non-root USB3.0 Hubs
|
||||||
if (fDeviceDescriptor.usb_version == 0x300)
|
if (fDeviceDescriptor.usb_version == 0x300)
|
||||||
speed = USB_SPEED_SUPER;
|
speed = USB_SPEED_SUPERSPEED;
|
||||||
else if (fPortStatus[i].status & PORT_STATUS_LOW_SPEED)
|
else if (fPortStatus[i].status & PORT_STATUS_LOW_SPEED)
|
||||||
speed = USB_SPEED_LOWSPEED;
|
speed = USB_SPEED_LOWSPEED;
|
||||||
else if (fPortStatus[i].status & PORT_STATUS_HIGH_SPEED)
|
else if (fPortStatus[i].status & PORT_STATUS_HIGH_SPEED)
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ ControlPipe::InitCommon(int8 deviceAddress, uint8 endpointAddress,
|
|||||||
case USB_SPEED_HIGHSPEED:
|
case USB_SPEED_HIGHSPEED:
|
||||||
maxPacketSize = 64;
|
maxPacketSize = 64;
|
||||||
break;
|
break;
|
||||||
case USB_SPEED_SUPER:
|
case USB_SPEED_SUPERSPEED:
|
||||||
maxPacketSize = 512;
|
maxPacketSize = 512;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ Transfer::_CalculateBandwidth()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case USB_SPEED_SUPER:
|
case USB_SPEED_SUPERSPEED:
|
||||||
{
|
{
|
||||||
// TODO it should only be useful for isochronous type
|
// TODO it should only be useful for isochronous type
|
||||||
bandwidthNS = 0;
|
bandwidthNS = 0;
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ typedef enum {
|
|||||||
USB_SPEED_LOWSPEED = 0,
|
USB_SPEED_LOWSPEED = 0,
|
||||||
USB_SPEED_FULLSPEED,
|
USB_SPEED_FULLSPEED,
|
||||||
USB_SPEED_HIGHSPEED,
|
USB_SPEED_HIGHSPEED,
|
||||||
USB_SPEED_SUPER,
|
USB_SPEED_SUPERSPEED,
|
||||||
USB_SPEED_MAX = USB_SPEED_SUPER
|
USB_SPEED_MAX = USB_SPEED_SUPERSPEED
|
||||||
} usb_speed;
|
} usb_speed;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -517,11 +517,12 @@ XHCI::Start()
|
|||||||
offset--;
|
offset--;
|
||||||
for (uint32 i = offset; i < offset + count; i++) {
|
for (uint32 i = offset; i < offset + count; i++) {
|
||||||
if (XHCI_SUPPORTED_PROTOCOLS_0_MAJOR(eec) == 0x3)
|
if (XHCI_SUPPORTED_PROTOCOLS_0_MAJOR(eec) == 0x3)
|
||||||
fPortSpeeds[i] = USB_SPEED_SUPER;
|
fPortSpeeds[i] = USB_SPEED_SUPERSPEED;
|
||||||
else
|
else
|
||||||
fPortSpeeds[i] = USB_SPEED_HIGHSPEED;
|
fPortSpeeds[i] = USB_SPEED_HIGHSPEED;
|
||||||
|
|
||||||
TRACE("speed for port %" B_PRId32 " is %s\n", i,
|
TRACE("speed for port %" B_PRId32 " is %s\n", i,
|
||||||
fPortSpeeds[i] == USB_SPEED_SUPER ? "super" : "high");
|
fPortSpeeds[i] == USB_SPEED_SUPERSPEED ? "super" : "high");
|
||||||
}
|
}
|
||||||
portFound += count;
|
portFound += count;
|
||||||
}
|
}
|
||||||
@@ -1317,7 +1318,7 @@ XHCI::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort,
|
|||||||
case USB_SPEED_FULLSPEED:
|
case USB_SPEED_FULLSPEED:
|
||||||
dwslot0 |= SLOT_0_SPEED(1);
|
dwslot0 |= SLOT_0_SPEED(1);
|
||||||
break;
|
break;
|
||||||
case USB_SPEED_SUPER:
|
case USB_SPEED_SUPERSPEED:
|
||||||
dwslot0 |= SLOT_0_SPEED(4);
|
dwslot0 |= SLOT_0_SPEED(4);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1931,7 +1932,7 @@ XHCI::ConfigureEndpoint(uint8 slot, uint8 number, uint8 type, bool directionIn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
case USB_SPEED_HIGHSPEED:
|
case USB_SPEED_HIGHSPEED:
|
||||||
case USB_SPEED_SUPER:
|
case USB_SPEED_SUPERSPEED:
|
||||||
default:
|
default:
|
||||||
// Convert 1-16 into 0-15.
|
// Convert 1-16 into 0-15.
|
||||||
calcInterval = min_c(max_c(interval, 1), 16) - 1;
|
calcInterval = min_c(max_c(interval, 1), 16) - 1;
|
||||||
@@ -1950,7 +1951,7 @@ XHCI::ConfigureEndpoint(uint8 slot, uint8 number, uint8 type, bool directionIn,
|
|||||||
if (speed == USB_SPEED_HIGHSPEED && (type & (USB_OBJECT_INTERRUPT_PIPE
|
if (speed == USB_SPEED_HIGHSPEED && (type & (USB_OBJECT_INTERRUPT_PIPE
|
||||||
| USB_OBJECT_ISO_PIPE)) != 0) {
|
| USB_OBJECT_ISO_PIPE)) != 0) {
|
||||||
maxBurst = (maxPacketSize & 0x1800) >> 11;
|
maxBurst = (maxPacketSize & 0x1800) >> 11;
|
||||||
} else if (speed != USB_SPEED_SUPER) {
|
} else if (speed != USB_SPEED_SUPERSPEED) {
|
||||||
maxBurst = 0;
|
maxBurst = 0;
|
||||||
}
|
}
|
||||||
dwendpoint1 |= ENDPOINT_1_MAXBURST(maxBurst);
|
dwendpoint1 |= ENDPOINT_1_MAXBURST(maxBurst);
|
||||||
@@ -1975,7 +1976,7 @@ XHCI::ConfigureEndpoint(uint8 slot, uint8 number, uint8 type, bool directionIn,
|
|||||||
// for isochronous endpoints that specifies the maximum ESIT payload.
|
// for isochronous endpoints that specifies the maximum ESIT payload.
|
||||||
// We don't fetch this yet, so just fall back to the USB2 computation
|
// We don't fetch this yet, so just fall back to the USB2 computation
|
||||||
// method if bytesPerInterval is 0.
|
// method if bytesPerInterval is 0.
|
||||||
if (speed == USB_SPEED_SUPER && bytesPerInterval != 0)
|
if (speed == USB_SPEED_SUPERSPEED && bytesPerInterval != 0)
|
||||||
dwendpoint4 |= ENDPOINT_4_MAXESITPAYLOAD(bytesPerInterval);
|
dwendpoint4 |= ENDPOINT_4_MAXESITPAYLOAD(bytesPerInterval);
|
||||||
else if (speed >= USB_SPEED_HIGHSPEED)
|
else if (speed >= USB_SPEED_HIGHSPEED)
|
||||||
dwendpoint4 |= ENDPOINT_4_MAXESITPAYLOAD((maxBurst + 1) * maxPacketSize);
|
dwendpoint4 |= ENDPOINT_4_MAXESITPAYLOAD((maxBurst + 1) * maxPacketSize);
|
||||||
@@ -2017,12 +2018,12 @@ XHCI::GetPortSpeed(uint8 index, usb_speed* speed)
|
|||||||
*speed = USB_SPEED_FULLSPEED;
|
*speed = USB_SPEED_FULLSPEED;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
*speed = USB_SPEED_SUPER;
|
*speed = USB_SPEED_SUPERSPEED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
TRACE("Non Standard Port Speed\n");
|
TRACE("Non Standard Port Speed\n");
|
||||||
TRACE("Assuming Superspeed\n");
|
TRACE("Assuming Superspeed\n");
|
||||||
*speed = USB_SPEED_SUPER;
|
*speed = USB_SPEED_SUPERSPEED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2061,7 +2062,7 @@ XHCI::GetPortStatus(uint8 index, usb_port_status* status)
|
|||||||
if (portStatus & PS_PR)
|
if (portStatus & PS_PR)
|
||||||
status->status |= PORT_STATUS_RESET;
|
status->status |= PORT_STATUS_RESET;
|
||||||
if (portStatus & PS_PP) {
|
if (portStatus & PS_PP) {
|
||||||
if (fPortSpeeds[index] == USB_SPEED_SUPER)
|
if (fPortSpeeds[index] == USB_SPEED_SUPERSPEED)
|
||||||
status->status |= PORT_STATUS_SS_POWER;
|
status->status |= PORT_STATUS_SS_POWER;
|
||||||
else
|
else
|
||||||
status->status |= PORT_STATUS_POWER;
|
status->status |= PORT_STATUS_POWER;
|
||||||
@@ -2077,7 +2078,7 @@ XHCI::GetPortStatus(uint8 index, usb_port_status* status)
|
|||||||
if (portStatus & PS_PRC)
|
if (portStatus & PS_PRC)
|
||||||
status->change |= PORT_STATUS_RESET;
|
status->change |= PORT_STATUS_RESET;
|
||||||
|
|
||||||
if (fPortSpeeds[index] == USB_SPEED_SUPER) {
|
if (fPortSpeeds[index] == USB_SPEED_SUPERSPEED) {
|
||||||
if (portStatus & PS_PLC)
|
if (portStatus & PS_PLC)
|
||||||
status->change |= PORT_CHANGE_LINK_STATE;
|
status->change |= PORT_CHANGE_LINK_STATE;
|
||||||
if (portStatus & PS_WRC)
|
if (portStatus & PS_WRC)
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ static xhci_root_hub_string_s sXHCIRootHubStrings[3] = {
|
|||||||
|
|
||||||
XHCIRootHub::XHCIRootHub(Object *rootObject, int8 deviceAddress)
|
XHCIRootHub::XHCIRootHub(Object *rootObject, int8 deviceAddress)
|
||||||
: Hub(rootObject, 0, rootObject->GetStack()->IndexOfBusManager(rootObject->GetBusManager()),
|
: Hub(rootObject, 0, rootObject->GetStack()->IndexOfBusManager(rootObject->GetBusManager()),
|
||||||
sXHCIRootHubDevice, deviceAddress, USB_SPEED_SUPER, true)
|
sXHCIRootHubDevice, deviceAddress, USB_SPEED_SUPERSPEED, true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user