#
4269b561 |
| 10-Aug-2014 |
mpi <mpi@openbsd.org> |
Since USB xfer pools are accessed in interrupt context, initialize them with the correct ipl to prevent your CPU from locking against itself.
|
#
79234da1 |
| 10-Aug-2014 |
mpi <mpi@openbsd.org> |
Set and check for XFER_BUSY in the common methods instead of doing it in every HC driver.
|
#
52b6d773 |
| 05-Aug-2014 |
mpi <mpi@openbsd.org> |
Only check if the abort transfer is the interrupt one if the pipe is opened with a callback.
If a driver opens an interrupt pipe without callback function, like umct(4) does with one of its bulk in
Only check if the abort transfer is the interrupt one if the pipe is opened with a callback.
If a driver opens an interrupt pipe without callback function, like umct(4) does with one of its bulk in endpoints being reported as an interrupt endpoint, then we can end up aborting a transfer which is different from the interrupt one.
Issue reported by Roberto E. Vargas Caballero, ok deraadt@
show more ...
|
#
a1fd802c |
| 12-Jul-2014 |
mpi <mpi@openbsd.org> |
Protect the freelists of transfer descriptors with the appropriate spl so that we do not end up allocating two times new descriptors.
This happens if a thread finds an empty list, start allocating,
Protect the freelists of transfer descriptors with the appropriate spl so that we do not end up allocating two times new descriptors.
This happens if a thread finds an empty list, start allocating, got interrupted and the interrupt also finds an empty list.
Fix an issue reported by Nils Frohberg.
ok yuo@, pirofti@
show more ...
|
#
df2ac69f |
| 12-Jul-2014 |
tedu <tedu@openbsd.org> |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
#
542f7818 |
| 10-Jul-2014 |
mpi <mpi@openbsd.org> |
Do not set the bus dying flag during DVACT_DEACTIVATE otherwise the explore thread will not disconnect the root hub. The flag will be set before detaching the children, like it is done during a susp
Do not set the bus dying flag during DVACT_DEACTIVATE otherwise the explore thread will not disconnect the root hub. The flag will be set before detaching the children, like it is done during a suspend- resume cycle.
Fix a panic when unplugging a cardbus *hci(4).
show more ...
|
#
890c91c7 |
| 09-Jul-2014 |
mpi <mpi@openbsd.org> |
Adds an optional bus function to set the address of a new device and explicitly set it when required.
Right now xhci(4) does not need such function because it assigns addresses when the first pipe o
Adds an optional bus function to set the address of a new device and explicitly set it when required.
Right now xhci(4) does not need such function because it assigns addresses when the first pipe of a device is opened.
ok yuo@, pirofti@
show more ...
|
#
b8ec0a52 |
| 04-Jun-2014 |
mpi <mpi@openbsd.org> |
Clearing the data toggle bit only makes sense for endpoints that use it, since this function is optional get rid of the no-op ones.
ok ratchov@
|
#
927b026b |
| 04-Jun-2014 |
mpi <mpi@openbsd.org> |
Use C99 initializers for pipe and bus methods.
Apart from improving readability, this will help us reduce the number of no-op functions now that some of them are optional.
ok ratchov@
|
#
542b261b |
| 30-May-2014 |
mpi <mpi@openbsd.org> |
Remove unused fields from the pipes.
|
#
e048fa87 |
| 25-May-2014 |
mpi <mpi@openbsd.org> |
The default case in uhci_deactivate() was missing. Because of that, DVACT_QUIESCE was not passed to usb(4) and a new uhub(4) device was reattached at every resume.
Problem reported by mlarkin@
|
#
75ee33bd |
| 19-May-2014 |
jsg <jsg@openbsd.org> |
unbreak the build when DIAGNOSTIC is not defined allows ramdisk kernels to build again
|
#
ca68072a |
| 18-May-2014 |
mpi <mpi@openbsd.org> |
Do not pass an xfer pointer to the timeout routine checking for root hub status changes because it might be freed when detaching the root uhub(4).
Also do not reschedule a timeout if the pipe is bei
Do not pass an xfer pointer to the timeout routine checking for root hub status changes because it might be freed when detaching the root uhub(4).
Also do not reschedule a timeout if the pipe is being aborted.
Finally do not add more code to retrieve the 'bInterval' value of the root hub endpoint descriptor since this value is hardcoded in the uhci(4) driver.
show more ...
|
#
eba0cedf |
| 16-May-2014 |
mpi <mpi@openbsd.org> |
Reduce the difference between HC drivers by always passing a generic usbd_xfer pointer to the routines processing finished transfers to make it crystal clear that the timeout and abort logic is the s
Reduce the difference between HC drivers by always passing a generic usbd_xfer pointer to the routines processing finished transfers to make it crystal clear that the timeout and abort logic is the same everywhere.
show more ...
|
#
44fe0a2d |
| 16-May-2014 |
mpi <mpi@openbsd.org> |
There is no need to remember which usb(4) device is the child of an USB host controller because autoconf(9) already does it.
|
#
09eaccf5 |
| 09-May-2014 |
mpi <mpi@openbsd.org> |
Plug an xfer leak when detaching root hubs.
This leak is similar to the public xfer leak #1 that was affecting device interrupt pipes except that root hubs are rarely detached.
Note that this xfer
Plug an xfer leak when detaching root hubs.
This leak is similar to the public xfer leak #1 that was affecting device interrupt pipes except that root hubs are rarely detached.
Note that this xfer is never associated to any TD and is just used to indicate that some of the HC ports has changed status, so there is no need to flag it as "done" before completing it.
show more ...
|
#
5cc5f799 |
| 08-May-2014 |
mpi <mpi@openbsd.org> |
Plug one more xfer leak.
Now that aborting interrupt pipes does not prevent us from freeing the associated xfer, make sure to flag this xfer as "done" even if there's no need to abort it in hardware.
|
#
880918e8 |
| 04-May-2014 |
mpi <mpi@openbsd.org> |
Make use of usbd_xfer_isread() instead of rerolling it everywhere.
This has the side effect of simplifying and reducing the differences between the various *hci_alloc_*_chain() functions since they
Make use of usbd_xfer_isread() instead of rerolling it everywhere.
This has the side effect of simplifying and reducing the differences between the various *hci_alloc_*_chain() functions since they are the principal place where we want to known if the transfer is a read or a write.
show more ...
|
#
5dacfd1d |
| 29-Apr-2014 |
mpi <mpi@openbsd.org> |
Get rid of the per-softc freelist of transfer descriptors and use a per-driver pool(9) instead.
|
#
12ec0f46 |
| 29-Apr-2014 |
mpi <mpi@openbsd.org> |
Finally plug the public xfer leak #1 in our USB stack.
Every call to usbd_abort_pipe() on an interrupt pipe would simply reset the intrxfer pointer, which would prevent usbd_close_pipe() to free it.
Finally plug the public xfer leak #1 in our USB stack.
Every call to usbd_abort_pipe() on an interrupt pipe would simply reset the intrxfer pointer, which would prevent usbd_close_pipe() to free it. Since we abort pipes in a lot of situations: when a device is detached, when a USB-to-serial adapter is closed, when an error occurs, when the machine is suspended, etc, this would result in hundreds of leaked xfers in most of my machines.
xhci(4) is not affected, but you can't enable it right now since the stack is not ready :)
While here put a KASSERT() to make sure drivers are only calling the interrupt abort method for intrxfer, if that's not the case, please let met know.
show more ...
|
#
c314b820 |
| 27-Apr-2014 |
mpi <mpi@openbsd.org> |
Start de-obfuscating the HC drivers.
Since pipe methods have an xfer argument, always use it to get acces to various data structure (pipe, bus, device) instead of having a different way to get a poi
Start de-obfuscating the HC drivers.
Since pipe methods have an xfer argument, always use it to get acces to various data structure (pipe, bus, device) instead of having a different way to get a pointer to these descriptors in every function.
Also kill the {E,U}XFER() macro and use a consistent name accross all the methods for {e,u}hci_xfer.
show more ...
|
#
7eb220a6 |
| 25-Mar-2014 |
mpi <mpi@openbsd.org> |
Instead of matching root hubs with a custom address, that only works because USB_START_ADDR is defined to 0 and the softc is M_ZERO'd, assume that root hubs are the only devices with a depth of 0.
R
Instead of matching root hubs with a custom address, that only works because USB_START_ADDR is defined to 0 and the softc is M_ZERO'd, assume that root hubs are the only devices with a depth of 0.
Root hubs can now happily be detached and reattached.
show more ...
|
#
89c4e332 |
| 15-Mar-2014 |
mpi <mpi@openbsd.org> |
Unify the *hci_timeout() functions, there should be no functional change.
|
#
d66649df |
| 11-Mar-2014 |
mpi <mpi@openbsd.org> |
Kill dead links.
|
#
d31fade7 |
| 07-Mar-2014 |
mpi <mpi@openbsd.org> |
Transfer descriptors already have a back pointer to the USB device descriptor they are linked to, so no need to dereference their pipe pointer. Simplify a lot of affectations, no functional change.
Transfer descriptors already have a back pointer to the USB device descriptor they are linked to, so no need to dereference their pipe pointer. Simplify a lot of affectations, no functional change.
ok pirofti@
show more ...
|