summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2021-03-31Make ddb's dependency on libz explicit.Visa Hankala
OK deraadt@ mpi@
2021-03-31syncStuart Henderson
2021-03-31Remove redundant "HUAWEI Mobile" in usbdevs strings, mention radioStuart Henderson
technology where known. ok deraadt
2021-03-31Introduce UAO_USES_SWHASH() and use tabs instead of spaces in #defines.Martin Pieuchot
No functionnal change, reduce the difference with NetBSD. ok jmatthew@
2021-03-30fix typos in commentsStuart Henderson
2021-03-30Handle systems, such as the Dell Precision 3640, that accessMark Kettenis
GenericSerialBus operating regions witout checking whether they're really available. This needs to work on RAMDISK kernels as well. Since we don't want to pull in the i2c subsystem on those, provide a separate and much simpler dummy implementation of the GenericSerialBus access code when SMALL_KERNEL is defined. ok tb@
2021-03-30Register the PCI variant of dwiic(4) with acpi(4).Mark Kettenis
ok tb@
2021-03-30Some cards announce support for the NTB16 format, but that support does notPatrick Wildt
work. Hence, add support for NTB32 in the transmit path. We already have support for NTB32 in the receive path. We detect the supported format on boot and can then decide on transmit which format to use. From ehrhardt@ with gerhard@ Tested by jan@ ok sthen@
2021-03-30Some umb(4) devices require the NDP pointer behind the NDP datagram.Patrick Wildt
From gerhard@ "broadly OK" sthen@
2021-03-30[ICMP] IP options lead to malformed replyAlexandr Nedvedicky
icmp_send() must update IP header length if IP optaions are appended. Such packet also has to be dispatched with IP_RAWOUTPUT flags. Bug reported and fix co-designed by Dominik Schreilechner _at_ siemens _dot_ com OK bluhm@
2021-03-30Move tx/rx descriptors into their own structs.Kevin Lo
This is a first step toward making rge work with multiple queues and interrupts. Only one queue is currently used. While here, update the RTL8125B microcode. ok jmatthew@
2021-03-29Turns out the PCIe DARTs support a full 32-bit device virtual address space.Mark Kettenis
Adjust the region managed by the extend accordingly but avoid the first and last page. The last page collides with the MSI address used by the PCIe controller and not using the first page helps finding bugs. ok patrick@
2021-03-29combine umb_products and umb_fccauth_devs into one umb_quirks tableStuart Henderson
ok gerhard@
2021-03-29Fix IA32_EPT_VPID_CAP_XO_TRANSLATIONS specificationdv
Per Intel SDM (Vol 3D, App. A.10) bit 0 should be read as a 1 if enabled. From Adam Steen. ok mlarkin@
2021-03-28Since ipw(4) doesn't call into net80211_newstate() the interface link stateStefan Sperling
must be updated by the driver in order to get packets to flow. In case of WPA the link state was updated as a side-effect of a successful WPA handshake. This commit fixes the WEP and plaintext cases. Problem reported and fix tested by Riccardo Mottola.
2021-03-28Add vid/pid table to umb(4) allowing matching to alternate configStuart Henderson
Some devices present multiple configurations and the one chosen by default is not always usable - for example, some have an CDC ECM config that does not work with our cdce(4) - allow overriding to a specific config in those cases. From gerhard@ with tweaks to comments by me, ok patrick@
2021-03-28syncStuart Henderson
2021-03-28add pid for Dell DW5821e and HUAWEI ME906s LTE, ok patrick@Stuart Henderson
2021-03-27Make sure that all CPUs end up with the same bits set in SCTLR_EL1.Mark Kettenis
Do this by clearing all the bits marked RES0 and set all the bits marked RES1 for the ARMv8.0. Any optional features introduced in later revisions of the architecture (such as PAN) will be enabled after SCTLR_EL1 is initialized. ok patrick@
2021-03-27Add ARMv8.5 instruction set related CPU features.Mark Kettenis
ok patrick@
2021-03-27Fix SDMMC_DEBUG buildkn
- Replace undefined SDMMCDEVNAME macro with usual DEVNAME from sdmmcvar.h - typofix struct member name
2021-03-27trim the FCS off Ethernet packets before sending them up the stack.David Gwynne
Jurjen Oskam on tech@ found that ure in a veb caused these extra fcs bytes to be transmitted by other veb members. the extra bytes aren't a problem usually because our network stack ignores them if they're present, eg, the ip stack reads an ip packet length and trims bytes in an mbuf if there's more. bridge(4) masked this problem because it always parses IP packets going over the bridge and trims them like the IP stack before pushing them out another port. veb(4) generally just moves packets around based on the Ethernet header, by default it doesn't look too deeply into packets, which is why this issue popped out. it is more correct for ure to just not pass the fcs bytes up. ok jmatthew@ kevlo@
2021-03-26Return EOPNOTSUPP for unsupported ioctlskn
Match what apm(4/macppc) says and make apmd(8) log an approiate warning when unsupported power actions are requested. Merge identical cases while here. This syncs with the apm ioctl handlers on loongson and arm64.
2021-03-26Fix "mach dtb" return code to avoid bogus bootkn
Bootloader command functions must return zero in case of failure, returning 1 tells the bootloader to boot the currently set kernel iamge. "machine dtb" is is the wrong way around so using it triggers a boot. Fix this and print a brief usage (like other commands such as "hexdump" do) while here. Feedback OK patrick
2021-03-26Fix errno, merge ioctl caseskn
The EBADF error is always overwritten for the standby, suspend and hibernate ioctls, only the mode ioctl has it right. Merge the now identical casese while here. OK patrick
2021-03-26Flag sensors as invalid on bogus readskn
Follow-up to the previous commit: This driver continues to report stale hw.sensors values when reading them fails, which can easily be observed on a Pinebook Pro after plugging in the AC cable, causing the hw.sensors.cwfg0.raw0 (battery remaining minutes) value to jump considerably one or two times before stalling and becoming incoherent with the rest. Flag sensors invalid upfront in apm's fashion and mark them OK iff they yield valid values; this is what other drivers such as rktemp(4) do, but the consequence/intention of SENSOR_FINVALID is sysctl(8) and systat(8) skipping such sensors (until AC gets plugged off again). OK patrick
2021-03-26Push kernel lock within rtable_add(9) and rework it to return 0 in themvs
case when requested table is already exists. Except initialization time, route_output() and if_createrdomain() are the only paths where we call rtable_add(9). We check requested table existence by rtable_exists(9) and it's not the error condition if the table exists. Otherwise we are trying to create requested table by rtable_add(9). Those paths are kernel locked so concurrent thread can't create requested table just after rtable_exists(9) check. Also rtable_add(9) has internal rtable_exists(9) check and in this case the table existence assumed as EEXIST error. This error path is never reached. We are going to unlock PF_ROUTE sockets. This means route_output() will not be serialized with if_createrdomain() and concurrent thread could create requested table. Table existence check and creation should be serialized and it makes sense to do this within rtable_add(9). This time kernel lock is used for this so it pushed down to rtable_add(9). The internal rtable_exists(9) check was modified and table existence is not error now. Since the external rtable_exists(9) check is useless it was removed from if_createrdomain(). It still exists in route_output() path because the logic is more complicated here. ok mpi@
2021-03-26Push kernel lock down to rt_setsource() to make `ifa' dereference safe.mvs
Netlock doesn't make sense here because ifa_ifwithaddr() holds kernel lock while performs lists walkthrough. This was made to decrease the future diff for PF_ROUTE sockets unlocking. This time kernel lock is still held while we perform rt_setsource(). ok mpi@
2021-03-26Initialize error variable in dtread().Alexander Bluhm
OK mpi@
2021-03-26Only install route with label, fix route leak on destroykn
ifconfig mp* mplslabel N" validates the label both in ifconfig(8) and each driver's ioctl handler, but there is one case where all drivers install a route without looking at the label at all. SIOCSLIFPHYRTABLE in all three drivers just validates the rdomain and sets the label to itself (0) such that the route is (re)installed accordingly. None of the driver's helper functions dealing with labels and routes validate labels themselves but instead expect the callees, e.g. the ioctl handler to do so. That means we can install routes for the explicit NULL label in non-default routing tables but are never able to clean them up without reboot. Fix this by adding the inverse of mp*_clone_destroy()'s label check to the routines installing the MPLS route to avoid bogus ones in the first place. OK claudio
2021-03-26Remove parenthesis around return value to reduce the diff with NetBSD.Martin Pieuchot
No functional change. ok mlarkin@
2021-03-26Fix wrong sequence number wrap in ieee80211_recv_auth().Stefan Sperling
IEEE 802.11 sequence numbers wrap around at 0xfff, not 0xffff. ok phessler@ kevlo@
2021-03-26regenjan
2021-03-26Add PCI ID for Intel X710 10G SFP+ NICjan
ok patrick@
2021-03-26regenjan
2021-03-26Add missing PCI ID for Intel X710 SFP+ NICjan
ok patrick@
2021-03-25Permit kern.somaxconn when the unix pledge is used. Previously this was onlyAaron Bieber
allowed when inet was used. This lets Go programs use 'unix' without also including 'inet'. from Josh Rickmar ok / tree review from deraadt@, commit message cluestick from tb@
2021-03-25an invalid value of `mcs' may come from the hardware so adjust code so that theRicardo Mestre
value is only used after checking if it's valid or not. CID 1502921 OK stsp@ phessler@
2021-03-25Provide apm(4/arm64) with battery informationkn
apm merely provides an all zero/unknown stub for those values, e.g. apm(8) output is useless. Hardware sensors however provide this information: hw.sensors.cwfg0.volt0=3.76 VDC (battery voltage) hw.sensors.cwfg0.raw0=259 (battery remaining minutes) hw.sensors.cwfg0.percent0=58.00% (battery percent) Make cwfg(4) copy those over using apm_setinfohook() for apm to show it: Battery state: high, 58% remaining, 259 minutes life estimate A/C adapter state: not known Performance adjustment mode: auto (408 MHz) In cwfg's update routine, to keep values coherent, always reset them to zero/unknown and only set those that came from a valid reading. Input OK jca
2021-03-25remove uneeded includes in md armv7 filesJonathan Gray
based on include-what-you-use suggestions
2021-03-24syncStuart Henderson
2021-03-24remove vendor name (Dell) repeated in product nameStuart Henderson
2021-03-24Improve the tap detection mechanism.Ulf Brosziewski
Revision 1.29 of wstpad.c has removed the 'maxdist' checks for multi-finger taps. While this change makes tap detection more reliable, and does not affect inputs intended for pointer movement, it might interfere with short scroll gestures. This version reorganizes the filtering code, and reintroduces a weaker version of those checks for MT touchpads.
2021-03-24cd9660, mfs: do not hide generic vop functions behind #defineSebastien Marie
It makes clearer which vop functions are real fileystem-implementations and which one are only stubs. No functional changes are intented. ok visa@
2021-03-24make some `struct vops' members explicitly NULL instead of implicitly NULLSebastien Marie
ok mpi@
2021-03-24The logic in mmrw() to check whether an address is within directAlexander Bluhm
map was the wrong way around. The && prevented an EFAULT error and could pass userland addresses as kernel source to copyout(9). The kernel could crash with protection fault due to an invalid offset when reading /dev/kmem. Also make the range checks stricter. Not only the start address must be valid, but also the end address must be within the region to be copied. Note that sysctl kern.allowkmem=0 makes the bug unreachable by default. OK deraadt@
2021-03-24Make tap detection less restrictive for multi-finger taps.Ulf Brosziewski
In order to distinguish tap gestures from short movements, the mechanism checks whether the distance between the first and the last position of a touch exceeds the 'maxdist' limit. Some touchpads provide unreliable coordinates when more than one contact is being made simultaneously, and in this case the filter may be too strong - and superfluous, because only one-finger contacts should trigger pointer movement.
2021-03-24Define a USB quirk for devices that need to keep their pipes open atJoshua Stein
all times, before the device is enabled and after the device is disabled by wscons. This was originally needed by umt for the Microsoft Surface Type Cover to avoid it resetting (or at least detaching and reattaching) when the touchpad was touched while at the console. A similar problem occurs with the Pinebook Pro's keyboard when switching from X to the console due to the touchpad getting disabled, so add it to ums as well. with and ok kurt
2021-03-24regenJoshua Stein
2021-03-24add HAILUCK KeyboardJoshua Stein
from kurt