Age | Commit message (Collapse) | Author |
|
ok deraadt@
|
|
becaue it skips a wakeup() later on. this is the only error condition
that returns before the wakeup. not sure why this particular case is
handled differently, and not certain what the error code should be, but
this is better than breaking all of usb because of a problem on one port.
dicussed with deraadt
|
|
* 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
|
|
ok jsg@
|
|
determined by bNbrPorts in hub descriptor.
USB hub sends status packet to host, it contains status bits for each port
and hub itself. So, the packet size is ceil((port + 1) / 8) bytes.
If host requests smaller than that size, the hub behavior is undefined.
Some hub (Intel's RMH for example) sends whole status every time,
it makes babble of USB. This is the reason that uhub_intr() of old code
was suffered from USBD_IOERROR,
Okay deraadt@ and yuo@.
|
|
fixes problems seen with Linksys USB300M.
|
|
in time, which is a problem if your umass device has multiple luns
on it. if multiple commands are issued at the same time then they
step on some shared state, which in turn causes some interesting
panics.
this diff introduces an iopool in umass so only one command can be
"allocated" and scheduled at a time.
found, reproduced and investigated by krw@
fix verified by krw@
ok matthew@ krw@
|
|
for now. But since it is not being handled, do not ack it on the
chip.
Discussed with kettenis a while back
|
|
that crept in with rev 1.77, spotted by the clang static analyser.
ok deraadt@
|
|
|
|
anonymous unions "un".
delete some obsolete mpeg/jpeg compression methods that have never been
supported, and will not need to be supported.
|
|
traversal code to suspend/resume
ok oga kettenis blambert
|
|
|
|
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations
to get ready.
Discussed quite a while back with kettenis and jakemsr, oga suddenly needed
it as well and wrote half of it, so it was time to finish it.
proofread by miod.
|
|
|
|
|
|
|
|
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...
|
|
|
|
It is OK to return 0 in that case, but it is not OK to print a
diagnostic.
|
|
functions
ok kettenis
|
|
|
|
which reports Fn as a regular key.
|
|
|
|
ok deraadt@ henning@ claudio@
|
|
|
|
PWR_{SUSPEND,RESUME} so that they match the values of DAVCT_{SUSPEND,RESUME}
so that we can eventually (many more steps...) kill the powerhook garbage
and use the activate mechanism.
no objections
|
|
|
|
|
|
|
|
|
|
|
|
It makes even the smallest run(4) devices look ridiculously huge.
|
|
* use the correct variable in a DPRINTF
|
|
complete outstanding requests, so use uaudio_drain in uaudio_detach.
* the channel alt index can still be -1 at detach. check for this.
|
|
|
|
|
|
Bogus chunks pointed out by matthew@ and miod@. No cookies for
marco@ and jasper@.
ok deraadt@ miod@ matthew@ jasper@ macro@
|
|
USB_SET_REPORT ioctls in ukbd and ums.
This allows usbhidctl to be used on these devices e.g. to dump the report
descriptor of troublesome models.
ok deraadt@
|
|
required; PR 6436
ok deraadt@
|
|
- parts of the report descriptor not in a format we expect are now ignored,
instead of preventing attachment (e.g. hypothetical multi-bit modifiers).
- modifiers beyond MAXMOD are ignored.
- keycode arrays larger than MAXKEYCODE are clamped to MAXKEYCODE instead
of being rejected.
- multiple keycode arrays are ignored.
This should allow rogue keyboards to attach and be usable up to a certain
extent.
Adapted from a diff sent by Loganaden Velvindron (first name at gmail), who
has a keyboard which keycode array is larger than MAXKEYCODE (but, like most
if not all USB keyboards out there, can only report up to three simultaneous
keypresses anyway).
|
|
|
|
|
|
duplication and divergence.
Thanks to mlarkin@ for bluetooth devices tests.
|
|
function is not.
This change #if 0's urndis_watchdog() and some functions that are only
called from here.
At some point we probably want to use the watchdog functionality but the
current code is completely untested so disable it entirely rather than
enabling it this close to release.
|
|
|