History log of /haiku/src/add-ons/kernel/busses/usb/uhci.cpp
Revision Date Author Comments
# 629f071b 27-Feb-2024 X512 <danger_mail@list.ru>

pci: extend MSI interrupt vector number to 32 bits

Also increase MSI message data size to 32 bits according to PCIe spec.

Remove 0xff check for MSI interrupts because it is potentially valid
interrupt vector number. Reject 0xff only for legacy pin interrupts.

- MSI-X supports up to 2048 interrupts per device that do not fit to
`uint8`.

- Non-x86 systems may use separate interrupt vector ranges for
hard-wired interrupts and MSI interrupts so `uint8` is not enough to
represent all of them.

Change-Id: Iaf9ffb197ec23db0f97ffe3ea756d28d7bfc8705
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7433
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# be3ce6d7 31-Jan-2024 Augustin Cavalier <waddlesplash@gmail.com>

USB: Make "buffer error" reporting consistent.

This error means that the controller failed to read or write data
to/from system memory fast enough. As a result, we should report it
as READ_ERROR/WRITE_ERROR, rather than something that sounds like
an error with the device itself.

Then, make BABBLE reporting consistent: this is a data overrun/underrun
of the device itself, not the buffers passed to the controller.
This then leaves B_DEV_FIFO_OVERRUN/UNDERRUN unused, and thus usable
for reporting ring overrun/underrun on isochronous transfers.

The API documentation already described DATA_OVERRUN/UNDERRUN basically
like they were babble errors, while FIFO_OVERRUN/UNDERRUN are
currently described as "internal errors" at present. No driver actually
checked for these.


# 8c458fc4 29-Jan-2024 Augustin Cavalier <waddlesplash@gmail.com>

USB: Initialize packet descriptors inside the stack.

Allows deletion of generic code from bus drivers.


# 55a46882 30-May-2023 Augustin Cavalier <waddlesplash@gmail.com>

USB: Support physical-vector bulk requests.

Introduce a new utility method, "generic_memcpy", which takes
generic_addr_t plus indications of whether these specify virtual or
physical addresses (and potentially user addresess) and calls the
appropriate memcpy variant depending.

All bus drivers adjusted to support this at once. We don't actually
take advantage of the physical addresses in any way (yet), as USB
controllers have some pretty specific requirements that would have
to be carefully validated to use these directly.

All bus drivers tested and confirmed to still be working.

Change-Id: I66326667e148091147bb2b3d0843a26fb7e5bda6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6479
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 99626c29 29-May-2023 Augustin Cavalier <waddlesplash@gmail.com>

USB: Use generic_io_vec in Transfer.

Prepares the way for actual physical-address request support,
which is not yet wired up.

Change-Id: I1b2d04a31e334a79b8361280fa0f3a5fbdb43d2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6478
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 3b91d73b 16-Dec-2022 X512 <danger_mail@list.ru>

bus & drivers: drop PCI_x86

Change-Id: I494deaf24a4793a5e0fe9fa46ecdce32f65e616a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6226
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 215b685f 11-Dec-2022 X512 <danger_mail@list.ru>

kernel: Drop non-standard GNU inline assignment syntax

* We needed this previously due to our gcc2 compiled kernel.
* Now that our kernel is always latest gcc, we can move to the
c++20 syntax for inline assignment.
* Improves compatibility with clang, less GNU-specific stuff

Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# d2875e7b 16-Nov-2022 Jérôme Duval <jerome.duval@gmail.com>

usb: fix references on the module B_PCI_X86_MODULE_NAME

the dependency is optional, only the device modules depend on it.
should fix #18075

Change-Id: Ifddb9814ff5ff59ee7d80d06b14ba9fded04cd56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5822
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# e6ce95c5 10-Oct-2022 Jérôme Duval <jerome.duval@gmail.com>

usb: register device nodes for hubs and devices

the device identifier is the USBID. no actual interface to be used by drivers.

Change-Id: I9fd1fdab0d02f1b82380c619b39bc3a12a9e2333
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5736
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 6652606f 05-Oct-2022 Jérôme Duval <jerome.duval@gmail.com>

usb: remove debug leftover

Change-Id: Idba6eaecb2c5b5773cd61794ac62fac1f7e3c1f9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5715
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 547ddb90 01-Oct-2022 Jérôme Duval <jerome.duval@gmail.com>

uhci: switch to the new driver API

Change-Id: Ifc95a32066d0089d3fd41e489604d58815c074af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5711
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# ffc83aa2 28-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

USB bus drivers: Add missing iterator increments.

Should fix boot hang regressions introduced in hrev55455
in the fix for #17275.


# ae61e1b7 27-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

USB bus drivers: Return error when combining other transfers with a fragmented one.

The drivers do not support this properly at present, they would
run the other transfers interspersed with fragments from the fragemented one,
which is obviously the wrong thing to do.

No USB device drivers seem to do this at present (it would cause data
corruption if they had.)

Fixes #17275.


# bc7fd433 20-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

USB: Rename Transfer::VectorLength to Transfer::FragmentLength.

It did not return the length of the vectors, but only the current
fragment's worth of vectors. It also modified the fFragmented flag,
which really should have been set in SetVectors in the first place.

As everything seemed to call IsFragmented after VectorLength,
this is not a behavioral change.


# 39fb148a 03-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

UHCI: Disable isochronous transfers support.

It busyloops, and at least on QEMU, does not seem to work at all.


# 68a0df3e 01-Aug-2020 Murai Takashi <tmurai01@gmail.com>

usb/uhci: Remove unneeded NULL check

Thanks to mmlr for pointing out element could not be NULL.

Change-Id: I89d85fdd2cc30efd54c81f6c50a5497208bab5d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3259
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# e8b2085d 18-Apr-2019 Augustin Cavalier <waddlesplash@gmail.com>

busses/usb: Print the PCI ID of the device with an invalid IRQ.


# 6be54385 13-Apr-2019 Augustin Cavalier <waddlesplash@gmail.com>

busses/usb: Handle getting/putting the PCI modules properly.

Previously it was possible that we put() them twice, leading to
assert-failure panics as their ref-counts would go below 0.
Now we get() them once for every bus object that we create, as
the destructors put() them.

Should fix the panic in #15004.


# 67b05100 12-Apr-2019 Augustin Cavalier <waddlesplash@gmail.com>

busses/usb: Don't reject devices with "invalid" IRQs immediately.

We may be able to allocate an MSI for them. This was done for XHCI
already in hrev52742.

Probably fixes #15004.


# 5c6d92d7 12-Apr-2019 Augustin Cavalier <waddlesplash@gmail.com>

busses/usb: Move ::AddTo to be above the class constructors.

It is called before them (and is responsible for calling them),
so having it in the middle of the file does not make a lot of sense.

Already done for XHCI. Only one functional change -- removing the
set_dprintf_enabled call. Drivers probably shouldn't spuriously
re-enable that if it was specifically disabled.


# a182f193 19-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

USB: Properly assign IDs to USB Bus Managers (HCI drivers).

Previously they would just get -1, as the BusManager class
would request their ID before they had been added to the Stack.
Now we add them to the stack inside ::Start(), rather than letting
the individual drivers do that just after ::Start(), and then assign
the ID there directly.


# 21c87a5d 09-Sep-2018 Jérôme Duval <jerome.duval@gmail.com>

drivers: remove some non-haiku support code.

Change-Id: Ic55bb4832adabeb807f763c87ad938e74fb3a97d
Reviewed-on: https://review.haiku-os.org/520
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 064018fb 31-Aug-2014 Michael Lotz <mmlr@mlotz.ch>

UHCI: Reject request debug transfers on control pipes.

Requests aren't handled in the debug transfer code path and would
end up in wrongly constructed descriptor chains.


# 159aa93b 31-Aug-2014 Michael Lotz <mmlr@mlotz.ch>

USB: Generalize logic for debug transfers used within KDL.

Pull debug transfer methods into the base BusManager class and
implement them for UHCI and EHCI. This makes it possible to have a
single debugger command installed by the USB stack instead of HCI
specific ones.


# ec17ebde 20-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

UHCI: Enable short packet detection for all transfers.

As suggested by akshay, there is no reason to do this only for control
transfers. All input transfers can have short packets and we want to
detect those and trigger the "end of transfer" code when a short packet
happens.

Fixes #11087.


# 15777340 07-Jun-2014 Akshay Jaggi <akshay1994.leo@gmail.com>

Fix UHCI Short Packet Transfers


# a17e9da1 09-Aug-2013 Jerome Duval <jerome.duval@gmail.com>

XHCI/UHCI USB: forgot to get the x86 PCI module.


# c45ac5ad 30-Jul-2013 Jerome Duval <jerome.duval@gmail.com>

UHCI USB: add MSI support

* similar to OHCI support by mmlr.
* interrupt handler is removed on destruction.


# 2997a191 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed UHCI for x86_64.


# eb5f3639 12-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Fixes some occurrences of 'variable set but not used', disables Werror for problematic items.


# 653ce5db 25-Nov-2011 Michael Lotz <mmlr@mlotz.ch>

Initialize the isochronous lock earlier.

The constructor may abort at various places and the destructor cleans up
everything already initialized. The mutex was however not initialized
early on, leading to #8153 where the mutex was destroied in the error
case, accessing uninitialized memory. Fixes #8153 though the reason for
the aborted constructor probably needs to be investigated as well.


# 8bcc50c3 12-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added arch_debug_blue_screen_try_getchar() and arch_debug_serial_try_getchar()
which don't wait for a character, but return -1 when no character is
available ATM. Implemented correctly for x86 only.
* Changed the semantics of the debugger_module_info::debugger_getchar() hook.
It is supposed to return immediately now.
* Adjusted usb_keyboard accordingly. Hacked UHCI's debug_process_transfer() to
achieve that. It does now start, check, or cancel a transfer. Split
UHCI::ProcessDebugTransfer() into StartDebugTransfer(), and
CheckDebugTransfer() accordingly, and also added a CancelDebugTransfer().
The latter seems to have issues. Michael, please have a look. I have no clue
what I'm doing. :-)
* Adjusted kgetc() to poll all possible inputs using the new
functions/semantics. This allows to use any input (USB, PS/2, serial) in KDL.
* Removed the no longer needed "serial_input" command.
* read_line(): Also support 0x7f as backspace code. That's what xterm sends.


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


# e5937bd2 27-Apr-2011 Jérôme Duval <korli@users.berlios.de>

* fixed typo
* when removing a transfer, if this was the only one in the list, we set fLastIsochronousTransfer to NULL.


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


# c1b432af 25-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix build with tracing enabled.


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


# 1393394b 22-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

We need to guarantee that when cancel returns that the callback won't be called
anymore. It could happen that the transfer was already in the process of being
finished, so wasn't in the list of pending transfers anymore. Cancel would then
return even though the callback wasn't called yet. This could lead to a callback
being called after a driver was already unloaded (even after it cleaned up the
pipes it used).


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


# 527e6eef 11-May-2009 Michael Lotz <mmlr@mlotz.ch>

Do not free the descriptor chains and transfer queue head directly when
finishing transfers. The host controller might still be using some of those
structures. In the (unlikely) case that a freed memory chunk would be
immediately re-used and filled with new values this would lead the controller
to either find invalid values and assert a process error or it could follow
invalid list links leading to host system errors. We have to wait with freeing
until the controller processing the next frame to make sure this cannot happen.
The unlikely case should also have been the cause of bug #2481.


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


# 9bc8951d 11-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Simplify the way fragmented transfers are resubmited.
* This also paves the way for a different way to handle transfer freeing.
* Also fixes that errors in reappending would previously not be propagated to
the caller.


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


# aa3ca9ed 11-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Move the actual and maximum length calculation into two inline functions.
* Use those to make sure the size is retrieved correctly in all cases (which
it wasn't in the short packet tests).
* Don't detect short packets for control transfers as we need the status packet
to finish the transfer and cannot quit earlier.
* Only check for short packets when we also have the short packet flag set.


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


# 5c3441b4 02-May-2009 Michael Lotz <mmlr@mlotz.ch>

We are generally interested in those error bits so print them always.


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


# eb01fb72 08-Apr-2009 Michael Lotz <mmlr@mlotz.ch>

* Add the kernel debugger extensions only for the haiku target.
* Acknowledge non-enabled interrupts in UHCI as done in EHCI as well.


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


# 6eba0636 22-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Added simplified possibility to schedule UHCI transfers from within KDL.
* Added debugger commands to resolve usb_ids to pipes.
* Adjusted the physical memory allocator to be usable in a slimmed down mode
when running inside the kernel debugger.
* Implemented USB keyboard support for KDL through a kernel debugger add-on.
* Added kgetc() and made use of it where previously individual methods were used
to ensure that reading characters always goes through the kernel debugger
add-ons and the other methods.

This has some preconditions to meet though:
1) The keyboard must be in the boot protocol (currently the case but needs to
be revisited once we have a full usb_hid).
2) The keyboard must be attached to a UHCI root port (i.e. not use EHCI or OHCI,
also not through hubs unless those are USB 1.1).
3) the usb_hid driver has to be opened for this to work. This means that for the
time between initializing USB and when usb_hid is opened by the input_server
there is no keyboard support.

Also note that this has no way of detecting hot-plug, meaning that you can't
re-attach your USB keyboard from the hub to the root port once in KDL.

On the bright side of things, since this is a non-destructive mechanism it is
possible to enter and leave KDL without loosing the USB state.

Tested OK in QEMU, not tested on real hardware yet, will see in a few minutes.


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


# 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


# 2fc7e292 19-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

When calculating the actual length for requests, we don't want to include the
8 byte request header. It was included in the case of outgoing request
transfers before. In fact we always just want the length of the data phase,
which for non-requests just happens to be the whole transfer.

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


# 4ca87670 08-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

When canceling transfers, do not call the callbacks with the lock held. This
prevents deadlocks in cases where a new transfer is scheduled from within the
cancel callback. This is an edge case, as generally you don't want to schedule
anything when explicitly canceling transfers, but there are a valid use cases
when you cancel because of a timeout and then have to reset the device for
example. Note that this hides bug #2353, where the cancel case is probably
not handled correctly.

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


# b1385bc3 06-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* When encountering an unrecoverable error at least turn off interrupts until
we properly handle this case (cancel everything and reset the controller) to
avoid flooding the system with interrupts.
* Also only check for enabled interrupts to not steal potentially shared
interrupts.

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


# 1c8de858 01-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added optional spinlock contention measurement feature. Enabled when
B_DEBUG_SPINLOCK_CONTENTION is defined to 1. It typedefs spinlock to a
structure (thus breaking BeOS binary compatibility), containing a
counter which is incremented whenever a thread has to wait for the
spinlock.
* Added macros for spinlock initialization and access and changed
code using spinlocks accordingly. This breaks compilation for BeOS --
the macros should be defined in the respective compatibility wrappers.
* Added generic syscall to get the spinlock counters for the thread and
the team spinlocks.


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


# 2b07b8e0 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Replaced all instances of benaphores in the kernel code by mutexes.
* Removed kernel benaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25690 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


# f3283bfa 16-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

* Increase the amount of tries in the EHCI BIOS handover so it lasts for up to
1 second instead of half a second. Might help with slow BIOSes.
* Disable EHCI interrupts if the BIOS handover fails so that we do not flood
the system with interrupts if the BIOS later on decides to still comply with
our handover request.
* Add an unconditional success message to EHCI and UHCI to better see if
controllers are present/initialized correctly at all.

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


# 656af4e8 12-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

* Initialize all of the fields in the UHCI class so in case of an error in the
constructor the object can be safely deleted (as documented for bug #1473)
* Some simplifications by caching the Pipe object for a transfer
* Minor cleanup

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


# 8ff902d0 09-Apr-2008 François Revol <revol@free.fr>

Fix building usb busses with tracing on.


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


# 8024db25 06-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

Change just host_controller_info to usb_host_controller_info for the sake of
clearity as suggested by Philippe Houdoin once and brought to my attention by
Slavatore. As this definition is completely private to the USB stack it would
not have caused any conflicts though.

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


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

When initializing a UHCI controller, ensure that the interrupts are disabled
before routing them from the BIOS. Also clear pending SMIs when disabling
legacy support. Might help with some legacy support issues and probably
introduces others instead...

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


# 2b5d39e8 23-Jan-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Added force paramater to CancelQueuedIsochronousTransfers along with a TODO
* Replaced space with tab


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


# f3909451 24-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

Forgot to commit the same change in UHCI:
Notify the finisher thread after canceling transfers. It was possible that freeing the allocated
transfer resources would be delayed unnecessarily until some other transfer completed and woke up
the finisher thread. Found by Salvatore Benedetto, thanks!

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


# 5b6cdc4c 22-Jan-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* fixed memory leak: if InitKernelAccess failed data was not deleted



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


# 187574cf 23-Nov-2007 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Small clean up


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


# 13508e8b 14-Nov-2007 Michael Lotz <mmlr@mlotz.ch>

Completely redesign the USB explore process. Replaces the scary race conditions of the previous locking mechanism and simplifies handling of device changes by a more centralized approach.
Changes are now collected during explore and notifications as well as rescans are done at once. Through this a driver is also not rescanned multiple times anymore.

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


# ee21f1bc 13-Oct-2007 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Fix some bugs introduced by myself ;)
* Removed IOC bit on last TD. To find out whether the TD removed is the
last one of a transfer it simply iterate through every transfer submitted. Not the best
solution, but should be ok for now. Improvements will be made when there will be some driver to test it with.
* Clean up


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


# 16298429 10-Aug-2007 Michael Lotz <mmlr@mlotz.ch>

Change the way UHCI does things. Restructured processing of transfers in the finisher thread:
* Transfer removal is now done only from the finisher
* Processing is only done after the transfer has been removed from the list
* Canceling transfers only sets a flag so the finisher can remove the transfer
* The callback at cancel is done synchronously though

This fixes quite a few race conditions where transfers were processed while they where already removed. It could happen before that callbacks would have been called twice or freed descriptors/callback buffers were accessed.

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


# 7ca97e35 17-Jul-2007 Michael Lotz <mmlr@mlotz.ch>

Patches by Salvatore Benedetto to fix changes made by me and also the underlaying problem that caused high CPU usage in the isochronous finisher thread. Also includes patches to support isochronous support through USBKit / usb_raw. Thanks!

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


# 83743160 27-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Actually initialize the list of first and last isochronous transfers.

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


# 21727943 27-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Fixing bug #1284.

* Rearranged isochronous finishing to happen from within the finisher thread
* Removed the separate isochronous finishing thread

Since the finisher thread blocks when no transfers are complete this should bring down CPU load.

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


# ac9d1195 25-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Commiting patch by Salvatore Benedetto. This adds isochronous handling to the USB bus manager and enables inbound isochronous support in the UHCI driver. Thanks!

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


# f6bdd7b4 27-May-2007 François Revol <revol@free.fr>

Patch by Salvatore Benedetto:
Code readability; portability fixes.
Added unimplemented SubmitIsochronous().


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


# 34cbbba7 07-May-2007 Michael Lotz <mmlr@mlotz.ch>

* Reworked userland buffer access functionality into two functions in the Transfer class to not duplicate code in each HCD
* Use these functions in UHCI and EHCI which greatly reduces overhead on fragmented transfers as the vector conversion and area cloning is only done once
* Use the PrepareKernelAccess() function before submitting fragments which fixes the crash when trying to access the next fragments buffer in user memory from the kernel thread

This should fix bug #1167 which could be encountered when sending data to a mass storage device with an application that uses a large enough transfer buffer size.

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


# 40fd2328 07-May-2007 Jérôme Duval <korli@users.berlios.de>

implemented CancelQueuedTransfers for uhci


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


# 3ad50dab 25-Mar-2007 Michael Lotz <mmlr@mlotz.ch>

Fixed design flaw in the UHCI fragment implementation and a memory leak both introduced in the last commit.

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


# 145461d5 25-Mar-2007 Michael Lotz <mmlr@mlotz.ch>

Implemented fragmented USB transfers. The transfer length will max out at a certain point to not overflow the allocator. The fragmented transfers are resubmitted until all fragments are sent / received.

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


# a3dfc274 18-Jan-2007 Michael Lotz <mmlr@mlotz.ch>

* Implemented clearing port enabled change
* Fixed build with debug output turned on
* Cleaned up the uhci_hardware header a bit

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


# 9c8cdfd8 07-Jan-2007 Michael Lotz <mmlr@mlotz.ch>

* Reworked transfer queuing so that each transfer is grouped with it's own queue head
* Fixed max packet size under bandwidth reclamation
* Increased the thread priority of the finisher thread so that USB input devices should be more responsible under load
* Added a comment to clarify the queue concept

The queue management should now be less complex and less error prone.
The max packet size is now set to 64 bytes which is the maximum size allowed. Transfers that caused babble errors before should now work.

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


# 955dc88f 06-Jan-2007 Michael Lotz <mmlr@mlotz.ch>

* Fixed spinlock usage in EHCI and UHCI drivers
* Fixed UHCI to allow for empty transfer buffers
* Extended the check for still linked transfer descriptors when removing a chain

There remain UHCI bugs that will cause transfers outgoing transfers to fail. I'll have to review / rewrite the UHCI driver.

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


# 897382b2 10-Nov-2006 Jérôme Duval <korli@users.berlios.de>

use the actual function to write on PCI_LEGSUP


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19250 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


# 8a278a1b 24-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixing my previous attempt at fixing cookie handling. Device addresses cannot be used, since there may be devices with the same address across different busses. A linked list of usb_driver_cookies is maintained now that relates devices and cookies.
* Fixed endpoint halt clearing. The data toggle has to be reset when we clear a stall.
* Now using up to B_PAGE_SIZE * 4 sized buffers in EHCI. They are split automatically by the host controller. This further pushes throughput.
* Optimize memory allocator settings for the above case. Enlarging it's managed space to 1MB
* Ignore the transaction error bit in EHCI. It is only of informational character as it also idicates errors that were recovered automatically. If an unrecoverable error occures, other bits will indicate this.
* Fixed some more print formats in debug output.

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


# 7145ff17 20-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented compatibility workaround for BeOS to be able to write user memory from the kernel finisher thread

This fixes crashing of the USB Mass Storage driver under R5. It is fully working there now.
I hope to be able to do this more cleanly under Haiku though.

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


# bcc2d1b6 15-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented usable thread synchronisation for UHCI and EHCI.
* Cleaned interrupt handlers for both busses, too.
* Fixed memory leak of the queue head stray descriptors in EHCI.
* Fixed warnings about assigning NULL to the module flags field.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18857 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


# 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


# 2761c5ae 30-Aug-2006 Jérôme Duval <korli@users.berlios.de>

replaced with PCI.h definitions, added PCI_usb_ehci


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


# 458b6f4b 29-Aug-2006 Jérôme Duval <korli@users.berlios.de>

fixed warnings


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18693 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


# 01595708 26-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Changed EHCI register access from port to memory mapped io (which is required)
* Added individual register operations for operational and capability registers
* Added resetting the host controller which appearantly actually works

Note that you shouldn't install the ehci module if you want uhci to work.
It disables the companion host controller drivers (uhci and ohci) because it takes port ownership and does not yet give it back for low and fullspeed devices.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18648 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


# 02ce23a1 24-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Unified and disabled TRACEing for the usb stack and uhci hcd
* Fixed warnings
* Some cleanup
* Added myself as an author to some files

No functional changes.

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


# 1e8c0b36 19-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented iovec based data handling in Transfer and UHCI
* Implemented QueueBulkV of the v3 API that uses it

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


# 5b0ec61f 19-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Added USB API Version 3. It's put into USB3.h while the v2 API resides in USB2.h. USB.h just includes USB2.h for now.
* Rewrote both headers on the way.
* The usb module now exports both, the v2 and v3 module_info.
* Changed the internals of the USB Stack to give out usb_ids instead of opaque handles to internal classes.
* Cleaned up some more of the Stack by moving members into other classes and removing unused stuff.
* Updated the usb_raw driver from v2 to v3 API.

Since both usb_hid (which still uses the v2 API) and usb_raw (which now uses the v3 API) work, I'd call it a success ;-)

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


# bf9d24ed 14-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed memory leak of Transfers never getting deleted (intentionally until now).
* Reduced the Transfer class to a minimum and removed support for synchronous transfers. The only usage of this is in SendRequest(), which now provides a callback and QueueRequest()s it's request instead.
* Clarified semantics of SubmitTransfer(). It returns a status_t indicating wether the transfer was submitted successfully. This includes no information about the outcome. Therefore the UHCI RootHub now reports the status only through the callback and returns B_OK or B_ERROR for SubmitTransfer().
* Added comment to the Transfer class explaining who takes ownership of the Transfer in which cases.

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


# 49617128 14-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed data toggle handling. It must be taken after the transfer finished and from the last transmitted transfer descriptor (which in case of a short packet is not neccessarily the last descriptor of the chain)
* Moved convenience endpoint requests from ControlPipe to Pipe

With this change, bulk transfers are fairly stable now. See here for evidence: http://haiku.mlotz.ch/haiku-usb01.png ;). Those are pictures from my Canon Digital Ixus 750 downloaded with Exposure using the PTP plugin. I of course navigated Haiku with my USB Logitech iFeel mouse which works nice since some days.

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


# d83f3c1a 13-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed setting configurations (need to use the configuration_value instead of the index of course)
* Fixed reported power status of the UHCI Root Hub
* Added preservation of the SOF_MODIFY register when doing a global reset of the UHC
* Read out the actual length for outgoing transfers too
* Made actual length handling for transfers a bit safer and correct in respect to NULL packets
* Use short packet detect to handle short packets
* First step at implementing the hub interrupt

Since the devices are now configured correctly, some bulk transfers actually work. Also my hub now reports its status correctly.

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


# f1020a6c 12-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Changed the Stack lock to a benaphore
* Removed some debug output from UHCI
* Added some debug output to the usb module instead ;)
* Rewrote the way new devices are attached and ports are handled (now more similar to FreeBSD)
* Corrected handling of port resets so that they should work on hubs too
* Cleaned up some headers

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


# b8c6a851 11-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented most of the USB module public API (using opaque handles like in R5 will change that to using IDs later)
* Fixed the UHCI root hub and the hub implementation. Interface and endpoint descriptors are part of the configuration descriptor, they cannot be requested individually.
* Added simple support for interrupt and bulk transfers to UHCI. It's enough to get my USB mouse working to a stable and usable degree.
* Cleaned up and reworked some other parts, added allocation checks and such.

Yes, my internet connection is back up :)

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


# 8ba81a76 23-Jul-2006 Michael Lotz <mmlr@mlotz.ch>

Continuing work on the USB stack and UHCI driver.
* Moved the transfer descriptor management into the UHCI class
* Added locking to the driver and the queues
* Added service thread for finished transfers (to be implemented correctly)
* Cleaned up some headers and added myself as author

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


# d30ac125 29-May-2006 Michael Lotz <mmlr@mlotz.ch>

Respect the transfer direction. Control transfers with buffers work in both directions now.

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


# b7a062b5 29-May-2006 Michael Lotz <mmlr@mlotz.ch>

* Calmed down debug output a bit
* Removed all friends in the USB stack classes (as they are not needed)
* Added max packet size to the pipe and respect it on transfers
* Use pipes with the same speed as the device

Device descriptors can now also be retrieved from full speed devices and devices with a packet size of more than 8 bytes. The devices are also correctly initialized to their default configuration.

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


# 96da8285 28-May-2006 Michael Lotz <mmlr@mlotz.ch>

Applying style to remaining classes. No functional change.

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


# 64312bc9 28-May-2006 Michael Lotz <mmlr@mlotz.ch>

* Moved the transfer descriptor handling to separate functions
* Added debugging facilities
* Implemented the data stage of control messages

The device descriptor can now be successfully retrieved. Now interrupt, bulk and isochronous data transfers need to be implemented.

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


# 11bd72c2 28-May-2006 Michael Lotz <mmlr@mlotz.ch>

* Cleaned up / applied style to the Pipe class
* Introduced a Queue class that manages itself and where transfers are attached to
* Added "set feature" to the roothub and use it to enable the port of new devices

It is now possible to successfully detect new devices and send at least one transfer descriptor to them.

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


# 26f34d1c 27-May-2006 Michael Lotz <mmlr@mlotz.ch>

* Cleaned up / applied style to the BusManager class
* Fixed some copy&paste errors I introduced earlier
* Removed the "one UHCI bus only" limit
* Other fixes

The hub now sees when a new device is connected but failes when getting its descriptor.

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


# 76e69839 27-May-2006 Michael Lotz <mmlr@mlotz.ch>

The framelist was allocated in the object which caused the host controller to fail. Also the root hub is now setup after the host controller is started since new devices are created which use transfers to discover their parameters. The controller should now be correctly initialized and stay up.

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


# 12b05115 27-May-2006 Michael Lotz <mmlr@mlotz.ch>

Picking up work on the USB stack. First of all adapting the style of the UHCI driver. Not yet working any more than until now.

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


# 67c3d9eb 11-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed building of the UHCI and OHCI modules [reported by AndyBe].


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


# 4097611c 26-Sep-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Fixed the bugs I introduced earlier. original code was ok.


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


# 2239adfc 23-Sep-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

properly mask off bits


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


# f6ea6477 19-Aug-2005 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Some major reworking. Re-enable the old way of building up the framelist pointers. MAke some parts more verbose for testing. Fix the stray td to actually something useful.

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


# f42b34dc 15-Jun-2005 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Make sure legacy support is disabled. This helps a lot :-), it keeps stray interrupts from occuring. I'm still not sure it is completely fixed though, the mouse I'm using still works fine even with control taken over. At least it doesn't interrupt anymore

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


# 41fe67f3 06-Apr-2005 Niels Sascha Reedijk <niels.reedijk@gmail.com>

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-15
Fix host controller initialisation issues

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


# 5a072ced 14-Mar-2005 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Quick merge of my development branch with mainline (for SVN switch).
The OHCI stuff was done by Jixt (thanks)./installusb
All is still very much work in progress

Patches applied:

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--base-0
tag of Niels.Reedijk@gmail.com--haiku-2005/usb-busses--mainline--0.1--base-0

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-1
Set the PORT_STATUS_LOW_SPEED flag correctly (using the register bitflag for low speed devices, instead of the proper lowspeed flag)

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-2
Clean up transfers when they're done

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-3


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-4


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-5


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-6


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-7
Remove obsolete ehci.c

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-8


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-9
Completed memory allocation + initialization

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-10
First attempt at performing control transfers - failed miserably

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-11
Trying to read a 16bit value into a 8bit integer, stupid

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-12
nicer way of getting the base io address

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-13
Take over control from BIOS

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-14
Revert change for disabling USB BIOS support


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


# 77a66901 19-Jul-2004 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Summary: Merge in recent changes
Keywords:

Patches applied:

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-12
Update/add license header

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-13
Changes to init routine and memory management

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-14
Move uhci_properties_t into its own header -- cleans up the implementation

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-15
Add a virtual schedule that can be used to hook in all kinds of transfers

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-16
Improve rh handling

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-17
Change module to be subclass of BusManager

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-18
Reimplemented the uhci root hub

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-19
merge with mainline


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


# 064018fbf1bb775428099586e560334d94c44733 31-Aug-2014 Michael Lotz <mmlr@mlotz.ch>

UHCI: Reject request debug transfers on control pipes.

Requests aren't handled in the debug transfer code path and would
end up in wrongly constructed descriptor chains.


# 159aa93b31cb5d926ef4939a16419e7d02979b1c 31-Aug-2014 Michael Lotz <mmlr@mlotz.ch>

USB: Generalize logic for debug transfers used within KDL.

Pull debug transfer methods into the base BusManager class and
implement them for UHCI and EHCI. This makes it possible to have a
single debugger command installed by the USB stack instead of HCI
specific ones.


# ec17ebde0827b186c598200afd679e6dad486e7e 20-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

UHCI: Enable short packet detection for all transfers.

As suggested by akshay, there is no reason to do this only for control
transfers. All input transfers can have short packets and we want to
detect those and trigger the "end of transfer" code when a short packet
happens.

Fixes #11087.


# 15777340b1cb60837624883921a24b3ab5701d7c 07-Jun-2014 Akshay Jaggi <akshay1994.leo@gmail.com>

Fix UHCI Short Packet Transfers


# a17e9da139e1c52635143c4adcda172513d28c19 09-Aug-2013 Jerome Duval <jerome.duval@gmail.com>

XHCI/UHCI USB: forgot to get the x86 PCI module.


# c45ac5ad59cf7fea1595e471f46e8e5400e69cec 30-Jul-2013 Jerome Duval <jerome.duval@gmail.com>

UHCI USB: add MSI support

* similar to OHCI support by mmlr.
* interrupt handler is removed on destruction.


# 2997a1912589c1b6c3276eaa4ab797040cd69230 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed UHCI for x86_64.


# eb5f36397841abfc740031fde56ca5e4dee9fdd3 12-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Fixes some occurrences of 'variable set but not used', disables Werror for problematic items.


# 653ce5db53af26a3cc568b2b5ab7749f1e18534f 25-Nov-2011 Michael Lotz <mmlr@mlotz.ch>

Initialize the isochronous lock earlier.

The constructor may abort at various places and the destructor cleans up
everything already initialized. The mutex was however not initialized
early on, leading to #8153 where the mutex was destroied in the error
case, accessing uninitialized memory. Fixes #8153 though the reason for
the aborted constructor probably needs to be investigated as well.


# 8bcc50c336108e882e215c8c5cec57155464edf4 12-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added arch_debug_blue_screen_try_getchar() and arch_debug_serial_try_getchar()
which don't wait for a character, but return -1 when no character is
available ATM. Implemented correctly for x86 only.
* Changed the semantics of the debugger_module_info::debugger_getchar() hook.
It is supposed to return immediately now.
* Adjusted usb_keyboard accordingly. Hacked UHCI's debug_process_transfer() to
achieve that. It does now start, check, or cancel a transfer. Split
UHCI::ProcessDebugTransfer() into StartDebugTransfer(), and
CheckDebugTransfer() accordingly, and also added a CancelDebugTransfer().
The latter seems to have issues. Michael, please have a look. I have no clue
what I'm doing. :-)
* Adjusted kgetc() to poll all possible inputs using the new
functions/semantics. This allows to use any input (USB, PS/2, serial) in KDL.
* Removed the no longer needed "serial_input" command.
* read_line(): Also support 0x7f as backspace code. That's what xterm sends.


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


# e5937bd21c8cd7d5d8251bec623f499bd9d799f6 27-Apr-2011 Jérôme Duval <korli@users.berlios.de>

* fixed typo
* when removing a transfer, if this was the only one in the list, we set fLastIsochronousTransfer to NULL.


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


# c1b432af8eda580825d8fcaa9de962ece28b03f0 25-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix build with tracing enabled.


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


# 1393394ba6adde434020a48e5d9b7b22822150b0 22-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

We need to guarantee that when cancel returns that the callback won't be called
anymore. It could happen that the transfer was already in the process of being
finished, so wasn't in the list of pending transfers anymore. Cancel would then
return even though the callback wasn't called yet. This could lead to a callback
being called after a driver was already unloaded (even after it cleaned up the
pipes it used).


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


# 527e6eefef6ac11ed9047845d4890c75947de892 11-May-2009 Michael Lotz <mmlr@mlotz.ch>

Do not free the descriptor chains and transfer queue head directly when
finishing transfers. The host controller might still be using some of those
structures. In the (unlikely) case that a freed memory chunk would be
immediately re-used and filled with new values this would lead the controller
to either find invalid values and assert a process error or it could follow
invalid list links leading to host system errors. We have to wait with freeing
until the controller processing the next frame to make sure this cannot happen.
The unlikely case should also have been the cause of bug #2481.


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


# 9bc8951dc9b5a74d90e009ecf6946f4908cb3ad5 11-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Simplify the way fragmented transfers are resubmited.
* This also paves the way for a different way to handle transfer freeing.
* Also fixes that errors in reappending would previously not be propagated to
the caller.


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


# aa3ca9ed307e8ad2f4998c2d274d0ab4b9afa0df 11-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Move the actual and maximum length calculation into two inline functions.
* Use those to make sure the size is retrieved correctly in all cases (which
it wasn't in the short packet tests).
* Don't detect short packets for control transfers as we need the status packet
to finish the transfer and cannot quit earlier.
* Only check for short packets when we also have the short packet flag set.


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


# 5c3441b4a2439fea55b9c5514f4787f827d0ec6f 02-May-2009 Michael Lotz <mmlr@mlotz.ch>

We are generally interested in those error bits so print them always.


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


# eb01fb72f6d90bf6a083941ace087bdd6803a516 08-Apr-2009 Michael Lotz <mmlr@mlotz.ch>

* Add the kernel debugger extensions only for the haiku target.
* Acknowledge non-enabled interrupts in UHCI as done in EHCI as well.


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


# 6eba063647cc4ff5aa863e1b5dc5093c22a3acb0 22-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Added simplified possibility to schedule UHCI transfers from within KDL.
* Added debugger commands to resolve usb_ids to pipes.
* Adjusted the physical memory allocator to be usable in a slimmed down mode
when running inside the kernel debugger.
* Implemented USB keyboard support for KDL through a kernel debugger add-on.
* Added kgetc() and made use of it where previously individual methods were used
to ensure that reading characters always goes through the kernel debugger
add-ons and the other methods.

This has some preconditions to meet though:
1) The keyboard must be in the boot protocol (currently the case but needs to
be revisited once we have a full usb_hid).
2) The keyboard must be attached to a UHCI root port (i.e. not use EHCI or OHCI,
also not through hubs unless those are USB 1.1).
3) the usb_hid driver has to be opened for this to work. This means that for the
time between initializing USB and when usb_hid is opened by the input_server
there is no keyboard support.

Also note that this has no way of detecting hot-plug, meaning that you can't
re-attach your USB keyboard from the hub to the root port once in KDL.

On the bright side of things, since this is a non-destructive mechanism it is
possible to enter and leave KDL without loosing the USB state.

Tested OK in QEMU, not tested on real hardware yet, will see in a few minutes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29291 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


# 2fc7e292e5c277938b10d50f99e8fd531fe2e8ed 19-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

When calculating the actual length for requests, we don't want to include the
8 byte request header. It was included in the case of outgoing request
transfers before. In fact we always just want the length of the data phase,
which for non-requests just happens to be the whole transfer.

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


# 4ca876701dbe6b2676f81902186fabe67b8ad956 08-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

When canceling transfers, do not call the callbacks with the lock held. This
prevents deadlocks in cases where a new transfer is scheduled from within the
cancel callback. This is an edge case, as generally you don't want to schedule
anything when explicitly canceling transfers, but there are a valid use cases
when you cancel because of a timeout and then have to reset the device for
example. Note that this hides bug #2353, where the cancel case is probably
not handled correctly.

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


# b1385bc32d5b482f08e960629194af418b1aa882 06-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* When encountering an unrecoverable error at least turn off interrupts until
we properly handle this case (cancel everything and reset the controller) to
avoid flooding the system with interrupts.
* Also only check for enabled interrupts to not steal potentially shared
interrupts.

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


# 1c8de8581b66c14ea94bccd7ddcea99291955796 01-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added optional spinlock contention measurement feature. Enabled when
B_DEBUG_SPINLOCK_CONTENTION is defined to 1. It typedefs spinlock to a
structure (thus breaking BeOS binary compatibility), containing a
counter which is incremented whenever a thread has to wait for the
spinlock.
* Added macros for spinlock initialization and access and changed
code using spinlocks accordingly. This breaks compilation for BeOS --
the macros should be defined in the respective compatibility wrappers.
* Added generic syscall to get the spinlock counters for the thread and
the team spinlocks.


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


# 2b07b8e0f1a7f1e76f31db24a21a42cbb01d7b9c 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Replaced all instances of benaphores in the kernel code by mutexes.
* Removed kernel benaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25690 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


# f3283bfa83c385bf47492439a2ba5985ec24a1bb 16-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

* Increase the amount of tries in the EHCI BIOS handover so it lasts for up to
1 second instead of half a second. Might help with slow BIOSes.
* Disable EHCI interrupts if the BIOS handover fails so that we do not flood
the system with interrupts if the BIOS later on decides to still comply with
our handover request.
* Add an unconditional success message to EHCI and UHCI to better see if
controllers are present/initialized correctly at all.

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


# 656af4e869b784d6784ac33a7336c254c6fa94aa 12-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

* Initialize all of the fields in the UHCI class so in case of an error in the
constructor the object can be safely deleted (as documented for bug #1473)
* Some simplifications by caching the Pipe object for a transfer
* Minor cleanup

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


# 8ff902d0bdbca23a39e31ec8b3810e9a10dd05ad 09-Apr-2008 François Revol <revol@free.fr>

Fix building usb busses with tracing on.


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


# 8024db25a8b9a380d73fd0198f4203f514f4b5dd 06-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

Change just host_controller_info to usb_host_controller_info for the sake of
clearity as suggested by Philippe Houdoin once and brought to my attention by
Slavatore. As this definition is completely private to the USB stack it would
not have caused any conflicts though.

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


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

When initializing a UHCI controller, ensure that the interrupts are disabled
before routing them from the BIOS. Also clear pending SMIs when disabling
legacy support. Might help with some legacy support issues and probably
introduces others instead...

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


# 2b5d39e85946c3f9f0a4452332675b5cd680f794 23-Jan-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Added force paramater to CancelQueuedIsochronousTransfers along with a TODO
* Replaced space with tab


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


# f39094517448d5c25117cf9ff1f542ddda7da83d 24-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

Forgot to commit the same change in UHCI:
Notify the finisher thread after canceling transfers. It was possible that freeing the allocated
transfer resources would be delayed unnecessarily until some other transfer completed and woke up
the finisher thread. Found by Salvatore Benedetto, thanks!

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


# 5b6cdc4c7b36a945c960f2808a47579b5ddf0593 22-Jan-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* fixed memory leak: if InitKernelAccess failed data was not deleted



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


# 187574cf691a28c022868e1533d5540937dc9556 23-Nov-2007 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Small clean up


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


# 13508e8bd034aac27c2e3271aefa04e255520d99 14-Nov-2007 Michael Lotz <mmlr@mlotz.ch>

Completely redesign the USB explore process. Replaces the scary race conditions of the previous locking mechanism and simplifies handling of device changes by a more centralized approach.
Changes are now collected during explore and notifications as well as rescans are done at once. Through this a driver is also not rescanned multiple times anymore.

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


# ee21f1bcb75f8d0d629a7fd56b0007256d726724 13-Oct-2007 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Fix some bugs introduced by myself ;)
* Removed IOC bit on last TD. To find out whether the TD removed is the
last one of a transfer it simply iterate through every transfer submitted. Not the best
solution, but should be ok for now. Improvements will be made when there will be some driver to test it with.
* Clean up


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


# 16298429e5bdf3b579c0e6fcdeee34867a6e474b 10-Aug-2007 Michael Lotz <mmlr@mlotz.ch>

Change the way UHCI does things. Restructured processing of transfers in the finisher thread:
* Transfer removal is now done only from the finisher
* Processing is only done after the transfer has been removed from the list
* Canceling transfers only sets a flag so the finisher can remove the transfer
* The callback at cancel is done synchronously though

This fixes quite a few race conditions where transfers were processed while they where already removed. It could happen before that callbacks would have been called twice or freed descriptors/callback buffers were accessed.

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


# 7ca97e354826f2569efddb8100b32d8f61db9c59 17-Jul-2007 Michael Lotz <mmlr@mlotz.ch>

Patches by Salvatore Benedetto to fix changes made by me and also the underlaying problem that caused high CPU usage in the isochronous finisher thread. Also includes patches to support isochronous support through USBKit / usb_raw. Thanks!

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


# 8374316088346710d725daf766ecdf76da3767f1 27-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Actually initialize the list of first and last isochronous transfers.

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


# 2172794336d98f822ede847be20b7f6c5664fe2d 27-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Fixing bug #1284.

* Rearranged isochronous finishing to happen from within the finisher thread
* Removed the separate isochronous finishing thread

Since the finisher thread blocks when no transfers are complete this should bring down CPU load.

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


# ac9d119566e5c19de0279483c4847996b2f1a879 25-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Commiting patch by Salvatore Benedetto. This adds isochronous handling to the USB bus manager and enables inbound isochronous support in the UHCI driver. Thanks!

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


# f6bdd7b4a90e593d260c84b449643030b52417da 27-May-2007 François Revol <revol@free.fr>

Patch by Salvatore Benedetto:
Code readability; portability fixes.
Added unimplemented SubmitIsochronous().


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


# 34cbbba798a50322040ad88254293063d5117fe5 07-May-2007 Michael Lotz <mmlr@mlotz.ch>

* Reworked userland buffer access functionality into two functions in the Transfer class to not duplicate code in each HCD
* Use these functions in UHCI and EHCI which greatly reduces overhead on fragmented transfers as the vector conversion and area cloning is only done once
* Use the PrepareKernelAccess() function before submitting fragments which fixes the crash when trying to access the next fragments buffer in user memory from the kernel thread

This should fix bug #1167 which could be encountered when sending data to a mass storage device with an application that uses a large enough transfer buffer size.

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


# 40fd2328176d31eda2e778f189ef94eb41163f1c 07-May-2007 Jérôme Duval <korli@users.berlios.de>

implemented CancelQueuedTransfers for uhci


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


# 3ad50dab2ecad0e4ec61c1b0d5f4134f04443605 25-Mar-2007 Michael Lotz <mmlr@mlotz.ch>

Fixed design flaw in the UHCI fragment implementation and a memory leak both introduced in the last commit.

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


# 145461d547a8e5e1be7ad8b31cc974caf893b884 25-Mar-2007 Michael Lotz <mmlr@mlotz.ch>

Implemented fragmented USB transfers. The transfer length will max out at a certain point to not overflow the allocator. The fragmented transfers are resubmitted until all fragments are sent / received.

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


# a3dfc2743ad6a03132a77cad7e44db983b4661b9 18-Jan-2007 Michael Lotz <mmlr@mlotz.ch>

* Implemented clearing port enabled change
* Fixed build with debug output turned on
* Cleaned up the uhci_hardware header a bit

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


# 9c8cdfd89ea9681cb5fbf163f5d833028cd09caa 07-Jan-2007 Michael Lotz <mmlr@mlotz.ch>

* Reworked transfer queuing so that each transfer is grouped with it's own queue head
* Fixed max packet size under bandwidth reclamation
* Increased the thread priority of the finisher thread so that USB input devices should be more responsible under load
* Added a comment to clarify the queue concept

The queue management should now be less complex and less error prone.
The max packet size is now set to 64 bytes which is the maximum size allowed. Transfers that caused babble errors before should now work.

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


# 955dc88f0c0225985a695689d675e0c119a1bdc4 06-Jan-2007 Michael Lotz <mmlr@mlotz.ch>

* Fixed spinlock usage in EHCI and UHCI drivers
* Fixed UHCI to allow for empty transfer buffers
* Extended the check for still linked transfer descriptors when removing a chain

There remain UHCI bugs that will cause transfers outgoing transfers to fail. I'll have to review / rewrite the UHCI driver.

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


# 897382b2e041462be179a55e25e9c2306be3eaed 10-Nov-2006 Jérôme Duval <korli@users.berlios.de>

use the actual function to write on PCI_LEGSUP


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19250 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


# 8a278a1bb7c57c701210c7ded6b5b8dca82e293f 24-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixing my previous attempt at fixing cookie handling. Device addresses cannot be used, since there may be devices with the same address across different busses. A linked list of usb_driver_cookies is maintained now that relates devices and cookies.
* Fixed endpoint halt clearing. The data toggle has to be reset when we clear a stall.
* Now using up to B_PAGE_SIZE * 4 sized buffers in EHCI. They are split automatically by the host controller. This further pushes throughput.
* Optimize memory allocator settings for the above case. Enlarging it's managed space to 1MB
* Ignore the transaction error bit in EHCI. It is only of informational character as it also idicates errors that were recovered automatically. If an unrecoverable error occures, other bits will indicate this.
* Fixed some more print formats in debug output.

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


# 7145ff1705037d7310ea0d608484279c1dabfa64 20-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented compatibility workaround for BeOS to be able to write user memory from the kernel finisher thread

This fixes crashing of the USB Mass Storage driver under R5. It is fully working there now.
I hope to be able to do this more cleanly under Haiku though.

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


# bcc2d1b69a3c9b2a7951b894ad3e5579dcbaffa1 15-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented usable thread synchronisation for UHCI and EHCI.
* Cleaned interrupt handlers for both busses, too.
* Fixed memory leak of the queue head stray descriptors in EHCI.
* Fixed warnings about assigning NULL to the module flags field.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18857 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


# 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


# 2761c5ae558dccbeb2f9f088ca1011824c823612 30-Aug-2006 Jérôme Duval <korli@users.berlios.de>

replaced with PCI.h definitions, added PCI_usb_ehci


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


# 458b6f4b9019c0fe051acd386b3fce0bc712212c 29-Aug-2006 Jérôme Duval <korli@users.berlios.de>

fixed warnings


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18693 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


# 01595708f3ff37e1c86f32548fc48a7a6a5d4be7 26-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Changed EHCI register access from port to memory mapped io (which is required)
* Added individual register operations for operational and capability registers
* Added resetting the host controller which appearantly actually works

Note that you shouldn't install the ehci module if you want uhci to work.
It disables the companion host controller drivers (uhci and ohci) because it takes port ownership and does not yet give it back for low and fullspeed devices.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18648 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


# 02ce23a1adaf30f7d8a63fd953bb5314ea560d55 24-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Unified and disabled TRACEing for the usb stack and uhci hcd
* Fixed warnings
* Some cleanup
* Added myself as an author to some files

No functional changes.

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


# 1e8c0b3649ff4915369402f2e005b486ef6e7dfb 19-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented iovec based data handling in Transfer and UHCI
* Implemented QueueBulkV of the v3 API that uses it

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


# 5b0ec61f972bca106675a66c37354e38efb8016d 19-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Added USB API Version 3. It's put into USB3.h while the v2 API resides in USB2.h. USB.h just includes USB2.h for now.
* Rewrote both headers on the way.
* The usb module now exports both, the v2 and v3 module_info.
* Changed the internals of the USB Stack to give out usb_ids instead of opaque handles to internal classes.
* Cleaned up some more of the Stack by moving members into other classes and removing unused stuff.
* Updated the usb_raw driver from v2 to v3 API.

Since both usb_hid (which still uses the v2 API) and usb_raw (which now uses the v3 API) work, I'd call it a success ;-)

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


# bf9d24edd2bbbb8a0341da366180909a32b5b57f 14-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed memory leak of Transfers never getting deleted (intentionally until now).
* Reduced the Transfer class to a minimum and removed support for synchronous transfers. The only usage of this is in SendRequest(), which now provides a callback and QueueRequest()s it's request instead.
* Clarified semantics of SubmitTransfer(). It returns a status_t indicating wether the transfer was submitted successfully. This includes no information about the outcome. Therefore the UHCI RootHub now reports the status only through the callback and returns B_OK or B_ERROR for SubmitTransfer().
* Added comment to the Transfer class explaining who takes ownership of the Transfer in which cases.

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


# 49617128ca4b55143325c5f7b8358e0307ad047d 14-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed data toggle handling. It must be taken after the transfer finished and from the last transmitted transfer descriptor (which in case of a short packet is not neccessarily the last descriptor of the chain)
* Moved convenience endpoint requests from ControlPipe to Pipe

With this change, bulk transfers are fairly stable now. See here for evidence: http://haiku.mlotz.ch/haiku-usb01.png ;). Those are pictures from my Canon Digital Ixus 750 downloaded with Exposure using the PTP plugin. I of course navigated Haiku with my USB Logitech iFeel mouse which works nice since some days.

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


# d83f3c1a45d231f5ec4e3c1127d5f44a9b54fb00 13-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed setting configurations (need to use the configuration_value instead of the index of course)
* Fixed reported power status of the UHCI Root Hub
* Added preservation of the SOF_MODIFY register when doing a global reset of the UHC
* Read out the actual length for outgoing transfers too
* Made actual length handling for transfers a bit safer and correct in respect to NULL packets
* Use short packet detect to handle short packets
* First step at implementing the hub interrupt

Since the devices are now configured correctly, some bulk transfers actually work. Also my hub now reports its status correctly.

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


# f1020a6c4914d769f910ae85158a8fb9c9c060f7 12-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Changed the Stack lock to a benaphore
* Removed some debug output from UHCI
* Added some debug output to the usb module instead ;)
* Rewrote the way new devices are attached and ports are handled (now more similar to FreeBSD)
* Corrected handling of port resets so that they should work on hubs too
* Cleaned up some headers

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


# b8c6a85136cd56e8cf3282ca69b0d2d2832a3eee 11-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Implemented most of the USB module public API (using opaque handles like in R5 will change that to using IDs later)
* Fixed the UHCI root hub and the hub implementation. Interface and endpoint descriptors are part of the configuration descriptor, they cannot be requested individually.
* Added simple support for interrupt and bulk transfers to UHCI. It's enough to get my USB mouse working to a stable and usable degree.
* Cleaned up and reworked some other parts, added allocation checks and such.

Yes, my internet connection is back up :)

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


# 8ba81a767e9e8cd36ddd627853ae12bcf1c6b71c 23-Jul-2006 Michael Lotz <mmlr@mlotz.ch>

Continuing work on the USB stack and UHCI driver.
* Moved the transfer descriptor management into the UHCI class
* Added locking to the driver and the queues
* Added service thread for finished transfers (to be implemented correctly)
* Cleaned up some headers and added myself as author

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


# d30ac125dd6dc5d512f9bac50b37493b4e15031a 29-May-2006 Michael Lotz <mmlr@mlotz.ch>

Respect the transfer direction. Control transfers with buffers work in both directions now.

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


# b7a062b5add9426990a2656b9b0846618ee4ae90 29-May-2006 Michael Lotz <mmlr@mlotz.ch>

* Calmed down debug output a bit
* Removed all friends in the USB stack classes (as they are not needed)
* Added max packet size to the pipe and respect it on transfers
* Use pipes with the same speed as the device

Device descriptors can now also be retrieved from full speed devices and devices with a packet size of more than 8 bytes. The devices are also correctly initialized to their default configuration.

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


# 96da8285b0b36b7499e334e9ecc3da22e8e9b599 28-May-2006 Michael Lotz <mmlr@mlotz.ch>

Applying style to remaining classes. No functional change.

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


# 64312bc94c57de0bf7e32d5ac78d252c5c853912 28-May-2006 Michael Lotz <mmlr@mlotz.ch>

* Moved the transfer descriptor handling to separate functions
* Added debugging facilities
* Implemented the data stage of control messages

The device descriptor can now be successfully retrieved. Now interrupt, bulk and isochronous data transfers need to be implemented.

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


# 11bd72c28c1b7c5756f28353739c6817303bc736 28-May-2006 Michael Lotz <mmlr@mlotz.ch>

* Cleaned up / applied style to the Pipe class
* Introduced a Queue class that manages itself and where transfers are attached to
* Added "set feature" to the roothub and use it to enable the port of new devices

It is now possible to successfully detect new devices and send at least one transfer descriptor to them.

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


# 26f34d1c060c40ce975424e164274177c8f7b4c6 27-May-2006 Michael Lotz <mmlr@mlotz.ch>

* Cleaned up / applied style to the BusManager class
* Fixed some copy&paste errors I introduced earlier
* Removed the "one UHCI bus only" limit
* Other fixes

The hub now sees when a new device is connected but failes when getting its descriptor.

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


# 76e69839f76c48846006908179cc0191d4e8b10c 27-May-2006 Michael Lotz <mmlr@mlotz.ch>

The framelist was allocated in the object which caused the host controller to fail. Also the root hub is now setup after the host controller is started since new devices are created which use transfers to discover their parameters. The controller should now be correctly initialized and stay up.

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


# 12b05115348a8efc0d8dcf4332dcd38f4eefe5fd 27-May-2006 Michael Lotz <mmlr@mlotz.ch>

Picking up work on the USB stack. First of all adapting the style of the UHCI driver. Not yet working any more than until now.

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


# 67c3d9ebe54b5344d58f06011314440f214528bd 11-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed building of the UHCI and OHCI modules [reported by AndyBe].


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


# 4097611c9fff4cf60e79caf2c1d531f3a383828e 26-Sep-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Fixed the bugs I introduced earlier. original code was ok.


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


# 2239adfca3281c130810330b56527cfe18b7afbb 23-Sep-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

properly mask off bits


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


# f6ea6477c06eb772e8ebe69be1f18d7fd1c913e2 19-Aug-2005 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Some major reworking. Re-enable the old way of building up the framelist pointers. MAke some parts more verbose for testing. Fix the stray td to actually something useful.

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


# f42b34dc602ad3c6511d644dab716e6aa1dca4c1 15-Jun-2005 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Make sure legacy support is disabled. This helps a lot :-), it keeps stray interrupts from occuring. I'm still not sure it is completely fixed though, the mouse I'm using still works fine even with control taken over. At least it doesn't interrupt anymore

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


# 41fe67f32c12943bc20af82c0f05da28f5f44704 06-Apr-2005 Niels Sascha Reedijk <niels.reedijk@gmail.com>

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-15
Fix host controller initialisation issues

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


# 5a072ced7588fd5525ca52d9ce1d45a2d0786b2d 14-Mar-2005 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Quick merge of my development branch with mainline (for SVN switch).
The OHCI stuff was done by Jixt (thanks)./installusb
All is still very much work in progress

Patches applied:

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--base-0
tag of Niels.Reedijk@gmail.com--haiku-2005/usb-busses--mainline--0.1--base-0

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-1
Set the PORT_STATUS_LOW_SPEED flag correctly (using the register bitflag for low speed devices, instead of the proper lowspeed flag)

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-2
Clean up transfers when they're done

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-3


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-4


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-5


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-6


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-7
Remove obsolete ehci.c

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-8


* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-9
Completed memory allocation + initialization

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-10
First attempt at performing control transfers - failed miserably

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-11
Trying to read a 16bit value into a 8bit integer, stupid

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-12
nicer way of getting the base io address

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-13
Take over control from BIOS

* Niels.Reedijk@gmail.com--nielx-2005/usb-busses--development--0.1--patch-14
Revert change for disabling USB BIOS support


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


# 77a66901a8fdf18feb5082a33a6bcd6e1d382a36 19-Jul-2004 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Summary: Merge in recent changes
Keywords:

Patches applied:

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-12
Update/add license header

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-13
Changes to init routine and memory management

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-14
Move uhci_properties_t into its own header -- cleans up the implementation

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-15
Add a virtual schedule that can be used to hook in all kinds of transfers

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-16
Improve rh handling

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-17
Change module to be subclass of BusManager

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-18
Reimplemented the uhci root hub

* n.reedijk@planet.nl--nielx-2003/usb-busses--development--0.1--patch-19
merge with mainline


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