summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2020-05-09aml_die() doesn't return, hint the compilerJeremie Courreges-Anglas
Avoids an uninitialized variable warning. ok kettenis@
2020-05-09Initialize the srp_ref in the non-MP version of srp_enterJeremie Courreges-Anglas
Silences an uninitialized warning in net/art.c "reasonable" jmatthew@, ok mpi@
2020-05-09Use MSI-X interrupts where available. The first vector is used forJonathan Matthew
events and command completions as that's the only vector they can go to. tx/rx queues are mapped to subsequent vectors. ok mpi@ dlg@
2020-05-09No need to look at _STA here, all we care about is _PSR.Jeremie Courreges-Anglas
Rename surrounding code to reflect that. ok kettenis@
2020-05-08Move parsing of _CRS into acpi(4) and pass the parsed address and interruptMark Kettenis
information in struct acpi_attach_args. ok mpi@
2020-05-08Do not wait indefinitely for flushing when closing a tty.Martin Pieuchot
This prevent exiting processes from hanging when a slave pseudo terminal is close(2)d before its master. From NetBSD via anton@. Reported-by: syzbot+2ed25b5c40d11e4c3beb@syzkaller.appspotmail.com ok anton@, kettenis@
2020-05-07post-6.7 development continuesTheo de Raadt
2020-05-06Do sanity checks in ip6_pullexthdr() preventing a panic in m_copydata(9).Martin Pieuchot
An invalid/corrupted hop6 option in rip6_input()/ip6_savecontrol() could lead m_copydata(9)s' check to trigger a panic. Fix from maxv@NetBSD where the problem was also reported by syzkaller. Reported-by: syzbot+3b07b3511b4ceb8bf1e2@syzkaller.appspotmail.com Reported-by: syzbot+7ee0eb2691d507fcad2e@syzkaller.appspotmail.com ok sashan@, dlg@, claudio@, deraadt@
2020-05-05Purge the ic_bss->ni_savedq mbuf queue when a wireless interface goes down.Stefan Sperling
Purging this queue prevents a panic which occurs when a WPA2-enabled athn(4) hostap interface is reconfigured while this queue contains frames. In hostap mode, this queue contains group-addressed (broadcast) frames which are buffered for clients sleeping in powersave state. Frames on this queue are transmitted when it is time to send another beacon, at which point in time sleeping clients wake up to receive such frames. The panic message is "key unset for sw crypto", which can be explained as follows: Group keys are cleared when the interface goes down. The beacon Tx interrupt handler gets triggered by hardware when the interface comes back up. This handler attempts to encrypt the queued frames for transmission, resulting in the above panic since the group key has been zeroed out. This panic has been observed with athn(4) by Jan Stary and Ted Patterson, and Ted has confirmed that this patch fixes the problem. ok kettenis@ (with the caveat that it's been a long time since he put our AP-side powersave support into a working state)
2020-05-05Revert parts of CVS commit Jdqd26bn9Ev6aFMc ("Fix processing of compressedStefan Sperling
block ack notifications sent by iwn(4) firmware"). This effectively reverts changes in how the driver interacts with firmware and fixes connections getting stuck for unknown reasons, in two known cases: One with an Airport Extreme 6th gen AP and another with a b-box 3V+ modem using a Sagemcom MAC address for its built-in AP. The Sagemcom case was observed by myself. The Airport case was reported by Jeremy O'Brien via abieber@. I am committing this now to prevent the problem from affecting 6.7 release even though we don't yet understand what caused the problem. ok mpi@
2020-05-04Remove redundant code testing if a terminal is a usb stream.Alexandre Ratchov
Fixes coverity CID 1492830. ok sthen, deraadt
2020-05-04leave -beta.Theo de Raadt
2020-05-04Check v6 availablilty mask instead of v4.Gerhard Roth
go for it deraadt@
2020-05-02Get bus number from _CRS.Mark Kettenis
ok sthen@, deraadt@
2020-05-02Fix buglet in previous commit; use time from the struct timeval that wasMark Kettenis
passed in when setting the RTC time instead of the global time_second. ok mpi@
2020-05-01Use the same inittodr()/resettodr() implementation as onMark Kettenis
amd64/arm64/armv7/i386/hppa/sparc64 and move it to the end of machdep.c. Wrap the existing time_read and time_write hooks into something that can be used as a todr_handle. ok mpi@
2020-05-01Use the same inittodr()/resettodr() implementation as onMark Kettenis
amd64/arm64/armv7/i386/sparc64 and move it to the end of machdep.c. Rework the actual implementation for the MC14818 compatible RTC into something that can be used as a todr_handle just like on amd64. ok mpi@
2020-05-01Prevent divide-by-zero in MiRA which I managed to trigger with iwn(4).Stefan Sperling
ok deraadt@
2020-04-30If there's only one input (output) name it simply "input" ("output")Alexandre Ratchov
Besides making things simpler, this allows libsndio to figure out that this is a control affecting all inputs (outputs) that needs to be exposed.
2020-04-30Fix return value of dma_fence_wait(). Seems to fix occasionalMark Kettenis
synchroniation problems when playing youtube videos in chrome. ok jsg@
2020-04-30Use "inputs" class instead of "record"Alexandre Ratchov
There's no reliable way to decide whether a control must belong to "inputs" or to "record". In other words both classes were used for the same thing. Furthermore we've no "play" class which tends to make things more confusing.
2020-04-30Use "dac" instead of "play" in mixer control namesAlexandre Ratchov
All other drivers use "dac" and libsndio needs the control name to be "dac" for the control to be exposed.
2020-04-30Set terminal and clock names after all units are parsedAlexandre Ratchov
Makes the code simpler and more flexible as the naming is done in a single place where the full units list is available.
2020-04-30Use macros instead of hardcoded "play" and "record" string constantsAlexandre Ratchov
No object change.
2020-04-30Fix use of uninitialized 'wh' variable in error path of ar5008_rx_process().Stefan Sperling
This fix simplifies HW decrytion error checking: Frame header contents aren't relevant because we are going to drop frames that had errors in any case. I made a mistake by trying to add an exception for multicast frames at this point. Frame header contents might not even be valid. This problem was introduced with CCMP hardware offload support and detected by Coverity (CID 1492755). ok mestre@ kevlo@
2020-04-30drm/amd/display: Not doing optimize bandwidth if flip pending.Jonathan Gray
From Yongqiang Sun de32c6ad7a4fcb986e0e4f39d7497948b734b8c7 in linux 4.19.y/4.19.119 9941b8129030c9202aaf39114477a0e58c0d6ffc in mainline linux
2020-04-29Enable a bunch of drivers needed for full Raspberry Pi 2/3 support.Mark Kettenis
2020-04-29Enable the trickle charger after setting the control register.Patrick Wildt
2020-04-29Update the trickle charger diode defines based on the datasheet, andPatrick Wildt
enable the trickle charger.
2020-04-29Writing and reading time has been broken in abcrtc(4) as well. I wasPatrick Wildt
being too clever trying to use the SMBus block reads/writes. Instead the registers were written with an offset: Seconds were stored in the minutes, minutes were stored in the hours. No wonder time was ticking so slowly. Removing the bogus length field and simply writing/reading the time register values is enough. ok kettenis@
2020-04-29Configure abcrtc(4)'s trickle charger. This uses informationPatrick Wildt
from the device tree to configures the RTC to be able to charge a connected battery or capacitor. ok kettenis@
2020-04-29The function to write to abcrtc(4)'s configuration registersPatrick Wildt
unfortunately did not write the data to the register, but the register offset. Oops. ok kettenis@
2020-04-29Let the armv7 bus_dma layer and simplebus(4) implementation deal withMark Kettenis
DMA remapping in the same way as arm64. This relies on the dma-ranges property in the device tree and allows us to get rid of the hack for the Raspberry Pi in the dwctwo(4) driver. Note that this does not include the hack in simplebus(4) that we have on arm64 since firmware that has the dma-ranges is in widespread use now. ok patrick@
2020-04-29Add the 'nomimo' nwflag which disables MIMO in 11n mode.Stefan Sperling
This flag restricts a wireless driver to MCS0 - MCS7 for both transmission and reception. It can be set to work around packet loss in 11n mode caused by unused antenna connectors on a MIMO-capable wireless network device. man page tweak from tracey@ ok deraadt@
2020-04-29According to the SDIO Simplified Specification 3.0, a tuple lengthPatrick Wildt
(aka link field) of 0 specifies an empty tuple body. This implies that a tuple length of 0 is actually allowed, so we don't need to error out if we encounter one. Seen on an SDIO-connected ath10k. ok kettenis@
2020-04-29Use the same inittodr()/resettodr() implementation as onMark Kettenis
amd64/arm64/armv7/sparc64 and move it to the end of machdep.c. Rework the actual implementation for the MC14818 compatible RTC into something that can be used as a todr_handle just like on amd64. ok sthen@
2020-04-29remove some trailing whitespace. no functional change.David Gwynne
2020-04-29Ensure that if we are doing a delayed write with a NOCACHE buffer, weBob Beck
clear the NOCACHE flag, since if we are doing a delayed write the buffer must be cached or it is thrown away when the "write" is done. fixes vnd on mfs regress tests. ok kettenis@ deraadt@
2020-04-28Calculate divisor for i.MX8M composite clocks. So far we have setPatrick Wildt
fixed values for the divisors, but the imxesdhc(4) nodes for SD Cards usually have an assigned clock rate of 200 MHz instead of 400 MHz. So instead of just clearing the divisor, we should set it according to what is asked. This also allows us to add the clock for the second imxesdhc(4) node to the list, which I have previously skipped, since otherwise the controller would have been clocked too high. ok kettenis@
2020-04-28Enable all clocks referenced by the imxesdhc(4) device tree node. UsuallyPatrick Wildt
those are already on, since on those machines we mostly boot from SD/MMC and U-Boot prepares them for us. On machines with a WiFi on imxesdhc(4), U-Boot isn't necessarily configured to do so. Enabling the clocks is the right thing to do anyway. ok kettenis@
2020-04-28Recognize a few more clocks referenced by the i.MX8MM and i.MX8MQPatrick Wildt
imxesdhc(4) device tree nodes.
2020-04-28Use the same inittodr()/resettodr() implementation as on arm64/armv7/sparc64Mark Kettenis
and move it to the end of machdep.c. Rework the actual implementation for te MC14818 compatible RTC into something that can be used as a todr_handle. ok mpi@
2020-04-28Use the same inittodr()/resettodr() implementation as on arm64/armv7Mark Kettenis
and move it to the end of machdep.o. ok mpi@
2020-04-28Document that thread credentials are owned by curproc.Martin Pieuchot
From Vitaliy Makkoveev, ok visa@
2020-04-28Configure Tx interrupt mitigation thresholds on athn(4) devices.Stefan Sperling
ok kevlo@ mpi@
2020-04-27Enable tcpci(4).Patrick Wildt
2020-04-27Add tcpci(4) to support TCPCI-compliant USB Type-C port controllers.Patrick Wildt
A Type-C controller has multiple tasks. Even though the orientation of the plug doesn't matter for the user, it matters for the hardware. To be able to know how to route the SuperSpeed pins you need to know which way the plug is connected. Also you need to know if you're a sink/source or device/host. To get the first connection, you toggle between the modes until you find a connection. In case you see that a sink is connected, you can turn on USB Vbus to power the sink. This driver explicitly does not implement USB's Type-C state machine, but if we get more and more of these controllers it might be worth doing. Also there's no support for Power Delivery messages yet. "go for it" kettenis@
2020-04-27Add bcmclock(4) and bcmmbox(4). Fixes a hang because the clock for sdhc(4)Mark Kettenis
can't be enabled.
2020-04-27While i.MX6Q and i.MX7D's USB controller nodes claim to be compatiblePatrick Wildt
to i.MX27, they actually need different bits to be set than the i.MX27. The i.MX8MM's node instead rightfully only claims to be compatible to i.MX7D, since it's the same implementation. Thus change imxehci(4) to also match the i.MX7D compatible. ok kettenis@
2020-04-27Remove reset hack; these days the U-Boot we ship for the CuBox-i isMark Kettenis
perfectly happy without it. ok patrick@