| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.
ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it
up a few weeks ago
|
|
|
|
|
|
|
|
|
|
|
|
| |
used to "do things later" and was potentially sleeping in swapper
context. the latter is really bad, because it might never wake up.
instead, move the things that usb_first_explore() was doing to the
first run of the explore task. since tasks are run in a kthread,
they are in process context and ok to sleep.
fixes boot hang noticed by jsg@, which mikeb@ debugged and found
usb_first_explore() to be sleeping swapper context
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
* fill 'udi_serial' with the serial number in usbd_fill_deviceinfo().
* add compatability ioctl/struct so old binaries continue to work.
discussed with deraadt and miod
|
|
|
|
|
|
| |
free it's resources
* use usbd_is_dying() instead of directly checking the device's
bus dying flag
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
is dying, instead of setting a flag in struct usb_softc. as
usbd_device_handle has a pointer to the usbd_bus it's attached to,
usb devices, and functions they run or functions run on their behalf,
can now easily check if their bus is dying. use this to stop
usbd_do_request* from running and the usb task thread from adding
new tasks when a device's bus is dying.
|
|
|
|
|
|
|
| |
hubs before their first port explore, check how long it's actually
been since power up and only wait as necessary. saves a little time
on boot, especially now that explore tasks are serialized.
ok yuo@
|
|
|
|
|
|
|
| |
USB bus, make usb_explore() a usb_task. reduces races during normal
USB device detach, since now usb_tasks and detach happen in the same
process.
ok yuo@, matthew@ helped with the task thread loop
|
|
|
|
| |
OK krw
|
|
|
|
|
|
| |
for sub-devices, return the last error return value instead of |'ing the
failures together and creating some value that is non-0 (bravo!) but
potentially loses the specific error value...
|
|
|
|
|
|
|
|
|
|
| |
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).
Based on a diff from tedu.
ok deraadt
|
|
|
|
| |
ok jsing@, miod@
|
|
|
|
|
|
|
| |
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.
|
|
|
|
|
|
| |
This is needed for the addition of further suspend/resume actions.
Okay deraadt@, marco@.
|
|
|
|
|
|
|
| |
add priv check to the ioctl.
only root priv should access these debug flags.
ok deraadt@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
(which was used to define USB_USE_SOFTINTR).
No binary changes.
ok dlg, mk.
|
|
|
|
|
|
|
|
| |
USB_DECLARE_DRIVER macros.
No binary change.
ok dlg.
|
|
|
|
|
|
| |
No binary change.
ok ray.
|
|
|
|
|
|
| |
No binary change.
ok mk.
|
|
|
|
|
|
|
|
| |
only.
No binary change.
ok mk.
|
|
|
|
|
|
|
|
| |
ulpt.c, I am aware of that and it will be changed later.
No binary change.
ok mk.
|
|
|
|
| |
ok mk.
|
|
|
|
|
|
|
| |
(which was there twice without gcc complaining) and update all uses of
it.
ok jsg mbalmer
|
|
|
|
|
|
| |
No binary change.
ok jsg.
|
|
|
|
| |
ok jsg.
|
|
|
|
|
|
|
| |
(This might look easy, but it was a big diff. Thanks to dlg and especially jsg
for looking over it; we found at least four mistakes in the initial diff.)
ok jsg.
|
|
|
|
|
|
|
|
| |
and the address of it's argument: USBDEV(sc->sc_dev) yields &sc->sc_dev.
No binary changes.
ok jsg.
|
|
|
|
|
|
|
|
| |
were used as a layer of confusion^Wabstraction around the timeout(9) API.
No binary change.
ok jsg.
|
|
|
|
|
|
| |
Tested by thib and myself.
ok mbalmer jsg
|
|
|
|
|
|
|
| |
and it was not consistently used. It was confusing as it suggested these
functions were static, which they were not.
discussed with dlg and jsg, ok jsg.
|
|
|
|
| |
ok jsg@
|
|
|
|
| |
ok deraadt@ krw@ mbalmer@
|
| |
|
|
|
|
|
|
|
|
|
| |
Wait the stable power delay on a USB hub only once per hub (not per port),
and defer the delay for root hubs until the host controller event thread
starts, permitting some concurrency. Speeds up the boot process dramatically
when you have lots of host controllers.
ok dlg@
|
|
|
|
|
|
|
|
|
| |
time.
Chris; Get your shiz fixed and tested for the next time. We have
better todo then wasting our time by backing out untested stuff.
OK deraadt, OK ckuethe
|
|
|
|
|
|
|
|
| |
and defer the delay for root hubs until the host controller event thread
starts, permitting some concurrency. Speeds up the boot process dramatically
when you have lots of host controllers.
ok dlg@
|
|
|
|
| |
from alexandre ratchov. ok claudio
|
|
|
|
| |
looks ok pascoe@
|
|
|
|
|
|
| |
something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP;
this very popular bug has been cut and pasted a lot of times...
ok deraadt@ mickey@
|
|
|
|
|
| |
userland-visible sys/select.h. Consistent with what Net and Free do.
OK deraadt@, tested with full ports build by naddy@.
|
|
|
|
|
|
|
|
|
| |
and handed over any usb1 devices to the companion. without this usb1
devices didnt appear till after root was mounted, which is frustrating if
you want to use a usb keyboard to enter the root device.
tested by kettenis@ and drahn@
ok drahn@ go for it deraadt@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
encapsulating all such access into wall-defined functions
that makes sure locking is done as needed.
It also cleans up some uses of wall time vs. uptime some
places, but there is sure to be more of these needed as
well, particularily in MD code. Also, many current calls
to microtime() should probably be changed to getmicrotime(),
or to the {,get}microuptime() versions.
ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others
"Oh, that is not your problem!" from miod@
|