History log of /haiku/src/add-ons/kernel/busses/usb/ehci_rh.cpp
Revision Date Author Comments
# f14fe767 23-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

* Rework the USB tracing mechanism. Cleaned it up and make it more convenient to
use. It will now print out the usb_ids of the objects that generate the trace
messages. These IDs are unique compared to the device address used previously,
because device addresses are per bus while usb_ids are global. This makes
trace output from devices across multiple controllers distinguishable.
* Some cleanup.


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


# a5243128 21-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

* Fix off-by-one error in port number which caused full- or lowspeed devices
behind highspeed hubs with multiple transaction translators not to work.
* The parent hub isn't necessarily the one providing the transaction translator
for a full- or lowspeed device. Therefore we need to inherit the hub/port
addresses to lower devices unless we are a highspeed hub that might be the
actual provider of the transaction translator. This logic error caused full-
and lowspeed devices not to work if they were behind a fullspeed hub that
itself was behind a highspeed hub.

This fixes bugs #1889 and #2501.

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


# 0e2a404f 16-May-2008 Michael Lotz <mmlr@mlotz.ch>

* Sync roothub code between UHCI and EHCI (will be reworked to a common one)
* Minor whitespace cleanup

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


# a93bd0c4 01-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

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


# 072c28de 21-Nov-2007 Michael Lotz <mmlr@mlotz.ch>

* Redesign the Pipe constructor to only take the parent object
* All other init is done in InitCommon() which only needs to be present in the base class
* Adding the hub port a device is attached to to the Device class
* Add hub port and hub address to the Pipe class (will be used for split transactions in EHCI)
* Update the root hubs to reflect the changes to hub creation

Sadly we need pipes that do not belong to devices (default pipe for addressing and to get initial device descriptor). Therefore we cannot resolve hub address and port from the parent device.

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


# 17f83b21 24-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Switched from the old v2 callback status codes to the new v3 codes
This means that the usb_callback_func now takes a status_t instead of a uint32 status.
Also the error codes are now different. I don't see this as a real problem in binary compatibility, as the status codes were never really documented and most drivers just assumed that a nonzero status meant an error.
Source compatibility breaks for callback functions and error defines. I fixed (hopefully) all places in the tree that are currenty included in the image and affected by the change.
* Corrected error reporting in UHCI and EHCI using the new status codes.
* Fixed a memory leak in EHCI where the async advance interrupt was not triggered in time.
* Fixed another race condition in usb_raw that could cause a crash when a device is removed while a transfer is pending.

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


# f452f9dc 14-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented most qTD and qH functions for EHCI async transfers.
* Implementing control and bulk (async) transfers. They don't work yet though.
* Corrected the legacy support handling in EHCI
* Fixed the bit mask for total bytes in qTDs and added the data toggle bit
* Changed the boolean low speed flags to usb_speed enum that allows for low, full and highspeed

Also wrote a memory allocator that takes over memory management from the stack. It is similar to a buddy allocator. This does on the one hand remove some ugly code from the stack and is on the other hand far more scalable than the previous free list approach. This scalability is needed for proper EHCI support where buffers can go up to a size of 5 pages. The allocator is not perfect and it's memory overhead is quite high compared to the managed memory (depends on the managed block sizes), but it's quik and works well so far.

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


# c773d729 30-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

Fixed wrong length of string descriptors.

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


# 8fedfdfc 30-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Rewrote some stack internals (again). Everything is now created using a parent object that shares the BusManager and Stack information to reduce individual constructors.
* Don't inherit Device and Interface from pipes anymore. The device has a default pipe member now.
* Since the parent of each Object is now known, we can send control messages using the default pipe of the device from all attached elements (pipes and interfaces).
* Fixed the generic {Set|Clear}Feature() and GetStatus() calls to include the endpoint address for pipe specific requests.

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


# ffe3f107 27-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Redisigned some of the USB Stack. Unified constructors, removed redundant functions and moved some other functions around
* Implemented the EHCIRootHub
* Reworked UHCIRootHub to be more of a utility class and moved the actual work into the UHCI BusManager
* Implemented port reset in EHCI. Ports with low and fullspeed devices are now correctly handed over to the companion host controller.

Attachs and detachs as well as port resetting / enabling works now in EHCI. Only the actual data transfers are missing thereafter ;-)

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


# 9e857d24 25-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Adding skeleton EHCI driver. Some parts filled from the specs and the UHCI driver.
* Corrected some errors I found while reading UHCI.

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


# f14fe767bf568186bbd0678e35b03c99d8a264c6 23-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

* Rework the USB tracing mechanism. Cleaned it up and make it more convenient to
use. It will now print out the usb_ids of the objects that generate the trace
messages. These IDs are unique compared to the device address used previously,
because device addresses are per bus while usb_ids are global. This makes
trace output from devices across multiple controllers distinguishable.
* Some cleanup.


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


# a5243128424aab5d6f5cfebe965de0b1334fcee5 21-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

* Fix off-by-one error in port number which caused full- or lowspeed devices
behind highspeed hubs with multiple transaction translators not to work.
* The parent hub isn't necessarily the one providing the transaction translator
for a full- or lowspeed device. Therefore we need to inherit the hub/port
addresses to lower devices unless we are a highspeed hub that might be the
actual provider of the transaction translator. This logic error caused full-
and lowspeed devices not to work if they were behind a fullspeed hub that
itself was behind a highspeed hub.

This fixes bugs #1889 and #2501.

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


# 0e2a404fc90a4cf171ea5ac4860c4afa9a0377e6 16-May-2008 Michael Lotz <mmlr@mlotz.ch>

* Sync roothub code between UHCI and EHCI (will be reworked to a common one)
* Minor whitespace cleanup

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


# a93bd0c45232acd3e2038807255ab0427ecc1bca 01-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

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


# 072c28ded529ca52c32863b4eb1b8f21f1debb71 21-Nov-2007 Michael Lotz <mmlr@mlotz.ch>

* Redesign the Pipe constructor to only take the parent object
* All other init is done in InitCommon() which only needs to be present in the base class
* Adding the hub port a device is attached to to the Device class
* Add hub port and hub address to the Pipe class (will be used for split transactions in EHCI)
* Update the root hubs to reflect the changes to hub creation

Sadly we need pipes that do not belong to devices (default pipe for addressing and to get initial device descriptor). Therefore we cannot resolve hub address and port from the parent device.

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


# 17f83b219d63eae4de462d6868e7d26ad6c3949e 24-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Switched from the old v2 callback status codes to the new v3 codes
This means that the usb_callback_func now takes a status_t instead of a uint32 status.
Also the error codes are now different. I don't see this as a real problem in binary compatibility, as the status codes were never really documented and most drivers just assumed that a nonzero status meant an error.
Source compatibility breaks for callback functions and error defines. I fixed (hopefully) all places in the tree that are currenty included in the image and affected by the change.
* Corrected error reporting in UHCI and EHCI using the new status codes.
* Fixed a memory leak in EHCI where the async advance interrupt was not triggered in time.
* Fixed another race condition in usb_raw that could cause a crash when a device is removed while a transfer is pending.

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


# f452f9dc783e647ece105a379564d9ce6a05de2b 14-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented most qTD and qH functions for EHCI async transfers.
* Implementing control and bulk (async) transfers. They don't work yet though.
* Corrected the legacy support handling in EHCI
* Fixed the bit mask for total bytes in qTDs and added the data toggle bit
* Changed the boolean low speed flags to usb_speed enum that allows for low, full and highspeed

Also wrote a memory allocator that takes over memory management from the stack. It is similar to a buddy allocator. This does on the one hand remove some ugly code from the stack and is on the other hand far more scalable than the previous free list approach. This scalability is needed for proper EHCI support where buffers can go up to a size of 5 pages. The allocator is not perfect and it's memory overhead is quite high compared to the managed memory (depends on the managed block sizes), but it's quik and works well so far.

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


# c773d729dcbc7283f02edb47ab29cf7d7ace00ea 30-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

Fixed wrong length of string descriptors.

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


# 8fedfdfcf8f931cd52a6e934a5b4e0aca565cf99 30-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Rewrote some stack internals (again). Everything is now created using a parent object that shares the BusManager and Stack information to reduce individual constructors.
* Don't inherit Device and Interface from pipes anymore. The device has a default pipe member now.
* Since the parent of each Object is now known, we can send control messages using the default pipe of the device from all attached elements (pipes and interfaces).
* Fixed the generic {Set|Clear}Feature() and GetStatus() calls to include the endpoint address for pipe specific requests.

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


# ffe3f107c4ae65ec52128bb36115779fe07a01c0 27-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Redisigned some of the USB Stack. Unified constructors, removed redundant functions and moved some other functions around
* Implemented the EHCIRootHub
* Reworked UHCIRootHub to be more of a utility class and moved the actual work into the UHCI BusManager
* Implemented port reset in EHCI. Ports with low and fullspeed devices are now correctly handed over to the companion host controller.

Attachs and detachs as well as port resetting / enabling works now in EHCI. Only the actual data transfers are missing thereafter ;-)

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


# 9e857d24ca41743874f6b3c08bb0c35f53df5763 25-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Adding skeleton EHCI driver. Some parts filled from the specs and the UHCI driver.
* Corrected some errors I found while reading UHCI.

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