XHCI: Print the actual error for some more things in AllocateDevice.
May help with diagnosing #17464 and others.
This commit is contained in:
@@ -1357,8 +1357,9 @@ XHCI::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort,
|
|||||||
hubPort, speed);
|
hubPort, speed);
|
||||||
|
|
||||||
uint8 slot = XHCI_MAX_SLOTS;
|
uint8 slot = XHCI_MAX_SLOTS;
|
||||||
if (EnableSlot(&slot) != B_OK) {
|
status_t status = EnableSlot(&slot);
|
||||||
TRACE_ERROR("AllocateDevice: failed to enable slot\n");
|
if (status != B_OK) {
|
||||||
|
TRACE_ERROR("failed to enable slot: %s\n", strerror(status));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1516,8 +1517,9 @@ XHCI::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// device should get to addressed state (bsr = 0)
|
// device should get to addressed state (bsr = 0)
|
||||||
if (SetAddress(device->input_ctx_addr, false, slot) != B_OK) {
|
status = SetAddress(device->input_ctx_addr, false, slot);
|
||||||
TRACE_ERROR("unable to set address\n");
|
if (status != B_OK) {
|
||||||
|
TRACE_ERROR("unable to set address: %s\n", strerror(status));
|
||||||
CleanupDevice(device);
|
CleanupDevice(device);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1549,7 +1551,7 @@ XHCI::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort,
|
|||||||
usb_device_descriptor deviceDescriptor;
|
usb_device_descriptor deviceDescriptor;
|
||||||
|
|
||||||
TRACE("getting the device descriptor\n");
|
TRACE("getting the device descriptor\n");
|
||||||
status_t status = pipe.SendRequest(
|
status = pipe.SendRequest(
|
||||||
USB_REQTYPE_DEVICE_IN | USB_REQTYPE_STANDARD, // type
|
USB_REQTYPE_DEVICE_IN | USB_REQTYPE_STANDARD, // type
|
||||||
USB_REQUEST_GET_DESCRIPTOR, // request
|
USB_REQUEST_GET_DESCRIPTOR, // request
|
||||||
USB_DESCRIPTOR_DEVICE << 8, // value
|
USB_DESCRIPTOR_DEVICE << 8, // value
|
||||||
|
|||||||
Reference in New Issue
Block a user