Implemented split transactions for control and bulk pipes in EHCI.
With this it is possible to use low/fullspeed (USB 1.1) devices below USB 2.0 Hubs. Note though that you cannot yet use mice or keyboards attached to USB 2.0 Hubs as split transactions for interrupt pipes are still missing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22973 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -522,7 +522,6 @@ EHCI::AddTo(Stack *stack)
|
||||
}
|
||||
|
||||
for (int32 i = 0; sPCIModule->get_nth_pci_info(i, item) >= B_OK; i++) {
|
||||
|
||||
if (item->class_base == PCI_serial_bus && item->class_sub == PCI_usb
|
||||
&& item->class_api == PCI_usb_ehci) {
|
||||
if (item->u.h0.interrupt_line == 0
|
||||
@@ -1205,21 +1204,24 @@ EHCI::InitQueueHead(ehci_qh *queueHead, Pipe *pipe)
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
if (pipe->Type() & USB_OBJECT_CONTROL_PIPE) {
|
||||
queueHead->endpoint_chars |=
|
||||
(pipe->Speed() != USB_SPEED_HIGHSPEED ? EHCI_QH_CHARS_CONTROL : 0);
|
||||
}
|
||||
|
||||
queueHead->endpoint_chars |= (3 << EHCI_QH_CHARS_RL_SHIFT)
|
||||
| (pipe->MaxPacketSize() << EHCI_QH_CHARS_MPL_SHIFT)
|
||||
| (pipe->EndpointAddress() << EHCI_QH_CHARS_EPT_SHIFT)
|
||||
| (pipe->DeviceAddress() << EHCI_QH_CHARS_DEV_SHIFT)
|
||||
| EHCI_QH_CHARS_TOGGLE;
|
||||
queueHead->endpoint_caps = (1 << EHCI_QH_CAPS_MULT_SHIFT);
|
||||
|
||||
queueHead->endpoint_caps = (1 << EHCI_QH_CAPS_MULT_SHIFT);
|
||||
if (pipe->Type() & USB_OBJECT_INTERRUPT_PIPE)
|
||||
queueHead->endpoint_caps |= (0xff << EHCI_QH_CAPS_ISM_SHIFT);
|
||||
|
||||
if (pipe->Speed() != USB_SPEED_HIGHSPEED) {
|
||||
if (pipe->Type() & USB_OBJECT_CONTROL_PIPE)
|
||||
queueHead->endpoint_chars |= EHCI_QH_CHARS_CONTROL;
|
||||
|
||||
queueHead->endpoint_caps |= (pipe->HubPort() << EHCI_QH_CAPS_PORT_SHIFT)
|
||||
| (pipe->HubAddress() << EHCI_QH_CAPS_HUB_SHIFT);
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -224,9 +224,9 @@ typedef struct {
|
||||
// Applies to ehci_qh.endpoint_caps
|
||||
#define EHCI_QH_CAPS_MULT_SHIFT 30 // Transactions per Micro-Frame
|
||||
#define EHCI_QH_CAPS_MULT_MASK 0x03
|
||||
#define EHCI_QH_CAPS_PORT_SHIFT 23 // Port Number
|
||||
#define EHCI_QH_CAPS_PORT_SHIFT 23 // Hub Port (Split-Transaction)
|
||||
#define EHCI_QH_CAPS_PORT_MASK 0x7f
|
||||
#define EHCI_QH_CAPS_HUB_SHIFT 16 // Hub Address
|
||||
#define EHCI_QH_CAPS_HUB_SHIFT 16 // Hub Address (Split-Transaction)
|
||||
#define EHCI_QH_CAPS_HUB_MASK 0x7f
|
||||
#define EHCI_QH_CAPS_SCM_SHIFT 8 // Split Completion Mask
|
||||
#define EHCI_QH_CAPS_SCM_MASK 0xff
|
||||
|
||||
Reference in New Issue
Block a user