summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
AgeCommit message (Collapse)AuthorFilesLines
2017-01-09Remove unneeded <sys/malloc.h> from Michael W. Bombardieri.mpi6-12/+6
2017-01-08Make urtwn(4) use AMRR instead of letting the firmware handle rate scaling.stsp1-6/+63
For now this only affects RTL8188EU chips, perhaps because the author of this patch does not own any devices containing any of the other chips (hint hint). Patch by misha aka Mikhail / mp39590 at gmail ok mpi@
2017-01-07Remove unused MIX_CN_CIN macro, make umidi_evlen[] static, style(9).ratchov1-35/+19
From Michael W. Bombardieri. Thanks.
2017-01-03No need to set use_maxpkt twice. From Michael W. Bombardieri. Thanks.ratchov1-2/+2
2017-01-03No need to include sys/malloc.h. From Michael W. Bombardieri. Thanks.ratchov1-2/+1
2016-12-27Add cast to silence warnings generated by clang.kettenis1-2/+2
ok mpi@
2016-12-20Group identical close_in_jack() and close_out_jack() into a singleratchov1-17/+7
routine. From Michael W. Bombardieri <mb at ii.net>. Thanks!
2016-12-15Regen usbdevspirofti2-4/+14
2016-12-15Add Intel Bluetooth devices found on x250 and x260 Thinkpads.pirofti1-1/+3
2016-12-12Use DPRINTF instead of printf() in #ifdef UAUDIO_DEBUG section. Fromratchov1-5/+3
Michael W. Bombardieri <mb at ii.net>
2016-12-12Match on the FTDI Suunto product id, from Kristaps Dzonsons who testedjsg1-1/+2
this with a Suunto D6i dive computer.
2016-12-12Add support for Option iCON 505 from Piotr Isajew and consistentlyjsg1-2/+3
name other iCON devices the way Option does.
2016-12-12regenjsg2-12/+17
2016-12-12Add Option iCON 505 from Piotr Isajew and consistentlyjsg1-4/+5
name other iCON devices the way Option does.
2016-12-05Remove unused variable. From Michael W. Bombardieri <mb@ii.net>. Thanks!ratchov1-3/+1
2016-11-30Do not overlay DMA fragment decriptors with free list handling.mpi2-13/+18
This "cleverness" increase the risk of races due to caching and/or prefetching between the HC and DMA engine. Many of the bug reports on bugs@ involving memory corruptions in usb_allocmem() should be easier to diagnose when not avoided with this change. From Marius Strobl, ok kettenis@
2016-11-29m_free() and m_freem() test for NULL. Simplify callers which had their ownjsg1-3/+2
NULL tests. ok mpi@
2016-11-25The NCM encoding allows to aggregate multiple segments in one singlegerhard3-20/+61
transfer. Using wMaxSegmentSize for bulk-in could break the rx-path because xfer length can be smaller than the messages sent by the device. And using some constant value for rx/tx size is also a bad idea, because we might be sending messages to the device that are too big for it to handle them. Therefore use the NCM GET_NTB_PARAMETERS request to query the device's configuration. Found, tested, and ok'ed by otto@
2016-11-21Some MBIM devices need a FCC Authentication before they're willing togerhard3-17/+250
turn on the radio. This is done by encapsulating QMI requests inside a MBIM message. Based on prio work by sthen@, tested by Bryan Vyhmeister. ok sthen@
2016-11-16regengerhard2-4/+9
2016-11-16Add Sierra Wireless EM7455 LTE module.gerhard1-1/+2
from Bryan Vyhmeister, ok sthen@
2016-11-16Use memcpy() to copy structures into freshly malloc'ated buffers,ratchov1-3/+3
as source and destination never overlap in this case. From Michael W. Bombardieri <mb at ii.net>.
2016-11-14Stop looking for further NCM datagrams if either length or offset ofgerhard1-2/+2
the next datagram is zero. Tested by otto@ ok mpi@ kettnis@ otto@
2016-11-10Use the NdpIndex of the NCM header as the offset of the NCM pointer insteadgerhard1-4/+5
of assuming tha the NCM pointer will follow immediately after the header. Tested by Bryan Vyhmeister and Otte Moerbeek ok otto
2016-11-08Remove superfluous DMA synchronization now that the stack is doing it formpi2-11/+2
all HCs. ok patrick@
2016-11-08Remove dead store. From Michael W. Bombardieri <mb at ii.net>. Thanks.ratchov1-4/+2
2016-11-06Avoid calling usbd_set_config_no() in *_attach() and let the stack dompi15-146/+30
it instead. If anything bad happen due to a malformed descriptor it makes no sense to try to attach a driver, and bail before probing. This is similar to the change to avoid calling usbd_set_config_index().
2016-10-27Uniformize debug printfs, by using consistently __func__ everywhere.ratchov1-120/+127
From Michael W. Bombardieri <mb at ii.net>
2016-10-25Make kernel without INET6 compile again.bluhm1-1/+3
OK mikeb@
2016-10-12Rename CDCE_ZAURUS option to CDCE_CRC32 for clarity.fcambus2-14/+14
OK kettenis@
2016-10-04Let the stack perform DMA synchronization instead of doing it (partially)mpi1-7/+21
in HC drivers. Only ehci(4) was performing pre & post synchronization completly. Now pre-synchronization is done in usbd_transfer() and post-synchronization in usbd_transfer_complete(). This will allow us to remove the partial synchronization primitives from the pipe handlers. This is similar to what FreeBSD did in r158998, r164519 and r176203. From Marius Strobl. ok kettenis@
2016-10-03Fix some bus_dmamap_sync(9) calls.mpi1-17/+40
Do not fold multiple DMA synchronizations into one when chaining TRBs as the ring might wrap. Add missing "READ" transfer direction from the HC to host when applicable. From Marius Strobl.
2016-10-02Save and restore the (non-standard) USBMODE register around a reset of thekettenis3-4/+18
controller. This register controls whether the controller is in device or host mode on many dual role controllers and gets reset during a reset of the controller, placing the controller in (non-functional) idle mode. By saving and restoring it, we keep the controller in host mode. Since this is a non-standard register, add a new EHCIF_USBMODE flag and only do the save and restore if it has been set. Makes the upper "OTG" port of the Cubox-i work. ok mpi@, jsg@
2016-09-26Move the net/bpf.h include within the #if NBPFILTER directivefcambus1-2/+2
OK deraadt@
2016-09-24Remove unused functions.kettenis2-59/+2
ok jmatthew@, visa@
2016-09-23Add quirk to allow Yamaha UR22 to attach as uaudio(4). Fromratchov1-1/+3
Michael W. Bombardieri <mb at ii.net>. Thanks!
2016-09-23syncratchov2-2/+7
2016-09-23Add Yamaha UR22 audio interface.ratchov1-1/+2
From Michael W. Bombardieri <mb at ii.net>, thanks!
2016-09-21SierraWireless MC7455.mpi1-1/+2
From Yannick Gravel, ok phessler@
2016-09-21regenmpi2-4/+9
2016-09-21SierraWireless MC7455mpi1-1/+2
from Yannick Gravel, ok phessler@
2016-09-21Remove a hack now that the USB stack correctly set the maximum packetmpi1-9/+3
size based on the device speed. Tested by and ok jsg@, mlarkin@
2016-09-19Correctly check for valid maximum packet size.mpi1-2/+2
from jsg@
2016-09-19``bMaxPacketSize'' is reported as a power of 2 for super speed devicesmpi1-3/+7
as per section 4.8.2.1 of xHCI specification. Note that we never got this correctly. Spotted by and ok jsg@
2016-09-19Remove unused getdev() audio driver functions.ratchov2-44/+2
2016-09-18Ensure that the device descriptor ``bMaxPacketSize'' value is usablempi1-26/+41
before using it as the ``wMaxPacketSize'' of the default endpoint. This prevents host controller drivers from using incorrect value, in particular 0, that makes ehci(4) crash. While here do the 0xff -> 512 conversion for super speed devices. Crash found with a facedancer21. ok deraadt@
2016-09-16Switch urndis(4) over to the generic RNDIS headermikeb2-286/+47
2016-09-15all pools have their ipl set via pool_setipl, so fold it into pool_init.dlg5-23/+16
the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
2016-09-14Always set the MAC address when initializing the chip.mpi2-5/+11
Make "# ifconfig axen0 lladdr" work. ok stsp@, dlg@
2016-09-14Remove drain(), query_encoding(), mappage() and get_default_params()ratchov2-200/+4
methods from all audio drivers and from the audio_if structure as they are never called.