summaryrefslogtreecommitdiff
path: root/sys/dev/usb
AgeCommit message (Collapse)Author
2017-10-23Even if a USB transfer fails, call umb_start() so that processingGerhard Roth
of the if_snd queue doesn't stall. ok stsp@
2017-10-21Initialize all fields in the BCDC protocol, otherwise the controllerPatrick Wildt
behaves erratically and drops packets on TX. Found the hard way by Jared McNeill. While there, also set the priority field. ok stsp@
2017-10-20Kill dead ioctl handlers.Martin Pieuchot
SIOCGIF{HARD,}MTU are handled by ifioctl() and not passed down to drivers. ok visa@
2017-10-19Don't just return but setup and resubmit the transfer if we're notPatrick Wildt
getting the data we expect to be getting. Otherwise the firmware can starve our USB RX descriptors using invalid packets. Caught by Jared McNeill.
2017-10-19Don't forget to free the firmware in the error path, and make sure toPatrick Wildt
pass the proper size. Caught by Jared McNeill.
2017-10-15Similar to other USB based backend drivers, have a list of TX/RXPatrick Wildt
buffers. By storing the pointer of the TX mbuf in the TX buffer, we can make sure to free the mbuf properly after TX completed. This also seems to speed up the WiFi scan. previous version ok stsp@
2017-10-11regenPatrick Wildt
2017-10-11Add bwfm(4), a driver for Broadcom FullMAC WiFi controllers. ThePatrick Wildt
FullMAC, in comparison to SoftMAC, does most WiFi handling in the firmware that's running on the controller. This means we have to work around the net80211 stack while still implementing all the WiFi interfaces to userland. This driver is still in early development. So far it can connect to open WiFis over the USB bus. SDIO and PCIe support, for devices like the Raspberry Pi 3 or the Macbooks, is not yet implemented. Also mbufs on the transmit path leak and are not yet freed. ok stsp@
2017-10-09Correct logic check preventing the device to attach.Martin Pieuchot
Fix regression introdruced in previous. Found the hardway and diff from weerd@
2017-10-05Add support for the "TEMPer1F_H1V1.5F" USB temperature and humidityStefan Sperling
sensor to the ugold(4) driver. Patch by Jan Klemkow Tested by Remi Locherer ok mpi@ patrick@
2017-09-23Add dummy FIOASYNC handler.Martin Pieuchot
Without it uhid_do_ioctl() will return EINVAL which will make the upper layer assume that uhid node do not support non-blocking reads. Fix a regression introduced by the removal of SIGIO support. Reported by many, fix tested by Bryan Linton, Micah Muer and Nam Nguyen.
2017-09-21Disable a splsoftassert() at least until ohci(4) has been fixed.Martin Pieuchot
This assert triggers because of the floor check on amd64/sparc64 when ohci(4) processes its root-hub status change transfers at IPL_BIO. Previous to the removal of IPL_SOFTNET, the SPLUSBCHECK macro didn't do anything, so it is safe to disable this check. Issue reported by espie@ and krw@
2017-09-12- sprinkle variable name and printf tweaksJasper Lievisse Adriaanse
- save product type for future use
2017-09-10- call usbd_deactivate() rather than simply returning in case of errorsJasper Lievisse Adriaanse
- explicitly clear sc_xfer upon detach - fix spacing in urng_softc definition
2017-09-08Add support for isochronous transfers to xhci(4).Stefan Sperling
This is just a step forward which allows further progress to happen in-tree. The isochronous code path remains disabled for now. Playing audio over xhci(4) does not work properly yet, and I haven't even tested video input. Based on a work-in-progress diff by mpi@ from 2015. ok mpi@
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-09-05explicitly clear the output pipeJasper Lievisse Adriaanse
ok mpi@
2017-09-05EPROTO is now in sys/errno.hOtto Moerbeek
2017-09-05Correct a bounds test. Coverity CID 1452930.Jonathan Gray
ok mpi@
2017-09-04Revert previous: "Fix a remaining length miscalculation in xhci(4)."Stefan Sperling
It made one of my machines get stuck during boot.
2017-09-01Add macros for reading the bmAttributes field of the USB super speedStefan Sperling
endpoint companion descriptor. ok mpi@
2017-09-01Fix a remaining length miscalculation in xhci(4).Stefan Sperling
Each TRB contains a remaining TD size, which allows hardware to tell whether additional TRBs follow within the current transfer without reading ahead. The length of the first TRB was subtracted from the total length before calculating the remaining TD sizes. This is wrong because remaining TD sizes are relative to the size of the entire transfer, including the first TRB. Our current USB code does not trigger this bug because there is no code in upper layers yet which triggers use of multiple TRBs per transfer. ok mpi@
2017-08-30Use endpoint 5 for chaoskey, it should have been 5 from the start, thisAaron Bieber
puts us in line with the linux driver. Also add a DPRINTF for endpoints. "i'd say go for it" jasper@
2017-08-29add _MEASURE_RATE bits from uonerng(4)Jasper Lievisse Adriaanse
tested by abieber@
2017-08-29rename sc_pipe to sc_outpipe to indicate it's direction as there'll come anJasper Lievisse Adriaanse
sc_inpipe too
2017-08-29"urng" is needed on the file lines... or these end up in all kernels,Theo de Raadt
including ramdisks without usb support...
2017-08-28Add urng(4) which supports various USB RNG devices. Instead of adding oneJasper Lievisse Adriaanse
driver per device, start bundling them into a single driver. urng(4) supports the device currently supported by ualea(4) and adds support for the Altusmetrum ChaosKey 1.0, by abieber@ This was tested by abieber@ with a ChaosKey and Sean Levy with an Alea II ok abieber@ deraadt@ naddy@
2017-08-26regenAaron Bieber
2017-08-26Add device ID for Altusmetrum ChaosKey 1.0Aaron Bieber
OK jasper@
2017-08-23Fix up rssi calculations and r88e_rx_cck structure for RTL8188EU.Kevin Lo
Tested with TL-WN725N v2 (rtl8188eu) on amd64. ok stsp@
2017-08-21Fix off by one in array bounds tests when parsing descriptors.Jonathan Gray
Coverity CIDs 1452970 1453305.
2017-08-18Fix checks for error return from urtw_alloc_rx_data_list() andKevin Lo
urtw_alloc_tx_data_list(), CID 980284. ok stsp@
2017-08-16Mostly cosmetic changes to make things a bit more consistant:Kevin Lo
- rename bit definition of R88E_TX_RPT1_ENA to reflect reality - no need to set R92C_FPGA0_ANAPARAM2 for 40mhz for rtl8188eu - in rtwn_write_txpower(), writing to MCS8-15 power registers if the WNIC has 2 spatial streams ok stsp@
2017-08-14Attach run(4) to D-Link DWA-137 and DWA-140 rev D1.Stefan Sperling
Patch by Mike Korbakov
2017-08-14regenStefan Sperling
2017-08-14Add USB device IDs for D-Link DWA-137 and DWA-140 rev D1.Stefan Sperling
Patch by Mike Korbakov
2017-08-12Fix Coverity CID 1452915: urtwn(4) would use an uninitialized array indexStefan Sperling
if a hypothetical and malicious USB device reports no Rx endpoints. ok mpi@
2017-08-11Remove NET_LOCK()'s argument.Martin Pieuchot
Tested by Hrvoje Popovski, ok bluhm@
2017-08-10Deactivate the device if I/O fails in attach.Martin Pieuchot
Coverity CID 1453399; ok deraadt@
2017-08-02Match D-Link DWA-130 rev F1 devices. These work with run(4).Stefan Sperling
Patch by Jacqueline Jolicoeur ok deraadt
2017-08-02regenStefan Sperling
2017-08-02Add device ID for D-Link DWA-130 rev F.Stefan Sperling
Patch by Jacqueline Jolicoeur ok deraadt
2017-07-30Use memcpy instead of casts to copy 8 bytes of data to avoid unalignedMark Kettenis
access. ok visa@, mpi@, deraadt@
2017-07-29Remove useless conditional before free().ians
ok mpi@
2017-07-29Device trees for the Rasperry Pi are still in flux. Catch up with theMark Kettenis
latest ways to encode the MAC address for the onboard USB Ethernet. ok visa@
2017-07-28The read buffer size reported by the hardware can be up to 4095Alexander Bluhm
bytes. This would exceed the mbuf cluster size. Use larger clusters in this case. bug report Ilja Van Sprundel; OK deraadt@ stsp@
2017-07-21Do not permit USB ioctl handler malloc(9)'s to block as this interferesians
with expected behavior. OK mpi@ patrick@
2017-07-21Add frame length boundary checks to the input path of atu(4).Stefan Sperling
Problem found by Ilja Van Sprundel. ok kevlo
2017-07-21Unbreak the rsu(4) driver which was not kept up-to-date with recent WPAStefan Sperling
supplicant and net80211 state machine changes. While here, make rsu(4) report the correct channel for received frames to tcpdump(8). ok deraadt@
2017-07-21Fix frame length bounds checks in rsu(4).Stefan Sperling
Due to signedness issues the existing checks didn't work as intended. Problem reported by Ilja Van Sprundel. ok deraadt@