summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2016-10-03Fix some bus_dmamap_sync(9) calls.Martin Pieuchot
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-02Some HABs reset parts of AHCI_PREG_CMD when AHCI_PREG_SCTL_DET_INITPatrick Wildt
gets set. Therefore, ahci_port_softreset() restores the sate of the former register once the device detection sequence is finished. The device detection code in ahci_pmp_port_portreset() does not restore AHCI_PREG_CMD afterwards, so let it catch up. Apparently, this part was an oversight as ahci_pmp_port_portreset() did not otherwise use "cmd". From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Some HBAs report NCQ capability despite only supporting one commandPatrick Wildt
slot. Thus, extend the check whether NCQ actually should be enabled accordingly. From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Given that ahci_port_alloc() grabs one CCB for use during NCQ errorPatrick Wildt
recovery from the CCB pool sized based on the NCS capability, i. e. number of command slots reported by the controller, it is necessary to pretend at least 2 slots in sc->sc_ncmds for devices without NCQ support. That way, also at least 1 available slot is made available for atascsi(4). Otherwise, controllers having only a single command slot will trigger "no free xfers on a new port" in atascsi(4). Note that pretending 2 command slots is also fine with the abuse of the NCQ error recovery CCB in ahci_port_softreset(). From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Contrary to e. g. the xHCI specification, the AHCI rev. 1.3 specPatrick Wildt
does not say anything about which type (snoopable/uncached etc.) of bus transactions are issued by HBAs on accesses to the descriptors. Thus, the right assumption would be "classical" concurrent accesses by both CPU/driver as well as hardware to the descriptors and their DMA memory backings respectively, which is also confirmed by actual testing. Consequently, switch to BUS_DMA_COHERENT mappings for said DMA memory as otherwise corruption of descriptors is seen. From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Save and restore the (non-standard) USBMODE register around a reset of theMark Kettenis
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-30Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboardMark Kettenis
encodings. ok deraadt@, jca@
2016-09-27Wait until the BSSID is known before adding the MAC context to iwm firmware.Stefan Sperling
Fixes iwm connectivity issues after first boot. Tested by myself (8260 chip) and tb@ (7265 chip) ok tb@
2016-09-27Print the type of operation space that failed as there seem to be more ofMike Larkin
these occurring recently.
2016-09-26Avoid calculating offset several times. This was done for a few functions ↵Frederic Cambus
already, but not all of them. OK natano@
2016-09-26Move the net/bpf.h include within the #if NBPFILTER directiveFrederic Cambus
OK deraadt@
2016-09-25Remove more duplicated includesFrederic Cambus
OK jca@, deraadt@
2016-09-24Don't compare array against null pointer; found by clang.Mark Kettenis
ok jca@, jcs@
2016-09-24Assert that bus->force_bit >= 0 instead of force_bit. Found by clang.Mark Kettenis
2016-09-24Remove unused functions.Mark Kettenis
ok jmatthew@, visa@
2016-09-23Rework Per Packet Info handlingMike Belopuhov
Per Packet Info is an NDIS meta information embedded in the RNDIS message to communicate various offloading and scheduling operations with the backend. Due to various versions of NDIS supported by Hyper-V some of the offloading features may or may not be available. This commit brings support for IP and protocol checksum offloading as well as initial code for hardware VLAN tagging and jumbo frames where supported.
2016-09-23Setup checksum offloading instead of relying on the default configuraitonMike Belopuhov
2016-09-23Configure NDIS VLAN and MTU parameters for NVSP 2 and newer backendsMike Belopuhov
2016-09-23Fixup the NDIS_OFFLOAD_PARAMS_SIZE_6_1 definitionMike Belopuhov
2016-09-23Improve error handling when we fail to send the RNDIS messageMike Belopuhov
2016-09-23Specify a page size boundary for Tx segmentsMike Belopuhov
2016-09-23Add quirk to allow Yamaha UR22 to attach as uaudio(4). FromAlexandre Ratchov
Michael W. Bombardieri <mb at ii.net>. Thanks!
2016-09-23syncAlexandre Ratchov
2016-09-23Add Yamaha UR22 audio interface.Alexandre Ratchov
From Michael W. Bombardieri <mb at ii.net>, thanks!
2016-09-23kern.arandom no longer existsTheo de Raadt
from rob pierce
2016-09-22Stop pushing version & cfdata into as entropy, since the contents areTheo de Raadt
known and we rely on the bootpath to prime us anyways. This also solves the issue raised by kettenis, of version potentially being non-word aligned ok kettenis djm
2016-09-22Remove some unused cruft from iwm, including a local namespace-pollutingStefan Sperling
definition of an ieee80211_tu_to_usec() macro...
2016-09-22Simplify assignment of sgi_ok variable in iwm_setrates(). No functional change.Stefan Sperling
2016-09-22Fix indentation of a break statement. No binary change.Jonathan Gray
2016-09-21If not set, set hw_vendor to the name of the first pvbus.Reyk Floeter
This sets hw.vendor to "OpenBSD" if running on vmm(4) because it doesn't provide an SMBIOS. OK mikeb@
2016-09-21Always set the bit which allows RTS in iwm's LQ command.Stefan Sperling
This bit was only set in 11n mode previously. ok sthen@
2016-09-21Make iwm protect the session during association more like Linux does it.Stefan Sperling
ok sthen@
2016-09-21Properly support the mac context command in iwm. This was wrong in many ways.Stefan Sperling
This commit includes style fixes as well as actual bug fixes. Remove the global in_assoc flag from the softc. We can just pass a fixed argument to functions to indicate whether we're already associated. Remove in_tfsid from the softc as well. It was implicitly set to zero and never changed. A corresponding macro already exists so use it instead. Always copy the BSSID into the mac context command, as the Linux driver does. This helps the firmware during association. Set the firmware state to 'associated' once we've moved to RUN state and our assoc ID is known. Earlier versions of iwm used to set the firmware to 'associated' but this was disabled in r1.91 since it didn't work correctly due to bugs which are now fixed. Use live DTIM information obtained from the AP, rather than using the default DTIM period of our wireless stack. Check return values of functions called after moving to RUN state. ok sthen@
2016-09-21Make iwm return EBUSY from its ic_ampdu_rx_start() handler andStefan Sperling
call the functions provided by the wireless stack to accept or refuse BA agreements depending on the status returned by firmware. ok sthen@
2016-09-21For the keep-alive period in iwm's power command, use the DTIM periodStefan Sperling
specified by the AP, rather than the default DTIM period of our wireless stack (which is not applicable when running as a client anyway). And tell the firmware to disable power-saving. ok sthen@
2016-09-21Copy the AP's actual EDCA parameters into iwm's mac context commandStefan Sperling
rather than some fixed values present in this file since r1.1. Allows the firmware to properly time its transmissions in 11n networks. ok sthen@
2016-09-21Add the BSS's basic rates to iwm's LQ command, not all the rates.Stefan Sperling
Makes the firmware use appropriate Tx rates for ACKs.
2016-09-21SierraWireless MC7455.Martin Pieuchot
From Yannick Gravel, ok phessler@
2016-09-21regenMartin Pieuchot
2016-09-21SierraWireless MC7455Martin Pieuchot
from Yannick Gravel, ok phessler@
2016-09-21Remove a hack now that the USB stack correctly set the maximum packetMartin Pieuchot
size based on the device speed. Tested by and ok jsg@, mlarkin@
2016-09-20Mostly cosmetic tweaks to macros involved in iwm(4) power-saving features.Stefan Sperling
Remove the unused struct iwm_powertable_cmd. Fix typos in comments. Add macros for default power-save Tx/Rx timeout values (from iwlwifi).
2016-09-20Not needed anymoreMike Belopuhov
2016-09-20Switch to the new NDIS headerMike Belopuhov
2016-09-20Add a new NDIS headerMike Belopuhov
2016-09-20Add a missing status defineMike Belopuhov
2016-09-20Attach event counterMike Belopuhov
2016-09-20Add an API to hook up event countersMike Belopuhov
2016-09-19Make this build again.Mark Kettenis
2016-09-19Correctly check for valid maximum packet size.Martin Pieuchot
from jsg@