| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
available device interfaces is called 'bNumInterfaces'.
ok phessler@, thfr@ (who provided the man page diff)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
before usbd_close_pipe(), since usbd_close_pipe() already takes care
about aborting non-empty pipes.
As investigated by gerhard@ usbdi.c rev. 1.57 did add usbd_abort_pipe()
to usbd_close_pipe(), but the drivers didn't get cleaned up afterwards.
ok gerhard@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes webcam detection in firefox 78, where code was added to check for
V4L2_CAP_VIDEO_CAPTURE capability on 'device_caps', whereas we only set it
in the 'capabilities' field.
According to
https://www.kernel.org/doc/html/v4.14/media/uapi/v4l/vidioc-querycap.html#description
those distinct fields are here for drivers that provide several devices,
but firefox decided to check for 'device_caps' field instead of
'capability' (cf
https://hg.mozilla.org/integration/autoland/rev/33facf191f23) - so fill
the field for compatibility reasons, while
https://bugzilla.mozilla.org/show_bug.cgi?id=1650572 discusses with
upstream what's the right way.
ok mglocker@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Include sys/proc.h to address following errors:
/usr/src/sys/dev/usb/uvideo.c:2901:31: error: incomplete definition of type 'struct proc'
vn_close(nd.ni_vp, FWRITE, p->p_ucred, p);
~^
/usr/src/sys/sys/types.h:223:8: note: forward declaration of 'struct proc'
struct proc;
^
/usr/src/sys/dev/usb/uvideo.c:2925:40: error: incomplete definition of type 'struct proc'
UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, NULL, p);
~^
/usr/src/sys/sys/types.h:223:8: note: forward declaration of 'struct proc'
struct proc;
^
2 errors generated.
ok mpi@
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pseudo-drivers exposing a userland interface generally start & stop I/O
in *_open() and *_close() respectively. So it isn't safe to detach such
device while it is still open, because I/O might still be in flight.
A more generic fix would be to detach children devices before the parents.
Fix a race reported by Kevin Chadwick on bugs@.
Discussed with Peter Stuge, tested by and ok zhuk@
|
|
|
|
| |
ok visa@, kn@
|
|
|
|
|
|
|
|
| |
sweep tree to correct NDIINT op and flags ahead of time. document
the requirement. This allows KERNELPATH to be used to bypass
unveil for crash dumps with nosuidcoredump=2 or 3
ok visa@ deraadt@ florian@
|
|
|
|
|
|
|
|
|
| |
seen on a Lenovo X395 which combines normal webcam functionality
with another IR camera, by parsing the USB interface association
descriptors. This fixes the symptom of uvideo(4) complaining
about too many headers and not providing any functionality at all.
ok jan@
|
|
|
|
|
|
| |
as seen on the IR camera of my Lenovo X395.
ok jan@
|
|
|
|
|
|
|
| |
sizes with each specification. Use the correct size for the given
version, since some newer devices cannot handle small buffers.
ok jan@
|
|
|
|
|
|
| |
compiled in.
ok jan@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.
OK mpi@, deraadt@
|
|
|
|
|
|
|
|
| |
name coming from usbd_devinfo_vp() instead of the dummy "Generic USB
video class device" string, makes it easier to differentiate multiple
webcams in firefox's webrtc permission dialog.
ok/help mpi@
|
|
|
|
| |
ok deraadt@ krw@
|
|
|
|
| |
Coverity CIDs 1452970 1453305.
|
|
|
|
|
| |
Errors will result in nice clean panic messages so we know what's wrong.
Reviewed by dhill visa natano jsg.
|
|
|
|
| |
ok natano visa
|
|
|
|
|
|
|
|
| |
to finish on close.
Tested and ok Patrick Keshishian
ok mpi
|
|
|
|
|
|
| |
to deactivate our children.
ok mglocker@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
With this we can get rid of the sc_mmap_cur variable to query the buffer
queue for a free slot.
Remove resetting of the V4L2_BUF_FLAG_MAPPED buffer flag while here. It's
enough when it gets set initially by uvideo_reqbufs().
Initial diff from Patrick Keshishian, thanks!
ok mpi
|
|
|
|
|
|
|
| |
alternate interface endpoint instead statically on interface 0.
Fix duplicate DPRINTF output while there.
Initial diff from Patrick Keshishian, thanks!
|
|
|
|
|
|
| |
store the alternate video interface number already.
From Patrick Keshishian, thanks!
|
|
|
|
| |
From Patrick Keshishian, thanks!
|
|
|
|
|
|
|
| |
memory to a local user. Found by Patrick Keshisian. Fix a potential
integer overflow issue in related code while I'm there.
ok mglocker@, deraadt@
|
|
|
|
|
|
| |
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
|
|
|
|
| |
a firmware.
Regression spotted by deraadt@
|
|
|
|
|
|
| |
similar to config_defer(9).
ok mikeb@, deraadt@
|
|
|
|
|
|
| |
<dev/usb/uvideo.h> to get USB video descriptor definitions.
from Ludovic Coues.
|
|
|
|
|
|
|
|
|
| |
found the hard way by sebastia@ four years ago, and I'd been sitting on that
diff since.
The initial diff was more aggressive and would free the mmap queue upon error,
but jakemsr@ had objections against this behaviour; this diff only fails
gracefully instead of panic'ing.
|
|
|
|
|
|
|
|
| |
return EINVAL in this case.
Also change an easily triggerable panic by a printf and return EINVAL.
Reminded by brad@, one typo spotted by sthen@ and ok mpi@
|
|
|
|
| |
ok miod@
|
|
|
|
|
|
|
| |
modify various third party apps using the V4L2 API to build on OpenBSD specifically.
"I think this is the right thing to do" miod@
"Fine with me." sthen@
|
|
|
|
| |
ok ratchov@, sthen@, mpi@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
| |
|
|
|
|
| |
Tested and okay mpi@.
|
|
|
|
| |
ok mglocker@
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
| |
absolutely do not need to include vnode.h because it includes uvm_extern.h
and you want the idiotic TRUE FALSE defines from uvm.
|
|
|
|
| |
from Gregor Best.
|
|
|
|
| |
From Pedro Martelletto
|
|
|
|
|
|
|
| |
sys/kthread.h, use sys/timeout.h explicitly. Noted by Michael
Knudsen.
ok deraadt@ kettenis@ guenther@
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
If one of the usb calls we did here failed we'd return immediately and
not free our buffer.
ok miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Allocating with M_WAITOK, checking for NULL, and calling panic() is
pointless (malloc() will panic if it can't allocate) so remove the check
and the call.
2) Allocating with M_WAITOK, checking for NULL, and then gracefully
handling failure to allocate is pointless. Instead also pass M_CANFAIL
so malloc() doesn't panic so we can actually handle it gracefully.
1) was done using Coccinelle.
Input from oga.
ok miod.
|