summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2017-05-10Adapt the filter parameters to the X/Y ratio.Ulf Brosziewski
ok mpi@
2017-05-10It is unsafe to dereference ``xfer'' after calling the callback as itMartin Pieuchot
might free it. Prevent a use-after-free in various aynchronous cases. Found while looking at another user-after-free pointed out by ehrhardt@. Committing now to find if other drivers rely on this use-after-free. tb@ confirmed ubcmtp(4) is now fixed.
2017-05-10Revert r1.61 and partially 1.60. The resulting logic is currently aMartin Pieuchot
noop and prevent us from fixing real use-after-free. Since xfer->status is reset by *_device_intr_done(), checking for USBD_IOERROR cannot be true. Problem reported by tb@ because ubcmtp(4) triggers some I/O errors when multiple fingers are used.
2017-05-10Make this compile with HIDKBD_DEBUG defined.Martin Pieuchot
2017-05-08improved coordinate filtersUlf Brosziewski
ok mpi@
2017-05-088192C is the only MIMO chip supported by this driver, all others are 1T1R.Ricardo Mestre
This diff corrects dmesg to properly show that all others are 1T1R, since right now it only applies to 8188C and all others incorrectly display 0T0R. hint & OK stsp@
2017-05-08In iwm_send_cmd(), look at the generation counter instead of the STOPPED flagStefan Sperling
to determine whether the interface was reset while we were sleeping. The flag will be set if the interface is still down when the task wakes up, but the interface could already be up again in which case the flag will be cleared. ok mpi@ kettenis@
2017-05-08Unbreak the tree. I missed a header file change in my last iwm(4) commit.Stefan Sperling
2017-05-08In iwm(4) avoid locking the NIC redundantly and perform accounting ofStefan Sperling
locking and unlocking. Make sure we don't unlock 7000 family NICs while a command is being processed (later NICs apparently don't need this). Inspired by similar approaches in Linux and Dragonfly, and a patch given to me by Imre Vadasz. Tested by me on 7265 and 8260 devices, and on a 7260 device by Stefan Wollny.
2017-05-08For 8188EU chips, read the R92C_HSSI_PARAM2(0) register to detect whetherStefan Sperling
the driver needs to enable the CCK high power feature, as already done for other chips supported by urtwn(4). Same change as FreeBSD r311347. Patch submitted by Kevin Lo. Tested by me.
2017-05-08Fix R92C_TXDW4_RTSRATE_M and R92C_TDECTRL_BLK_DESC_NUM_M definitions.Stefan Sperling
Same changes as FreeBSD r311948 and r287584. Patch submitted by Kevin Lo. Tested by me.
2017-05-08Fix issues with iwm(4) firmware's retry rate table:Stefan Sperling
For a HT node, ni_txrate is always zero. We should be using ni_txmcs instead. Simplify the if-else logic to make sure of that. The mimo delimiter in the link quality command was never set. I don't know how important this is. But Linux sets it, so why not. Hardcode the lowest rate at the tail of the retry table. While debugging the old code I have encountered retry tables filled with only 'MCS 8' which is obviously not ideal. While here, fix a misspelled function prototype. Tested by kettenis@, mpi@, and Stefan Wollny ok mpi@
2017-05-07Program hardware address in dwc_gmac_init() instead of dwc_gmac_attach()Mark Kettenis
such that "ifconfig dwge0 lladdr 00:11:22:33:44:55" actually works.
2017-05-07Refactor this code to support the GMAC found on the Rockchip RK3399 alongsideMark Kettenis
the GMAC found on the Allwinner A20/A31. With this diff I can receive packets on the Firefly-RK3399. Unfortunately sending packets doesn't seem to work yet.
2017-05-06Add rkgpio(4), a driver to handle GPIOs on Rockchip SoCs.Mark Kettenis
2017-05-06Remove unused local variable such that this actually compiles.Mark Kettenis
2017-05-06Add a few GMAC related clocks and implement reset logic.Mark Kettenis
2017-05-06Configure pins and deassert resets, just in case some other board needs it.Mark Kettenis
2017-05-06add Moxa CP-104ELJonathan Matthew
ok kettenis@
2017-05-05Move dwge(4) glue into dev/fdt.Mark Kettenis
2017-05-05Add rkpinctrl(4), a driver to configure pins on Rockchip SoCs. For now,Mark Kettenis
only the RK3399 is supported.
2017-05-05Include <dev/ofw/ofw_misc.h> instead of <dev/ofw/ofw_pinctrl.h>.Mark Kettenis
2017-05-05Add glue to attach SDHC compliant controllers using the FDT. This makesMark Kettenis
the eMMC controller on the Rockchip RK3399 work.
2017-05-05Implement two quirks to support the Arasan eMMC 5.1 controller found onMark Kettenis
the Rockchip RK3399. - Make it possible to override sdhc_signal_voltage(). - Make it possible to disable double-data rate modes. ok patrick@
2017-05-05Add eMMC-related clocks.Mark Kettenis
2017-05-05Remove a DIAGNOSTIC test for a NULL pipe value inside a transfer,Jonathan Gray
mpi says a transfer can't exist without a pipe. ok mpi@
2017-05-05regenJonathan Matthew
2017-05-05add Moxa CP-104ELJonathan Matthew
2017-05-04Also pass the blk offset to disk_unbusy(), so that it can pass it toTheo de Raadt
the random subsystem as entropy. This value is pretty much unknown, and anyways our entropy input ring does not saturate from knowns. ok mikeb djm
2017-05-04Remove side effects from assignment. Fixes warning with cppcheck.Alexander Bluhm
No binary change. OK ratchov@
2017-05-04If iwm_nic_lock() cannot access the device then print "acquiring device failed"Stefan Sperling
instead of "device timeout". The latter is printed by the Tx watchdog already.
2017-05-03Byte order of IP addresses was broken on big endian machines.Gerhard Roth
MBIM already uses network byte order for IP addresses, so just use them as they are. ok stsp@, deraadt@
2017-05-03Fix a regression in iwm(4) which made 3165 devices unusable.Stefan Sperling
When MIMO support was added several entries in the rate table index enum got a wrong value. On most devices the firmware ended up using a Tx rate different from the rate net80211 asked for (which is bad, but not fatal). But on 3165 devices which do not support MIMO the firmware rightly raised a fatal error whenever the driver mistakenly asked for a MIMO Tx rate. Reported by Georgios Pediaditis, Steve Throckmorton, and Kai Wirt on misc@ Thanks to benno@ for providing 3165 hardware I could use to debug this.
2017-05-03Remove unused (and wrong) uaudio_drain() call. From Michael W.Alexandre Ratchov
Bombardieri" <mb@ii.net>.
2017-05-03style improvement from Michael W. Bombardieri <mb at ii.net>Alexandre Ratchov
2017-05-02Linux switched from a device-specific pinctrl binding to a the generic versionMark Kettenis
for Allwinner devices. Implement support for the latter such that we can use newer device trees. ok patrick@
2017-05-02Resynchronize the guest RTC via vmmci(4) on host resume from zzz/ZZZMike Larkin
(kernel part) This feature is for OpenBSD guests only. ok reyk, kettenis
2017-04-30Add rkclock(4), a driver for the Rockchip RK3399 clocks.Mark Kettenis
2017-04-30Rename Debugger() into db_enter().Martin Pieuchot
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
2017-04-30Add rkgrf(4), a driver that makes the "generic register file" of the RockchipMark Kettenis
RK3399 available to other drivers through the regmap interface.
2017-04-30Unifdef KGDB.Martin Pieuchot
It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
2017-04-29Replace sxiehci.c with more generic glue in ehci_fdt.c that is similiar inMark Kettenis
spirit to the xhci_fdt.c glue. The new code sets up any attached USB PHYs based on their "compatible" property. All the hardware supported by sxiehci.c should be supported by this new code. In addition to that this adds support for the EHCI controllers found on various Rockchip hardware such as the RK3288 and RK3399 SoCs. ok patrick@
2017-04-28Restore calculation of volume size. Accidentally removed inKenneth R Westerback
r1.25. Fixes creation of concat volumes. Noticed by and diff from Thordur I. Bjornsson via tech@ ok jsing@
2017-04-27track size of pss allocation, so that length can be passed to free(9)Theo de Raadt
ok mlarkin
2017-04-27Restore if_iwm.c r1.173 (mira retry change) which got incarcerated byStefan Sperling
the backout police even though it wasn't responsible for anything. pointed out by tb@
2017-04-27Revert if_iwm.c to the state of r1.170 because ETOOMANYDRAGONSATONCE.Stefan Sperling
Performance regression reported by deraadt@ and uvm_fault reported by fcambus@. I will be poking further at this out of tree.
2017-04-26Get rid of convoluted macros in iwm's receive code path.Stefan Sperling
Since we now sync the entire Rx DMA buffer the SYNC_RESP_STRUCT() macro which was used to sync just parts of the buffer can be replaced by assignments. The SYNC_RESP_PTR() macro was already unused so just remove it. The ADVANCE_RXQ() macro was used just once so expand it in place.
2017-04-26Remove the size argument of iwm_rx_addbuf() and use a constant internally.Stefan Sperling
All callers were passing the same constant IWM_RBUF_SIZE, which is derived from the smallest RX buffer the hardware supports (4k). Smaller sizes don't make sense anyway and larger sizes are not on our horizon for now.
2017-04-26Tell MiRA about the actual number of retries instead of pretending thatStefan Sperling
a frame which was retried N times was retried just once. This punishes retry-heavy data rates even more and should reduce latency. It does not seem to have a noticable effect on net throughput in my testing. If this change causes throughput problems for anyone, let me know. ok tb@ mlarkin@
2017-04-24Since rev 1.1 ix has attempted to require a 64 bit BAR, the test forJonathan Gray
this was wrong and was corrected at the end of last year in rev 1.140. Before then a 64 bit BAR was not enforced as the test was wrong. It turns out there exist 82598 parts which have a 32 bit BAR so change the test to only require a memory BAR and not a 64 bit memory BAR. Problem reported by Robert Blacquiere. ok mikeb@