summaryrefslogtreecommitdiff
path: root/sys/dev/usb
AgeCommit message (Collapse)Author
2018-02-19Add a default case to a usb_tap() switch statement which mpi@ says willJonathan Gray
never be called to convince compilers and static analysis tools a path that uses uninitialised memory does not exist. ok krw@ mpi@
2018-02-19Remove almost unused `flags' argument of suser().Martin Pieuchot
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
2018-02-11Since the BCDC header has a variable data offset, so the ethernet packetPatrick Wildt
alignment can be variable, it's better to move taking care of alignment into the BCDC receive code.
2018-02-08Move bwfm(4) from ifq begin/commit/rollback semantics to the newerPatrick Wildt
ifq dequeue semantics. This basically means we need to check for available space before dequeuing a packet. As soon as we dequeue a packet we commit to it. On the PCIe backend this check can not be done easily since the flowring depends on the packet contents and we cannot take a peek. When there is no flowring we cache the mbuf and send it out as soon as the flowring opened up. Then the ifq can be restarted and traffic can flow. Typically we usually run out of packet ids, which can be checked without consulting the packet. The flowring probably never becomes full as the bwfm(4) firmware takes the packets off the ring without actually sending them out. Discussed with dlg@
2018-02-07Move parsing the BCDC header on RX into a protocol specific RXPatrick Wildt
function so it can be shared with the SDIO attachment driver.
2018-02-05claim copyrightStefan Sperling
2018-02-05Move athn(4) USB devices to the open source atk9k HTC firmware.Stefan Sperling
Also fix support for AR7010 devices, fix mode hostap by properly managing the firmware station table, and fix Tx rate reporting. Tested on AR7010 and AR9271 devices. ok kevlo@
2018-02-03Add support for dumping USB transfers via bpf(4) using USBPcap headers.Martin Pieuchot
ok deraadt@, dlg@
2018-01-31Some wifi drivers don't call ieee80211_newstate() during some stateStefan Sperling
transitions, which means those state transition won't be shown in dmesg in interface debug mode. Make drivers print these transitions themselves. ok patrick@
2018-01-30syncVadim Zhukov
2018-01-30Add D-Link DWA-125 rev B2 to list of devices supported by run(4).Vadim Zhukov
Works for me on amd64. okay stsp@, who also noted this matches Linux commit fd7b9270120ca7e53fbf0469febe0c68acf6a0a2
2018-01-24Do not print that the firmware was successfully loaded in the USB backendPatrick Wildt
driver. It is only useful to know if firmware loading has failed. This means fewer clutter in dmesg(8). Spotted by and ok stsp@
2018-01-23Fix checks for error return from urtw_alloc_rx_data_list() andKevin Lo
urtw_alloc_tx_data_list() in 8187b init. From James Jerkins, thanks.
2018-01-18Remove quirk matching all Yamaha devices, as this prevents non-MIDIAlexandre Ratchov
devices from attaching (ex uaudio devices). ok mpi
2018-01-11syncKevin Lo
2018-01-11Add support for Huawei E3372.Kevin Lo
ok phessler@
2018-01-08Fix indentation.Patrick Wildt
2018-01-03Since the PCI attachment code already uses mbufs for RX packets, we canPatrick Wildt
push the mbuf allocation down into the USB attachment code and now pass an mbuf to the bwfm(4) receive function.
2017-12-30Don't pull in <sys/file.h> just to get fcntl.hPhilip Guenther
ok deraadt@ krw@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
2017-12-14let urtwn(4) find my TP-LINK TL-WN722N v2Sebastian Benoit
ok deraadt@ phessler@ kettenis@
2017-12-14syncSebastian Benoit
2017-12-14add usb id for TP-LINK TL-WN722N v2Sebastian Benoit
ok deraadt@ phessler@ kettenis@
2017-11-07Prevent a potential stack buffer overrun when a urtwn(4) deviceStefan Sperling
reports more than 3 bulk-out endpoints. Problem found by Pierre Pronchery (khorben) during code inspection. ok mpi@ kevlo@
2017-10-29IFF_NOARP has no effect if the interface don't use ether_input() norMartin Pieuchot
ether_output().
2017-10-26Move common code to add/remove multicast filters to ieee80211_ioctl(9).Martin Pieuchot
ok jsg@, stsp@
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@