History log of /haiku-fatelf/src/add-ons/kernel/busses/usb/xhci.cpp
Revision Date Author Comments
# 411272ad 03-Jun-2012 Jérôme Duval <jerome.duval@gmail.com>

Work in progress on xHCI bus driver

* added a thread to handle events, locking wasn't easy in an interrupt
handler
* the td struct can now track several buffers instead of just one.
* use Transfer::Data*() instead of Vector*() for the time being
until support for fragmented transfers is done
* added CreateDescriptorChain, WriteDescriptorChain and ReadDescriptorChain,
chained tds not working yet though.
* added a mutex lock per enabled endpoint, lock when touching the endpoint
transfer ring.
* correctly configure interval and average trb length for endpoint contexts.
* interrupt transfers seem to work on real hardware
* xhci qemu driver doesn't advance ring dequeue pointers on link trbs, thus
accessing freed trbs that could already be reused, leading to crash.


# 77a7e76c 02-May-2012 Jérôme Duval <jerome.duval@gmail.com>

Work in progress on xHCI bus driver, testing on emulation.

* Initial testing with QEmu emulation works with interrupt/bulk,
testing on real hardware still not working. Small bulk requests work
OK, not bigger ones (for instance it can't load the MediaPlayer
application at 800KB).
* QEmu doesn't support byte read in the MMIO space, switch to double word.
* added SubmitNormalRequest() for interrupt and bulk endpoints.
* AllocateDevice(): fixed the physical address of the link TRB pointing
to the beginning of the ring.
* _InsertEndpointForPipe(): setup context for non-default endpoints
on creation. This should get the device to the configured state.
* _UnlinkDescriptorForPipe(): the next pointer wasn't null after unlinking.
* HandleTransferComplete(): add descriptor to a list to be processed by the
finisher thread.
* FinishThread(): process finished transfers and call the callback,
then free the TRB.


# 2b31b4a8 01-May-2012 Jérôme Duval <jerome.duval@gmail.com>

Work in progress on xHCI bus driver.

* added more traces, coding style
* added xhci_td, xhci_endpoint structs.
* SubmitRequest: this links a 3-stage TD control request into
the endpoint ring.
* _InsertEndpointForPipe: when a pipe is created, configure the
endpoint and set up the controller cookie.
* CreateDescriptor and FreeDescriptor: allocates memory for a TD.
* _LinkDescriptorForPipe: link a TD in an endpoint ring.
* _UnlinkDescriptorForPipe: unlink a TD
* AllocateDevice:
slot number zero isn't valid.
stick the slot number to the device struct.
configure the default endpoint before calling SetAddress.
address is found in the device context instead of the input context.
device address passed to the USB stack has to begin with 1.
* Ring:
check for invalid slot/endpoint combination.
ring the slot doorbell instead of the doorbell 0.
* Root hub: fixed USB version.
* HandleTransferComplete: finds out the TD which submitted a
transfer.


# 319a3798 22-Dec-2011 Jérôme Duval <jerome.duval@gmail.com>

Work in progress on XHCI bus driver.

* USB Core:
Hub: pass more correct speed, port and address for USB3 devices.
Transfer: doesn't care for bandwidth computation for super speed.
BusManager: Make AllocateDevice() and FreeDevice() virtual, XHCI needs to setup
a slot and an address for the device.
Add USB_SPEED_WIRELESS usb_speed definition.
Add USB2.0 erratum definition and some USB3 definitions
* XHCI:
Find outs which port supports SuperSpeed or not.
Override AllocateDevice() to configure slot and address for a connected device.
Override FreeDevice() to free ressources associated to a slot.
Add context struct definitions.


# d11be975 15-Dec-2011 Jérôme Duval <jerome.duval@gmail.com>

XHCI improvements

* remove the xhci cmd complete thread
* creation of the scratchpad area
* wait for running status after starting the controller
* increase delays on controller reset (250ms instead of 100ms)
* use of SpinLocker from AutoLock.h
* add a DoCommand() method to queue a command, ring and wait for the event
response
* add a method for each command
* XHCI_PORTSC macro was off 1 port
* add definitions for TRB types, Completion Codes.


# d6e4f54f 29-Jul-2011 Jérôme Duval <korli@users.berlios.de>

Patch by Jian Chiang as part of his GSoc Project (coding style fixes by myself):
* xhci controller start operation
* command ring and event ring initialization
* No-Op Command test and real xhci irq handle
* xhci root hub support
* add Super Speed enumeration and xhci_rh.cpp into jamfile


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42511 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 18451a0c 30-Mar-2011 Jérôme Duval <korli@users.berlios.de>

Added skeleton XHCI driver by Jian Chiang, based on the specs and the EHCI driver.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41142 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 411272adfd60dcab0a42879cc617b59d9c333ca3 03-Jun-2012 Jérôme Duval <jerome.duval@gmail.com>

Work in progress on xHCI bus driver

* added a thread to handle events, locking wasn't easy in an interrupt
handler
* the td struct can now track several buffers instead of just one.
* use Transfer::Data*() instead of Vector*() for the time being
until support for fragmented transfers is done
* added CreateDescriptorChain, WriteDescriptorChain and ReadDescriptorChain,
chained tds not working yet though.
* added a mutex lock per enabled endpoint, lock when touching the endpoint
transfer ring.
* correctly configure interval and average trb length for endpoint contexts.
* interrupt transfers seem to work on real hardware
* xhci qemu driver doesn't advance ring dequeue pointers on link trbs, thus
accessing freed trbs that could already be reused, leading to crash.


# 77a7e76cc13ba10f354d1cf43467b612149e04ab 02-May-2012 Jérôme Duval <jerome.duval@gmail.com>

Work in progress on xHCI bus driver, testing on emulation.

* Initial testing with QEmu emulation works with interrupt/bulk,
testing on real hardware still not working. Small bulk requests work
OK, not bigger ones (for instance it can't load the MediaPlayer
application at 800KB).
* QEmu doesn't support byte read in the MMIO space, switch to double word.
* added SubmitNormalRequest() for interrupt and bulk endpoints.
* AllocateDevice(): fixed the physical address of the link TRB pointing
to the beginning of the ring.
* _InsertEndpointForPipe(): setup context for non-default endpoints
on creation. This should get the device to the configured state.
* _UnlinkDescriptorForPipe(): the next pointer wasn't null after unlinking.
* HandleTransferComplete(): add descriptor to a list to be processed by the
finisher thread.
* FinishThread(): process finished transfers and call the callback,
then free the TRB.


# 2b31b4a88cdcc94b3db80cd453b9fd366420873c 01-May-2012 Jérôme Duval <jerome.duval@gmail.com>

Work in progress on xHCI bus driver.

* added more traces, coding style
* added xhci_td, xhci_endpoint structs.
* SubmitRequest: this links a 3-stage TD control request into
the endpoint ring.
* _InsertEndpointForPipe: when a pipe is created, configure the
endpoint and set up the controller cookie.
* CreateDescriptor and FreeDescriptor: allocates memory for a TD.
* _LinkDescriptorForPipe: link a TD in an endpoint ring.
* _UnlinkDescriptorForPipe: unlink a TD
* AllocateDevice:
slot number zero isn't valid.
stick the slot number to the device struct.
configure the default endpoint before calling SetAddress.
address is found in the device context instead of the input context.
device address passed to the USB stack has to begin with 1.
* Ring:
check for invalid slot/endpoint combination.
ring the slot doorbell instead of the doorbell 0.
* Root hub: fixed USB version.
* HandleTransferComplete: finds out the TD which submitted a
transfer.


# 319a3798bc05579e8be813c2524bc89864bae489 22-Dec-2011 Jérôme Duval <jerome.duval@gmail.com>

Work in progress on XHCI bus driver.

* USB Core:
Hub: pass more correct speed, port and address for USB3 devices.
Transfer: doesn't care for bandwidth computation for super speed.
BusManager: Make AllocateDevice() and FreeDevice() virtual, XHCI needs to setup
a slot and an address for the device.
Add USB_SPEED_WIRELESS usb_speed definition.
Add USB2.0 erratum definition and some USB3 definitions
* XHCI:
Find outs which port supports SuperSpeed or not.
Override AllocateDevice() to configure slot and address for a connected device.
Override FreeDevice() to free ressources associated to a slot.
Add context struct definitions.


# d11be9757252d31dfc4d9cdbc6ec17737c30c217 15-Dec-2011 Jérôme Duval <jerome.duval@gmail.com>

XHCI improvements

* remove the xhci cmd complete thread
* creation of the scratchpad area
* wait for running status after starting the controller
* increase delays on controller reset (250ms instead of 100ms)
* use of SpinLocker from AutoLock.h
* add a DoCommand() method to queue a command, ring and wait for the event
response
* add a method for each command
* XHCI_PORTSC macro was off 1 port
* add definitions for TRB types, Completion Codes.


# d6e4f54f2de4c76fbfbe85fc348a8fde8c296dc6 29-Jul-2011 Jérôme Duval <korli@users.berlios.de>

Patch by Jian Chiang as part of his GSoc Project (coding style fixes by myself):
* xhci controller start operation
* command ring and event ring initialization
* No-Op Command test and real xhci irq handle
* xhci root hub support
* add Super Speed enumeration and xhci_rh.cpp into jamfile


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42511 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 18451a0c360c0db068891588dc0f6d97c5ee9cb9 30-Mar-2011 Jérôme Duval <korli@users.berlios.de>

Added skeleton XHCI driver by Jian Chiang, based on the specs and the EHCI driver.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41142 a95241bf-73f2-0310-859d-f6bbb57e9c96