summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2019-02-27Make iwm(4) use CTS-to-self for HT protection if the AP requests this,Stefan Sperling
rather than always using RTS for HT protection.
2019-02-27Make xhci_ring_produce() check the previous TRB to find out if itPatrick Wildt
needs the Chain Bit set or not instead of using the last parameter, which is used to mark the last TRB in a USB transfer, not in a TD. To make that work we need to setup the recently acquired TRB before calling xhci_xfer_get_trb() the next time. Thus setting up the initial TRB has to happen right away. To kick the transfer off we simply flip the toggle bit on the first TRB right at the end. Fixes regression for jcs@, dhill@ and stsp@ Initially discussed with mpi@ ok stsp@
2019-02-27Implement support for dynamic RTS threshold in MiRA.Stefan Sperling
Improves throughput and latency on 11n networks. Tested by myself, jmc@, jcs@, phessler@, benno@
2019-02-27Fix iwn(4) scan misreporting the channel of wifi networks in some situations.Stefan Sperling
Problem noticed by jmc@
2019-02-26tweak the mbuf loading in the tx path so it's easier to read.David Gwynne
count mbuf load failures as output errors so i can see if that's a problem (it's not, but at least i can see it isn't now).
2019-02-26Re-enable interrupts on resume with RF switch disabledkn
When disabling the switch, suspending and eventually resuming again with wifi still off, re-enabling the switch has no effect due to interrupts being disabled completely. To ensure seemless operation, explicitly enable interrupts during hardware initialization iff the switch is disabled. While here, initialize the interrupt mask up front to avoid clearing the previously set mask in any case. OK mlarkin, Feedback and OK ststp
2019-02-26i forgot to commit a regen after fixing some bcm entriesDavid Gwynne
2019-02-26don't let rxr completely fill the rxr ring.David Gwynne
at the moment there are 256 slots on the right. if rxr raises the high watermark to 256, we overwrite ring entries.
2019-02-26put the rx buffer at the end of the cluster.David Gwynne
makes m_prepend later less likely to allocate a new mbuf.
2019-02-26avoid a deadlock in ixl_down when calling ifq_barrier.David Gwynne
this is particularly noticable on sparc64 when you reboot. ok jmatthew@
2019-02-26put the rx buffer at the end of the mbufDavid Gwynne
this should give a bit of space if the packet needs an m_pullup. care is taken to ensure the packet is still aligned for the ip stack. ok and tweaks claudio@
2019-02-24get rid of an unused softc memberDavid Gwynne
2019-02-24Dynastream ANTUSB-2 works well on uscom(4), from Jan Klemkow.Patrick Wildt
2019-02-24regenPatrick Wildt
2019-02-24Dynastream ANTUSB-2, from Jan Klemkow.Patrick Wildt
2019-02-24Rework iwm(4) Tx rate selection.Stefan Sperling
Ask firmware to retry at a constant Tx rate instead of successively lower rates. This provides better feedback to Tx rate scaling algorithms in our kernel and thus increases Tx throughput, especially on clean channels. Make the driver fall back to CCK rates on 2 GHz channels if 11n MCS don't work. Previously, we were relying on firmware to do this for us. Tested on 7260, 7265, 8260, 8265 by me, jcs@, tb@, solene@, Matthias Schmidt.
2019-02-22Allow ssdfb(4) to be mmap(2)-able so that we can use its framebufferPatrick Wildt
from the userland. Also allow changing the brightness levels so that it can even be turned off to save power and to prevent burn in.
2019-02-21Transfers that span multiple TRBs which wrap around the ring andPatrick Wildt
thus have the Link TRB inbetween must have the Chain Bit set in the Link TRB. Otherwise xHCI controllers might think that the transfer ends at that point. Fixes an issue that was most prominently seen as Invalid CSW error when using umass0 on octeon and i.MX8M. Tested by visa@ ok mpi@
2019-02-21get rid of atomic_foo ops in the tx start and completion paths.David Gwynne
atomics were used to coordinate updates to the number of available slots on the tx ring. start would use what was available, and txeof (completion) would add back freed slots. start and completion update a producer and consumer index respectively, so we can use those with the size of the ring to calculate space instead. while here i simplified what txeof does a fair bit, which combined with the removal of the atomics gives us a bit of a speed improvement. hrvoje popovski reports up to a 20% improvement in one environment, but 5 to 10 is probably more realistic. ive had this in a tree since 2017, but mpi's "Faster vlan(4) forwarding?" post made me dig it out and clean it up. ok jmatthew@
2019-02-20When adding a wsmux device to an existing wsmux device usinganton
ioctl(WSMUXIO_ADD_DEVICE), two distinct locks of the same type are acquired. Thus, witness will emit warning. Since acquiring two different locks of the same type is harmless in this context, relax the witness check by flagging the locks as RWL_DUPOK. ok visa@ Reported-by: syzbot+249e483406a1f7843915@syzkaller.appspotmail.com
2019-02-20Add support for current limit regulators in addition to the voltagePatrick Wildt
regulators we already support. The GPIO-based regulators are rather independent of the type, we only need to know the type to check the upper and lower limits. With feedback from kettenis@
2019-02-20Reject negative input from userland in spkrioctl(). One of the argumentsanton
are later passed to timeout_add() which panics if the given ticks are negative. While here, clamp arguments in pcppi_bell() in order to prevent overflow. ok visa@ Reported-by: syzbot+23089c40a85aa70bed6f@syzkaller.appspotmail.com
2019-02-20fix the name of some BCM57417 and BCM57416 partsDavid Gwynne
from msaitoh
2019-02-20regenDavid Gwynne
2019-02-20the broadcom BCM57811_VF device id should be 0x163f, not 0x16efDavid Gwynne
technically 0x16ef is for "BCM57416 NetXtreme-E RDMA Partition". from msaitoh ok jmatthew@
2019-02-19Fix a cosmetic issue in athn(4)'s bpf(4) tap.Stefan Sperling
tcpdump -i athn0 -y IEEE802_11_RADIO was showing a SHORTPRE flag on most frames because a PHY type check was missing from the bpf tap code path. Short preamble only applies to 2, 5.5, and 11 MBit/s CCK frames.
2019-02-19Make ifconfig(8) display whether bwfm(4) firmware is using 802.11ac.Stefan Sperling
ok patrick@ mpi@
2019-02-19whitespace nitsanton
2019-02-19favor C99 initializers for improved grepability; ok mpi@anton
2019-02-18In the voltage regulator getter we need to actually check the GPIOPatrick Wildt
pin before setting the "pin is high" bit in the index for the states. Otherwise the index always has all possible bits sets. ok kettenis@
2019-02-18Serialize access to the list of attached child devices belonging to aanton
wsmux. When invoking wsevsrc_* functions on a attached child device, underlying driver can sleep; this introduces a race where another thread is able to modify the list leading to all kinds of corruptions. ok visa@ Reported-by: syzbot+03f7377a9848d7d008c9@syzkaller.appspotmail.com
2019-02-18regenKevin Lo
2019-02-18Add another PCI ID for Intel Dual Band Wireless AC 9560, found inKevin Lo
thinkpad x1 extreme. ok stsp@
2019-02-17Publish new attached device once it is fully initialized.Martin Pieuchot
Should prevent a race seen by florian@ where userland emits an USB_DEVICEINFO ioctl(2) for a device whose product/vendor names haven't yet been filled. ok florian@
2019-02-14HCCPARAMS1 register CFC and SEC values are 1 bit.Marcus Glocker
ok mpi@
2019-02-12Add Allwinner V3s support. From SASANO Takayoshi.Mark Kettenis
2019-02-10Add Allwinner V3s support. Also update some Allwinner A80 pin names toMark Kettenis
what is used by more recent Linux kernels. Partly from SASANO Takayoshi.
2019-02-10Handle "broken-cd" as "non-removable" for now. This will generate someMark Kettenis
error messages if a card is absent from the slot, but other workarounds are much more complicated. From SASANO Takayoshi.
2019-02-07Consistently use m_freem(9). This fixes possible leaks in a fewPatrick Wildt
error cases.
2019-02-07There's a task ring for executing commands in a sleep-safe context.Patrick Wildt
This task is used to deliver mbufs (for events, not data), but it's possible that the queue overruns. In that case it does leak mbufs. For now, assert the size to see if we hit the issue.
2019-02-06Rework fec(4). I have written this driver in 2012 as my first everPatrick Wildt
ethernet controller driver. Handling of descriptors and buffers has not been great. There was no way to recover from a full tx queue. This introduces a mechanism akin to dwxe(4) and tsec(4) and fixes that. On rd we now map mbufs directly. On tx we can do that as well for newer SoCs. The i.MX6 Q/DL generation still needs a bounce buffer on tx for proper alignment. Tested with bluhm on Cubox-i (armv7) and Hummingboard Pulse (arm64)
2019-02-04Turns out we do need to handle control messages that exceed MLEN, soMark Kettenis
allocate a cluster if the message is larger than that. Fixes a panic on shutdown on my Asus X205TA. ok patrick@, stsp@
2019-02-03Add mvgicp(4), a driver for the Marvell extension to the GIC thatPatrick Wildt
allows triggering SPI interrupts by doing memory transactions. This was already partially implemented in mvicu(4) and is now outsourced into its own driver since we need better initialization when booting using u-boot. Also implement new and legacy bindings in mvicu(4), relying on the new mvgicp(4) driver. ok kettenis@
2019-02-01free size for wscons_event; ok deraadt@ visa@anton
2019-02-01Complete athn(4) noisefloor calibration code and enable it.Stefan Sperling
Update default/min/max noisefloor values to those used by Linux ath9k. Tested by jmc, juanfra, kn, and myself, on 9280 and 9271 devices.
2019-02-01Print xhci version in hex, from sc.dying at gmail.Martin Pieuchot
2019-02-01In wskbdclose(), use the same logic as in wskbdopen() to determine ifanton
the device was opened in write-only mode. Relying on me_evar being NULL does not work if the wskbd device was opened first followed by opening a wsmux device. Closing the wskbd device first at this stage would cause the wscons_event queue inherited from the wsmux device to be freed. This in turn could cause a panic if an ioctl(WSMUXIO_INJECTEVENT) command is issued to the wsmux device. ok deraadt@ visa@ Reported-by: syzbot+ed88256423ae8d882b8b@syzkaller.appspotmail.com
2019-02-01fix up calculation of our physical function id, making the second portJonathan Matthew
on dual port cards work much better. ok dlg@
2019-02-01Fix lost interrupts in fec(4). Apparently the tick that talks to thePatrick Wildt
phy to check the media status did not only ack the MII interrupt, but also all the others. Thus it could happen that the TX completion was not seen by the interrupt handler, leading to full TX queues. Also, the fec(4) interrupt handler acked more than it handles, thus possibly also acking the MII interrupt. Found with bluhm@ on his new arm64 regression setup. ok bluhm@
2019-01-31Fix compilation of amd64 kernel when optimization is disabled.Todd C. Miller
C99 inline semantics resulted in undefined symbols. OK deraadt@ mpi@ dlg@