summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2020-07-10Add "Spleen 6x12" to wsfont, a font targetted at OLED displays.Frederic Cambus
Similar to "Spleen 5x8" it only contains the printable ASCII characters (96 glyphes). The font is 2-Clause BSD licensed and is my original creation. OK patrick@
2020-07-09Move sc->sc_link initialization closer to config_found() invocationKenneth R Westerback
like all the cool drivers do.
2020-07-09Move sc->sc_link initialization closer to config_found() invocationKenneth R Westerback
like all the cool drivers do.
2020-07-09On some laptops that have a Windows Precision Touchpad (imt) andJoshua Stein
also a trackstick or separate physical buttons, imt was claiming all report ids of the ihidev device preventing the trackstick/buttons from attaching as a separate ims device on other report ids. Just claim the report ids that imt needs and let ims attach to others it may find. Fixes two Dell Latitude laptops and tested in snaps for a bit.
2020-07-09Some touchpads don't have the "maximum number of contacts" orJoshua Stein
"button type" usages, so assume some reasonable defaults rather than failing to attach. Fixes two Dell Latitude laptops and tested in snaps for a bit.
2020-07-09drm/amdgpu/atomfirmware: fix vram_info fetching for renoirJonathan Gray
From Alex Deucher fceff9423f428a62a20bb8fb8f66e6a9f906f12c in linux 5.7.y/5.7.8 d7a6634a4cfba073ff6a526cb4265d6e58ece234 in mainline linux
2020-07-09drm/amdgpu: use %u rather than %d for sclk/mclkJonathan Gray
From Alex Deucher c337fc540bb99e476e33153a9196eba4749a707a in linux 5.7.y/5.7.8 beaf10efca64ac824240838ab1f054dfbefab5e6 in mainline linux
2020-07-09drm/amd/display: Only revalidate bandwidth on medium and fast updatesJonathan Gray
From Nicholas Kazlauskas fcb408a7282302bd8b8afc6ef8db42b4eece23ee in linux 5.7.y/5.7.8 6eb3cf2e06d22b2b08e6b0ab48cb9c05a8e1a107 in mainline linux
2020-07-09drm/amd/powerplay: Fix NULL dereference in lock_bus() on Vega20 w/o RASJonathan Gray
From Ivan Mironov 13b2fe391cac70c7746e2cb68e73d99002f1cd00 in linux 5.7.y/5.7.8 7e89e4aaa9ae83107d059c186955484b3aa6eb23 in mainline linux
2020-07-09drm/i915: Include asm sources for {ivb, hsw}_clear_kernel.cJonathan Gray
From Rodrigo Vivi 95e961c6c23c35bb9f190f8d6bd13f1606de5a48 in linux 5.7.y/5.7.8 55fd7e0222ea01246ef3e6aae28b5721fdfb790f in mainline linux
2020-07-09drm/amdgpu: fix kernel page fault issue by ras recovery on sGPUJonathan Gray
From Guchun Chen 18b1cf2968e1baa883dbdf6adef6213626beaa0f in linux 5.7.y/5.7.8 12c17b9d62663c14a5343d6742682b3e67280754 in mainline linux
2020-07-09drm/amdgpu: fix non-pointer dereference for non-RAS supportedJonathan Gray
From Evan Quan 9c33bf981fab14ffbde2635d6e3d7d0818bac5a8 in linux 5.7.y/5.7.8 a9d82d2f91297679cfafd7e61c4bccdca6cd550d in mainline linux
2020-07-09drm/amdgpu: disable ras query and iject during gpu resetJonathan Gray
From John Clements 50a8cfb0e71644f2882dbfaf93150184094245bd in linux 5.7.y/5.7.8 61380faa4b4cc577df8a7ff5db5859bac6b351f7 in mainline linux
2020-07-09drm/i915/gt: Mark timeline->cacheline as destroyed after rcu grace periodJonathan Gray
From Chris Wilson 18ad3ad0b9b35370182ae4a7dbd89a77168df19e in linux 5.7.y/5.7.8 8e87e0139aff59c5961347ab1ef06814f092c439 in mainline linux
2020-07-09drm/amd/display: Fix ineffective setting of max bpc propertyJonathan Gray
From Stylon Wang b903524c8a60a3e9d5eede7fc87f1012332b929f in linux 5.7.y/5.7.8 fa7041d9d2fc7401cece43f305eb5b87b7017fc4 in mainline linux
2020-07-09drm/amd/display: Fix incorrectly pruned modes with deep colorJonathan Gray
From Stylon Wang 60c60af1adffdc4a34f4b13acc44a02ec33169b1 in linux 5.7.y/5.7.8 cbd14ae7ea934fd9d9f95103a0601a7fea243573 in mainline linux
2020-07-09Enable spleen16x32 and spleen32x64 on armv7 for GENERIC kernels.Frederic Cambus
OK kettenis@, deraadt@, patrick@
2020-07-09a couple of small tweaks that shrink the kstat code.David Gwynne
saves a few hundred bytes on both amd64 and sparc64
2020-07-07fix a copy pasto.David Gwynne
from netbsd if_ixl.c r1.39 by yamaguchi
2020-07-07Switch iwx(4) from -46 to -48 firmware.Stefan Sperling
The -48 firmware image has been available via fw_update(4) for about 4 weeks by now. It is contained in iwx-firmware-20191022p1.
2020-07-07apparently vmx(4) needs a power of 2 number of interrupts.David Gwynne
so we pass INTRMAP_POWEROF2 to intrmap_create and things are better. reported by and fixed by mark patruck. thanks :)
2020-07-07add kstat support for some of the counters the chip maintains.David Gwynne
mcx keeps a bunch of different counters relating to the port. this diff adds support for reading them off the hardware and then unpacking them into kstat_kv structs for userland to look at. jmatthew@ checked over it.
2020-07-07drm: use hi-res time to implement ktime_get(), ktime_get_real()cheloha
There seems to have been some confusion about the granularity of certain time interfaces in the Linux kernel when our DRM compatibility layer was written. To be clear: the Linux ktime_get() and ktime_get_real() interfaces are *high resolution* clocks. We should to implement them with high resolution interfaces from our own kernel. Thus, use microuptime(9) to implement ktime_get() and microtime(9) to implement ktime_get_real(). While here, ktime_get_raw_ns() should use ktime_get_raw(), not ktime_get(). Discussed with kettenis@ and jsg@. ok jsg@
2020-07-07don't try and be too clever in the kstat update timeout.David Gwynne
2020-07-07remove some old code from a previous version of the kstat diff.David Gwynne
ixl(4) is only enabled on 64bit archs, so we don't need a 32bit fallback for the 48 and 64 bit counter reads.
2020-07-07add kstat support for reading hardware counters.David Gwynne
this chip is annoyingly complicated, which is reflected in how complicated it is to read counters off the chip. while we just use ixl as a normal network interface, the chip is capable of being a switch with physical ports, virtual ports and all sorts of other functionality, and there are counters in different places for all these different pieces. in our simple setup the driver interface is mapped to a single physical port which we talk to via a single virtual switch interface. this diff adds counters on each interface for the physical port and for the virtual switch interface (vsi). the port counters show what the hardware is doing, while the vsi counters show how the driver is interacting with the chip. for things like packet counters, these numbers tend to correlate strongly, but there are some differences. if the chip drops packets cos there's no descriptors on the rx ring, that's shown in the vsi counters. problems talking to the physical network (eg, packet corruption off the wire) are reported on the port counters. on top of the chip just being complicated, reading the counters is a complicated activity on its own. because the counters can be read by multiple consumers in a virtualised environment, the counters never really get reset. they are also stored in annoyingly small fields. this means you basically have to poll the chip periodically and calculate differences between the polls to avoid losing numbers if they overflow too quickly.
2020-07-07add kstat support for reading the "hardware" counters for each ring.David Gwynne
the counters happen to be a series of uint64_t values in memory, so we treat them as arrays that get mapped to a series of kstat_kv structs that are set up as 64 bit counters with either packet or byte counters as appropriate. this helps keep the code size down. while we export the counters as separate kstats per rx and tx ring, you request an update from the hypervisor at the controller level. this code ratelimits these requests to 1 per second per interface to try and debounce this a bit so each kstat read doesnt cause a vmexit. here's an example of the stats. note that we get to see how many packets that rx ring moderation drops for the first time. see the "no buffers" stat. vmx0:0:rxq:5 packets: 2372483 packets bytes: 3591909057 bytes qdrops: 0 packets errors: 0 packets qlen: 0 packets ... vmx0:0:txq:5 packets: 1316856 packets bytes: 86961577 bytes qdrops: 0 packets errors: 0 packets qlen: 1 packets maxqlen: 512 packets oactive: false ... vmx0:0:vmx-rxstats:5 LRO packets: 0 packets LRO bytes: 0 bytes ucast packets: 2372483 packets ucast bytes: 3591909053 bytes mcast packets: 0 packets mcast bytes: 0 bytes bcast packets: 0 packets bcast bytes: 0 bytes no buffers: 696 packets errors: 0 packets ... vmx0:0:vmx-txstats:5 TSO packets: 0 packets TSO bytes: 0 bytes ucast packets: 1316839 packets ucast bytes: 86960455 bytes mcast packets: 0 packets mcast bytes: 0 bytes bcast packets: 0 packets bcast bytes: 0 bytes errors: 0 packets discards: 0 packets
2020-07-06IEEE1275 (Open Firmware) defines that parameter name strings can have aMark Kettenis
length of up to 31 characters. This limit is also present in the flattened device tree specification/ Unfortunately this limit isn't enforced by the tooling and there are systems in the wild that use longer strings. This includes the device trees used on POWER9 systems and has been seen on some ARM systems as well. So bump the buffer size from 32 bytes (31 + terminating NUL) to 64 bytes. Centrally define OFMAXPARAM to this value (in <dev/ofw/openfirm.h>) replacing the various OPROMMAXPARAM definition scattered around the tree to make sure the FDT implementation of OF_nextprop() uses the same buffer size as its consumers. Eliminate the static buffer in various openprom(4) implementations on FDT systems. Makes it possible to dump the full device tree on POWER9 systems using eeprom -p. ok deraadt@, visa@
2020-07-06defer access of fb_info pointer in drm_fb_helper_hotplug_event()Jonathan Gray
Fixes a regression from rev 1.24 which lead to a page fault reported by Martin Ziemer. ok stsp@
2020-07-06Add support for timeconting in userland.Paul Irofti
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
2020-07-06Repair athn(4) in client mode against WPA2 access points.Stefan Sperling
Client mode was subtly broken after support for CCMP offload was added. In client mode we should be using the first key table slot for our CCMP pairwise key, not an arbitrary slot based on our association ID (as is done in hostap mode). When the interface came up again after being reset the CCMP hardware engine was left in a non-working state. Apparently the key table was messed up or contained stale entries. Fix a potential timing issue in the code path which attempts to clear the key table on device power-up. For good measure, also clear the key table before the device is powered down. While here, fix off-by-ones in key table slot range checks. Problems reported by Tim Chase, Kevin Chadwick, Austin Hook, Stefan Kapfhammer. Fix tested by me on AR9280 (PCI) and AR9271 (USB) and Kevin Chadwick on AR9280
2020-07-06match on D-Link DWA-121 rev B1Jonathan Gray
from Miguel Landaeta
2020-07-06regenJonathan Gray
2020-07-06add D-Link DWA-121 rev B1Jonathan Gray
from Miguel Landaeta
2020-07-06add kstat(4), a subsystem to let the kernel expose statistics to userland.David Gwynne
a kstat is an arbitrary chunk of data that a part of the kernel wants to expose to userland. data could mean just a chunk of raw bytes, but generally a kernel subsystem will provide a series of kstat key/value chunks. this code is loosely modelled on kstat in solaris, but with a bunch of simplifications (we don't want to provide write support for example). the named or key/value structure is significantly richer in this version too. eg, ssolaris kstat named data supports integer types, but this version offers differentiation between counters (like the number of packets transmitted on an interface) and gauges (like how long the transmit queue is) and lets kernel providers say what the units are (eg, packets vs bytes vs cycles). the main motivation for this is to improve the visibility of what the kernel is doing while it's running. i wrote this as part of the recent work we've been doing on multiqueue and rss/toeplitz so i could verify that network load is actually spread across multiple rings on a single nic. without this we would be wasting memory and interrupt vectors on multiple rings and still just using the 1st one, and noone would know cos there's no way to see what rings are being used. another thing that can become visible is the different counters that various network cards provide. i'm particularly interested in seeing if packets get dropped because the rings aren't filled fully, which is an effect we've never really observed directly. a small part of wanting this is cos i spend an annoying amount of time instrumenting the kernel when hacking code in it. if most of the scaffolding for the instrumentation is already there, i can avoid repeatedly writing that code and save time. iterated a few times with claudio@ and deraadt@
2020-07-05Double checking you committed the correct diff sometimes paysKenneth R Westerback
off. Sigh.
2020-07-05Nuke struct scsi_link's "scsibus" member. The two drivers using itKenneth R Westerback
(ahc(4) and qlw(4)) can just compare the values of the "bus" member directly. A slightly different path to the same result that matthew@ traversed in his work culminating in scsiconf.h r1.146.
2020-07-05uvideo_querycap(): Set the 'device_caps' field of struct v4l2_capability ↵Landry Breuil
like done in utvfu(4) Fixes webcam detection in firefox 78, where code was added to check for V4L2_CAP_VIDEO_CAPTURE capability on 'device_caps', whereas we only set it in the 'capabilities' field. According to https://www.kernel.org/doc/html/v4.14/media/uapi/v4l/vidioc-querycap.html#description those distinct fields are here for drivers that provide several devices, but firefox decided to check for 'device_caps' field instead of 'capability' (cf https://hg.mozilla.org/integration/autoland/rev/33facf191f23) - so fill the field for compatibility reasons, while https://bugzilla.mozilla.org/show_bug.cgi?id=1650572 discusses with upstream what's the right way. ok mglocker@
2020-07-05Fix mbuf leak in urtwn(4) with frames that are CCMP-crypted in hardware.Stefan Sperling
Problem reported and fix tested by Bastian Wessling on bugs@ ok jmatthew@
2020-07-04Nestle all sc_link initialization near config_found() invocation.Kenneth R Westerback
2020-07-04Nestle all sc_c.sc_link initialization near config_found() invocation.Kenneth R Westerback
2020-07-04Fix intermittent failing device initialization seen on some SynapticsMarcus Glocker
devices which has been re-introduced by pms.c revision 1.92. ok tb@
2020-07-04Do the same as libc, store "-1" in the return value when a syscall failed.Martin Pieuchot
Simplify the logic by always exporting the return value and errno in the syscall profiler.
2020-07-04It's been agreed upon that global locks should be expressed usinganton
capital letters in locking annotations. Therefore harmonize the existing annotations. Also, if multiple locks are required they should be delimited using commas. ok mpi@
2020-07-03Pass the expected 'scsibus_attach_args *' to scsibus_attach() viaKenneth R Westerback
config_found(), not a 'scsi_link *'. Part of matthew@'s 2010 work.
2020-07-02Shuffle things around so that sc->sc_link initialization isKenneth R Westerback
even more concentrated just before config_found().
2020-07-02Shuffle things around so that sc->sc_link initialization isKenneth R Westerback
even more concentrated just before config_found().
2020-07-02Shuffle things around so that sc->sc_link initialization isKenneth R Westerback
done just before config_found(), as all other drivers do.
2020-07-02Shuffle things around so that sc->sc_link initialization isKenneth R Westerback
done just before config_found(), as all other drivers do.
2020-07-02remove unused timespec interfaces no longer in linuxJonathan Gray