| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
descriptor (usually doesn't happen), that we continue to use an outdated
cdesc pointer which still refers to the previous cdesc. Instead update
the cdesc pointer to the new configuration descriptor.
Reported by Thomas Jeunet <cleptho AT gmail DOT com>
ok phessler@
|
|
|
|
|
|
|
|
|
| |
bInterfaceNumber and bAlternateSetting as following:
ifaceidx -> ifaceno
altidx -> altno
Suggested and ok mpi@
|
|
|
|
| |
I've missed two more cases in the previous commit.
|
|
|
|
|
|
| |
available device interfaces is called 'bNumInterfaces'.
ok phessler@, thfr@ (who provided the man page diff)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
on xhci(4) controllers by clearing the interface endpoints before opening
the pipes.
Tested by Mikolaj Kucharski for ugen(4) and gnezdo@ for uhidev(4), plus
myself for both.
ok mpi@
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
|
|
|
|
|
|
|
| |
Prevent copying a partial and corrupted descriptor or leaking kernel
memory.
ok kn@, deraadt@
|
|
|
|
|
|
|
|
| |
actual length which has been allocated. We saw cases where the
wTotalLength value is changing on a second read, e.g. when a USB device
was waked up from sleep mode.
ok mpi@
|
|
|
|
| |
ok visa@
|
|
|
|
|
|
| |
for example, with locking assertions.
OK mpi@, anton@
|
|
|
|
|
|
|
|
| |
EOPNOTSUPP is returned when there's no "filterops" for a given fd.
EINVAL when the requested filter isn't supported by the "filterops".
ENXIO means the underlying device is no longer valid/present.
ok visa@
|
|
|
|
| |
ok mpi@
|
|
|
|
|
|
| |
adding more filter properties without cluttering the struct.
OK mpi@, anton@
|
|
|
|
| |
ok bluhm@
|
|
|
|
|
|
| |
make the structs const so that the data are put in .rodata.
OK mpi@, deraadt@, anton@, bluhm@
|
|
|
|
| |
ok tedu@, visa@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok deraadt@ krw@
|
|
|
|
|
|
| |
with expected behavior.
OK mpi@ patrick@
|
|
|
|
|
| |
Errors will result in nice clean panic messages so we know what's wrong.
Reviewed by dhill visa natano jsg.
|
|
|
|
| |
ok deraadt@
|
|
|
|
| |
if_atu.c noted by Michal Mazurek.
|
|
|
|
|
|
| |
way.
ok natano@
|
|
|
|
| |
work properly.
|
|
|
|
|
|
| |
in case the kernel failed to change the interface of a device.
Found the hardway by okan
|
|
|
|
|
| |
From Grant Czajkowski <czajkow2 AT illinois DOT edu>
OK mpi@
|
|
|
|
|
|
| |
are converted for the moment.
From Grant Czajkowski.
|
|
|
|
|
|
|
|
|
|
|
| |
submitting a bulk write request.
This also means big bulk write requests are no longer split into
multiple small transfers something that libusb consumers do not
expect.
From Grant Czajkowski <czajkow2 AT illinois DOT edu> as part of the
GSoC 2015.
|
|
|
|
|
|
|
|
|
|
|
|
| |
submitting a read request.
This also means big read requests are no longer split into multiple
small transfers something that libusb consumers do not expect.
Tested by ajacatoutot@.
Found by Grant Czajkowski <czajkow2 AT illinois DOT edu> during the
GSoC 2015.
|
|
|
|
|
|
|
| |
functions are almost unused and create confusion. Do like the rest
of the drivers and simply get an interface or device descriptor.
Tested by ajacoutot@ and Grant Czajkowski, thanks!
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces differences between non-isoch and isoch transfers submissions,
makes the generic DMA buffer overrun check work with isoch transfers and
will allow some code simplifications in HC drivers.
Since short-transfers were never checked for isoch transfers, we now need to
pass the USBD_SHORT_XFER_OK flag to not change this behavior. This might be
revisited later.
ok ratchov@
|
|
|
|
|
|
| |
Fix a panic reported by landry@ with Android's ADB.
Tested and ok ajacoutot@
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
|
| |
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@
|
| |
|
|
|
|
| |
the 'dying' flag.
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
| |
|
|
|
|
|
|
| |
Allows us to move forward on cleaning.
Okay mpi@
|
|
|
|
| |
Okay 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@
|
|
|
|
|
|
|
|
|
|
| |
smaller than the requested one. From ws@NetBSD via miod@.
This problem can only occur when the USBD_SHORT_XFER_OK flag is set,
otherwise completed transfers with a length smaller than the one
submitted are treated as errors.
ok miod@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
and move it to usb_subr.c.
OK mpi@
|
| |
|
|
|
|
|
|
| |
ugen(4) devices.
From NetBSD PR#37934 spotted by Logan Aden.
|
|
|
|
|
|
| |
Problem reported by ajacoutot@
ok deraadt@, kettenis@, krw@
|
|
|
|
|
|
|
|
| |
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
|