| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gathered from usb devices.
Cache them early in usbd_new_device() instead of querying the device
several times (the content wont change anyway) and uselessly generating
usb traffic (which could conflict with other access..)
The heuristic stays the same, first look in the device descriptor, then
try to match against usb_known_vendors/usb_known_products, then fallback
to use the idVendor/idProduct codes.
Remove the now useless 'usedev' parameter from usbd_fill_deviceinfo().
Tested from bsd & bsd.rd.
suggested by and ok mpi@
|
| |
|
|
|
|
| |
USB is the last real user of IPL_SOFTNET.
|
|
|
|
|
|
| |
way.
ok natano@
|
| |
|
|
|
|
|
|
|
| |
in the report functions instead of letting the stack do it magically for
us.
Reviewed and tested by David Higgs, thanks!
|
|
|
|
|
|
|
| |
with some tweaks.
Nothing use it for the moment, but upcoming upd(4) improvements need
it.
|
|
|
|
| |
with the correct ipl to prevent your CPU from locking against itself.
|
|
|
|
|
| |
so merge them into usbd_str() to not introduce other copies with
the upcoming HC drivers.
|
| |
|
|
|
|
|
|
| |
Allows us to move forward on cleaning.
Okay mpi@
|
|
|
|
|
|
|
| |
This function never fails. So change it's return type to void and
adjust the copy-pasted callers that were checking the return.
"If it compiles, ok" mpi@
|
|
|
|
|
|
|
|
|
| |
The controllers are linked through device->bus so the iface is redundant.
So fixing usbd_dopoll() to take the device as argument and making
usbd_interface2device_handle() private (for now) inside usbdi_util.
Tested and okay mpi@
|
|
|
|
| |
OK mpi@
|
|
|
|
|
|
|
|
|
|
| |
starting with usbd_endpoint_count and usbd_interface_count. usbd_status
should only be used to indicate the status of a USB transfer, it should
not be used for generic error codes.
Idea from and much hand-holding by mpi@
OK mpi@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of the badly named usbd_bulk_transfer() and usbd_intr_transfer()
they were two identical wrappers to submit a synchronous transfer.
Now all synchronous transfers are submited using usbd_setup_xfer(9) and
usbd_transfer(9) explicitly using the USBD_CATCH flag when signals must
be checked.
Previous version ok'd by mglocker@, with subtle inputs from miod@
|
| |
|
| |
|
|
|
|
| |
ok mpi@
|
| |
|
|
|
|
|
|
| |
there. Some spacing while here.
Suggested and ok mpi@
|
|
|
|
|
|
|
|
|
| |
definitions instead. We don't change usb.h for now to stay compatible
with userland.
Tested by mpi@ on macppc and myself on i386.
ok mpi@
|
|
|
|
|
|
|
| |
transfer synchronously just pass the USBD_SYNCHRONOUS flag like any
other flags when creating a transfer.
ok sthen@, mglocker@
|
|
|
|
|
|
| |
them.
ok ratchov@, mglocker@
|
|
|
|
|
|
|
| |
used, so do not pretend to support a different one and get rid
of the unused usbd_do_request_flags_pipe() function.
ok mglocker@
|
|
|
|
|
|
|
| |
Those are the equivalents for ugen(4)'s USB_GET_CONFIG_DESC and
USB_GET_FULL_DESC.
Help and OK mpi@, jmc@
|
|
|
|
|
|
| |
and move it to usb_subr.c.
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
date: 2011/02/04 08:21:39; author: jakemsr; state: Exp; lines: +85 -34
* merge 'onqueue' and 'running' members of struct usb_task into
a new member, 'state'.
* add new function 'usb_wait_task()', which waits for queued or running
usb_tasks to complete.
* in the USB_DEVICEINFO ioctl, fill struct usb_device_info in a
usb_task, thereby avoiding races against driver attach/detach.
but this time make the state a bitmask, since it is valid to be added
to the task queue while the task is running. also be more careful
about waking up the task when state changes.
ok miod@
|
|
|
|
| |
this is causing problems with suspend/resume for some people.
|
|
|
|
|
|
|
|
|
|
| |
a new member, 'state'.
* add new function 'usb_wait_task()', which waits for queued or running
usb_tasks to complete.
* in the USB_DEVICEINFO ioctl, fill struct usb_device_info in a
usb_task, thereby avoiding races against driver attach/detach.
ok miod@
|
|
|
|
|
|
| |
them from userland, and nothing in the kernel uses them.
ok krw@, miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interfaces as being claimed in the usbd_device's copy of the interface
descriptors
* allow ugen(4) to be attached if there are unused interfaces in a
configuration that has had drivers attached
* make ugen(4) aware that it may be sharing a device with (an)other
driver(s), and if so:
* do not let ugen(4) change the configuration
* do not let ugen(4) access the already claimed interfaces
discussed with deraadt and miod
|
|
|
|
|
|
| |
* add functions to increment and decrement the reference count, and a
function to wait until the reference count is zero
ok martynas@
|
|
|
|
|
|
|
|
|
| |
* add usbd_deactivate(), which should be use to set the dying flag in
struct usbd_device
* add usbd_is_dying(), which can be used to check if either the device
or the associated bus dying flag has been set
* use usbd_is_dying() to check if the deivce or bus is dying before
issuing transfers or requests
|
|
|
|
|
|
|
|
|
|
|
| |
be run from the generic task kthread, because xfers that need to be
aborted block newly queued tasks from running (i.e. the xfer to be aborted
blocks the abort of that task). as there are now three types of usb
tasks, add an argument to usb_init_task() and another member to struct
usb_task to specify the task type.
fixes boot hangs that are showing up because we now use usb tasks to
attach/detach usb devices.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* usbd_device_handle dev - the device responsible for the task. use
this to not run the task if the device's hub is dying.
* int running - a flag to be set when the task is running.
add usb_rem_wait_task(), a wrapper for usb_rem_task() that waits for
the task to complete if the task is already running.
s/usb_rem_task/usb_rem_wait_task/ in usb_detach(). probably most
drivers using usb_tasks should do this as well. although device
attach/detach is serialized in normal cases, in the special case
where the usb bus is hotpluggable (like cardbus/pcmcia), devices
are not detached in the task thread.
|
|
|
|
| |
ok jsing@, miod@
|
| |
|
|
|
|
|
|
|
| |
which is exactly what it was trying to do.
Tested on all *hci controllers with a bunch of usb devices by at least ckuethe@
and I.
|
|
|
|
|
|
|
|
|
| |
Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.
OK deraadt@
|
|
|
|
| |
ok dlg.
|
|
|
|
|
|
|
|
| |
(which was used to define USB_USE_SOFTINTR).
No binary changes.
ok dlg, mk.
|
|
|
|
|
|
| |
No binary change.
ok mk.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This should cure some rare stack overflows.
From augustss NetBSD
ok dlg@ pascoe@
|
|
|
|
| |
something better and more flexible to use.
|
|
|
|
|
|
|
|
|
| |
attach.
this is required by atu (atmel based usb wireless) devices. something better
will be done, but we need it for now to work on atu.
ok deraadt@
|
|
|
|
| |
This includes numerous fixes and paves the way for usb 2.0 support.
|