OpenBSD cvs log

created 2023-05-26T22:11:20Z
begin 2023-04-01T00:00:00Z
end 2023-04-08T00:00:00Z
path src/sys
commits 66

date 2023-04-01T00:04:40Z
author dlg
files src/sys/dev/usb/umsm.c log diff annotate
message follow quectel guidance on which usb interfaces umsm should match.

the Quectel LTE&5G Linux USB Driver User Guide V2.0 says umsm should
only attach to usb interfaces 0 to 3 using the interface class
UICLASS_VENDOR. their doco uses magic numbers, but this is what
they mean.

interfaces 4 and above provide network (not serial) via qmi, ecm,
or mbim. preventing umsm from attaching to the high interfaces
allows the appropriate network driver to use it instead. eg, umb
is now able to attach to the network interface because it presents
a standard mbim class.

discussed with and tested by kevlo@
ok patric@ sthen@ kevlo@

date 2023-04-01T08:37:23Z
author kettenis
files src/sys/dev/ofw/ofw_regulator.c log diff annotate
src/sys/dev/ofw/ofw_regulator.h log diff annotate
message Implement regulator notifiers which get called when the voltage/current
for a regulator is changed or when the regulator gets initialized when it
attaches for the first time. The latter makes it possible to register
a notifier for a regulator that hasn't attached yet.

ok dlg@

date 2023-04-01T08:39:05Z
author kettenis
files src/sys/dev/fdt/files.fdt log diff annotate
src/sys/dev/fdt/rkiovd.c log diff annotate
message Add rkiovd(4), a driver for the IO voltage domains on Rockchip SoCs. This
driver makes sure the SoC IO voltage domains stay in sync with the voltage
provided by the regulator associated with the domain.

ok dlg@

date 2023-04-01T08:39:54Z
author kettenis
files src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
message Enable rkiovd(4)

date 2023-04-02T01:21:39Z
author dlg
files src/sys/dev/fdt/files.fdt log diff annotate
src/sys/dev/fdt/rkusbphy.c log diff annotate
message add rkusbphy(4), a driver for the usb2phy on rockchip SoCs.

the rkusbphy device has children nodes in the device tree which are
the actual phys. this driver mostly exists to wire those children
up as PHYs and turn the associated regulators on when a host
controller enables the PHYs. in the future it should enable clocks
and take ports out of suspend too.

i'm not enabling this yet because it's useless without some tweaks
in the usb host controller drivers.

ok kettenis@

date 2023-04-02T03:40:54Z
author kevlo
files src/sys/arch/amd64/conf/RAMDISK_CD log diff annotate
message nable ngbe(4) on install media. Passes 'make release' build.

Pointed out by miod@, patrick@

date 2023-04-02T08:53:01Z
author anton
files src/sys/dev/ic/ufshci.c log diff annotate
message zap excessive semicolons; ok mglocker@

date 2023-04-02T11:28:23Z
author kettenis
files src/sys/dev/mii/rgephy.c log diff annotate
message Add support for the RTL8211F-VD PHY.

ok kevlo@

date 2023-04-02T11:32:48Z
author jsg
files src/sys/dev/acpi/dsdt.h log diff annotate
message add Windows 11 _OSI strings
ok mlarkin@

date 2023-04-02T17:01:48Z
author miod
files src/sys/dev/usb/usbdevs log diff annotate
message New TEMPerGold device.

date 2023-04-02T17:02:08Z
author miod
files src/sys/dev/usb/usbdevs.h log diff annotate
src/sys/dev/usb/usbdevs_data.h log diff annotate
message Regen

date 2023-04-02T17:03:14Z
author miod
files src/sys/dev/usb/ugold.c log diff annotate
message Add support for TEMPerGold 3.4 to ugold(4).

ok landry@

date 2023-04-02T23:55:12Z
author dlg
files src/sys/dev/usb/usbdevs log diff annotate
message add more quectel usb device ids

this list comes from the Quectel LTE&5G Linux USB Driver User Guide v2.0

ok miod@

date 2023-04-02T23:56:19Z
author dlg
files src/sys/dev/usb/usbdevs.h log diff annotate
src/sys/dev/usb/usbdevs_data.h log diff annotate
message regen

date 2023-04-02T23:57:57Z
author dlg
files src/sys/dev/usb/umsm.c log diff annotate
message fill out the list of quectel devices that should be supported.

the list comes from the Quectel LTE&5G Linux USB Driver User Guide V2.0
and claims that all these devices function the same as each other.

ok miod@

date 2023-04-03T00:20:24Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
src/sys/sys/clockintr.h log diff annotate
message clockintr: protect struct clockintr_queue with a mutex

Add a mutex (cq_mtx) to stuct clockintr_queue so that arbitrary CPUs
can manipulate clock interrupts established on arbitrary CPU queues.

Refactor the bulk of clockintr_schedule() into clockintr_schedule_locked()
so we can reuse it from within the mutex.

Tested by mlarkin@. Neat bug found by mlarkin@. With tweaks from
kettenis@.

ok kettenis@

date 2023-04-03T01:21:31Z
author dlg
files src/sys/dev/fdt/rkusbphy.c log diff annotate
message do actual init of the phy itself when needed.

turn the phy clock on and take the port out of suspend when something
(eg, xhci or ehci) wants to use the port.

before this the code just enabled power on the phy port regulators.

ok kettenis@

date 2023-04-03T01:30:32Z
author dlg
files src/sys/dev/ofw/ofw_misc.c log diff annotate
message add glue for network interfaces to be found by fdt/ofw node or phandle.

if we're going to support switch chips (eg, marvell link street
switches as found on a3700 boards like the espressobin), then the
device tree for switch ports identifies which network interface
they're connected by by a reference (phandle) across the device
tree. this lets network drivers register the ifnet struct with the
associated node and phandle so the switch can find it and configure
it for use with the switch.

ok kettenis@

date 2023-04-03T01:30:33Z
author dlg
files src/sys/dev/ofw/ofw_misc.h log diff annotate
message add glue for network interfaces to be found by fdt/ofw node or phandle.

if we're going to support switch chips (eg, marvell link street
switches as found on a3700 boards like the espressobin), then the
device tree for switch ports identifies which network interface
they're connected by by a reference (phandle) across the device
tree. this lets network drivers register the ifnet struct with the
associated node and phandle so the switch can find it and configure
it for use with the switch.

ok kettenis@

date 2023-04-03T01:34:06Z
author dlg
files src/sys/dev/ofw/ofw_misc.c log diff annotate
message special case phandle 0 and return NULL when looking up network interfaces.

not all interfaces will have a phandle (ie, it will be 0), so don't
let phandle 0 be used to find any of these.

discussed with miod@

date 2023-04-03T01:40:32Z
author dlg
files src/sys/dev/ofw/ofw_misc.c log diff annotate
src/sys/dev/ofw/ofw_misc.h log diff annotate
message add phy_enable_prop_idx() to work with phys under props other than "phy".

eg, the snps,dwc3 device tree bindings say that it uses a usb2 and
usb3 phy, and they can be listed either "usb2-phy" and "usb3-phy"
under the standard "phys" and "phy-names" properties supported by
phy_enable(), or as slots 0 and 1 under a "usb-phy" properties. the
latter would be supported by phy_enable_idx(), but it hardcodes
"phys" as the property it looks at. phy_enable_prop_idx() is the
same as phy_enable_prop_idx, but it lets you specify which property
you're indexing into.

ok kettenis@

date 2023-04-03T01:46:18Z
author dlg
files src/sys/dev/fdt/if_mvneta.c log diff annotate
message register mvneta so the interface can be found by node/phandle later.

date 2023-04-03T01:55:00Z
author dlg
files src/sys/dev/fdt/xhci_fdt.c log diff annotate
message add support for enabling both the usb2 and usb3 phys.

the code tried enabling the 0th phy in the usb-phy proplist, which
is the usb2 phy, and if that didn't exist it would try usb3-phy in
the standard phys/phy-names properties. it now tries to enable the
usb2 and usb3 phys independently.

further, support using standard phy drivers registered with the
ofw/fdt code, not just the ones handled inside the xhci driver.

ok kettenis@

date 2023-04-03T01:57:41Z
author dlg
files src/sys/dev/fdt/ehci_fdt.c log diff annotate
message try using a standard phy drivers registered with ofw/fdt first.

this allows ehci to enable rkusbphy(4), which in means the port and
port gets turned onto the port.

tested on a radxa e25 and nanopi r5s without any usb or usb phy
support in the boot loader.

ok kettenis@

date 2023-04-03T05:58:56Z
author dlg
files src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
message enable rkusbphy(4)

date 2023-04-03T11:57:50Z
author claudio
files src/sys/kern/kern_sig.c log diff annotate
message Reduce indent in single_thread_check_locked() by inverting initial
if () check which just returns.
OK mpi@

date 2023-04-03T13:38:18Z
author millert
files src/sys/dev/acpi/acpibtn.c log diff annotate
message acpibtn_notify: ignore duplicate ACPI lid transitions
A Dell Precision 5510 produces two _LID events when the lid is closed.
This results in acpibtn_notify() adding two sleep tasks. The laptop
suspends and resumes successfully, but on resume the second sleep
task runs and it goes right back to sleep. Making the lid transition
a no-op when the existing value matches new _LID value works around
the problem. OK miod@ jcs@

date 2023-04-03T17:40:51Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr: clockintr_cpu_init(): isolate struct clockintr_queue setup

We will always need to initialize the clockintr_queue struct.
However, the hardclock, schedclock, and statclock will not always be a
part of that struct. Move the clockintr_establish() calls in
clockintr_cpu_init() away from the other initialization steps to make
the dependency relationship more obvious. We need to intialize a
struct clockintr_queue before we can establish clock interrupts.

date 2023-04-03T18:59:47Z
author miod
files src/sys/dev/pci/sti_pci.c log diff annotate
message Fix stupid bug in previous.

date 2023-04-04T00:38:37Z
author jsg
files src/sys/conf/files log diff annotate
message Synopsis Designware -> Synopsys DesignWare

date 2023-04-04T00:38:38Z
author jsg
files src/sys/dev/fdt/files.fdt log diff annotate
message Synopsis Designware -> Synopsys DesignWare

date 2023-04-04T10:12:03Z
author bluhm
files src/sys/netinet/ip_divert.c log diff annotate
src/sys/netinet6/ip6_divert.c log diff annotate
message When sending IP packets to userland with divert-packet rules, the
checksum may be wrong. Locally generated packets diverted by pf
out rules may have no checksum due to to hardware offloading.
Calculate the checksum in that case.
OK mvs@ sashan@

date 2023-04-04T21:49:10Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr: add clockintr_cancel_locked()

Move the CLST_PENDING check and TAILQ_REMOVE() in
clockintr_schedule_locked() into a dedicated function,
clockintr_cancel_locked(). clockintr_schedule_locked() no longer
implicitly cancels a pending clockintr: it is the caller's
responsibility to check for CLST_PENDING and cancel any pending
expiration before calling clockintr_schedule_locked(). We can skip
the CLST_PENDING check during the dispatch loop because we know for
certain the clockintr in question is pending.

This is more verbose but I think it is less surprising. Both
functions do one thing.

date 2023-04-05T00:23:06Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr: add clockintr_cancel()

As the name suggests, clockintr_cancel() cancels any pending
expiration of the given clockintr.

I think we will need this in the near future.

date 2023-04-05T10:40:37Z
author kn
files src/sys/netinet6/nd6.c log diff annotate
message Call getuptime(9) once for consistency, sync with ARP

Feedback OK bluhm

date 2023-04-05T10:45:07Z
author kettenis
files src/sys/dev/mii/miivar.h log diff annotate
src/sys/dev/mii/rgephy.c log diff annotate
src/sys/dev/mii/rgephyreg.h log diff annotate
message Implement software control for the internal delays of the RTL8211F PHY.
Since we need to retain the hardware/firmware configuration of the delays
in most existing hardware that uses rgephy(4) (such as PCIe NICs), add a
bew MIIF_SETDELAY flag that controls the software configuration of the
delays.

ok dlg@, jsg@

date 2023-04-05T10:48:12Z
author kettenis
files src/sys/dev/fdt/dwpcie.c log diff annotate
message Call dwpcie_link_config() when initializing the RK3568 PCIe controllers.
This makes sure the PCIe link runs at the maximum possible speed.

Prompted by a diff from dlg@, who also tested this alternative diff.

ok dlg@

date 2023-04-05T13:56:31Z
author kn
files src/sys/netinet6/ip6_forward.c log diff annotate
message Call getuptime(9) once for consistency; OK bluhm

date 2023-04-05T17:23:30Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
message Enable Force Unit Access (FUA) for write commands. This seems to fix
intermittent data corruptions which I faced. The documentation says about
FUA for write commands:

"The Device Server shall write the logical blocks to the medium, and shall
not complete the command with GOOD status until all the logical blocks have
been written on the medium without error."

date 2023-04-05T19:35:23Z
author bluhm
files src/sys/net/if.c log diff annotate
src/sys/net/if_var.h log diff annotate
src/sys/netinet/if_ether.c log diff annotate
src/sys/netinet6/nd6.c log diff annotate
src/sys/netinet6/nd6.h log diff annotate
src/sys/netinet6/nd6_nbr.c log diff annotate
message ARP has a queue of packets that should be sent after name resolution.
ND6 did only hold a single packet. Unify the logic and add a mbuf
hold queue to struct llinfo_nd6. This is MP safe and queue limits
are tracked with atomic operations. New function if_mqoutput() has
common code for ARP and ND6. ln_saddr6 holds the source address
of the requesting packet. That is easier than fiddling with mbuf
queue in nd6_ns_output().
OK kn@

date 2023-04-05T21:51:47Z
author bluhm
files src/sys/netinet/icmp6.h log diff annotate
src/sys/netinet/if_ether.c log diff annotate
src/sys/netinet/ip_input.c log diff annotate
src/sys/netinet/ip_var.h log diff annotate
src/sys/netinet6/icmp6.c log diff annotate
src/sys/netinet6/nd6.c log diff annotate
src/sys/netinet6/nd6.h log diff annotate
message ARP has a sysctl to show the number of packets waiting for an arp
response. Implement analog sysctl net.inet6.icmp6.nd6_queued for
ND6 to reduce places where mbufs can hide within the kernel.
Atomic operations operate on unsigned int. Make the type of total
hold queue length consistent.
Use atomic load to read the value for the sysctl. This clarifies
why no lock around sysctl_rdint() is needed.
OK mvs@ kn@

date 2023-04-05T23:01:03Z
author kn
files src/sys/net/if_ethersubr.c log diff annotate
src/sys/netinet6/nd6.c log diff annotate
message Push kernel lock into nd6_resolve()

Tested as part of bigger unlock diffs, commit now as tiny first step.

OK bluhm

date 2023-04-06T00:09:39Z
author dlg
files src/sys/dev/fdt/if_dwqe_fdt.c log diff annotate
message better handle "phy-mode" properties, in particular around clk delays.

the phy mode can encode whether rk3568 mac should be doing the
delays when talking to the phy, or whether it should ignore them
and let the phy handle them. turns out this will probably be needed
by kettenis to get working ethernet on another rk3568 based system.

tweaks and ok kettenis@

date 2023-04-06T19:02:29Z
author kettenis
files src/sys/dev/fdt/rkgrf.c log diff annotate
message The simplebus_attach() function already prints a newline, so drop it here.

date 2023-04-06T21:17:01Z
author kettenis
files src/sys/dev/fdt/rkclock.c log diff annotate
src/sys/dev/fdt/rkclock_clocks.h log diff annotate
message Add two more RK3568 clocks.

ok dlg@

date 2023-04-07T03:50:10Z
author jsg
files src/sys/dev/pci/drm/amd/amdkfd/kfd_migrate.c log diff annotate
message drm/amdkfd: Fix BO offset for multi-VMA page migration

From Xiaogang Chen
b61b21bcbb8a379269de7d2e3e9ceb42e5368ec4 in linux-6.1.y/6.1.23
b4ee9606378bb9520c94d8b96f0305c3696f5c29 in mainline linux

date 2023-04-07T03:52:40Z
author jsg
files src/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c log diff annotate
message drm/amdkfd: fix a potential double free in pqm_create_queue

From Chia-I Wu
b861f0e62ae148eb5f0a48c4d6fcd5dc03b4e252 in linux-6.1.y/6.1.23
b2ca5c5d416b4e72d1e9d0293fc720e2d525fd42 in mainline linux

date 2023-04-07T03:53:55Z
author jsg
files src/sys/dev/pci/drm/amd/amdkfd/kfd_chardev.c log diff annotate
message drm/amdkfd: fix potential kgd_mem UAFs

From Chia-I Wu
5045360f3bb62ccd4f87202e33489f71f8bbc3fc in linux-6.1.y/6.1.23
9da050b0d9e04439d225a2ec3044af70cdfb3933 in mainline linux

date 2023-04-07T03:55:33Z
author jsg
files src/sys/dev/pci/drm/amd/amdkfd/kfd_module.c log diff annotate
src/sys/dev/pci/drm/amd/amdkfd/kfd_priv.h log diff annotate
src/sys/dev/pci/drm/amd/amdkfd/kfd_process.c log diff annotate
message drm/amdkfd: Fixed kfd_process cleanup on module exit.

From David Belanger
b969838c9554a0e9aab3c3cadfcd23d246bc2abe in linux-6.1.y/6.1.23
20bc9f76b6a2455c6b54b91ae7634f147f64987f in mainline linux

date 2023-04-07T03:57:13Z
author jsg
files src/sys/dev/pci/drm/i915/display/intel_tc.c log diff annotate
message drm/i915/tc: Fix the ICL PHY ownership check in TC-cold state

From Imre Deak
75084659969f5cd0287a86e7faae3ef0a5651d1e in linux-6.1.y/6.1.23
38c583019484f190d5b33f59b8ae810e6b1763c6 in mainline linux

date 2023-04-07T03:58:43Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c log diff annotate
message drm/amdgpu: allow more APUs to do mode2 reset when go to S4

From Tim Huang
febacc33298f8d72d5bfd4d23a556cc21b5cd6c2 in linux-6.1.y/6.1.23
2fec9dc8e0acc3dfb56d1389151bcf405f087b10 in mainline linux

date 2023-04-07T04:00:35Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c log diff annotate
src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h log diff annotate
message drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub

From Fangzhi Zuo
41abe8828c83e8f73940790a3861b498a8b5ee3f in linux-6.1.y/6.1.23
f4f3b7dedbe849e780c779ba67365bb1db0d8637 in mainline linux

date 2023-04-07T04:02:25Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c log diff annotate
src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h log diff annotate
message drm/amd/display: Take FEC Overhead into Timeslot Calculation

From Fangzhi Zuo
fd71f4c9e3fa7454f9797c539abd5fcfc8b92b41 in linux-6.1.y/6.1.23
68dc1846c3a44d5e633be145c169ce2fd5420695 in mainline linux

date 2023-04-07T04:03:48Z
author jsg
files src/sys/dev/pci/drm/i915/gem/i915_gem_lmem.c log diff annotate
message drm/i915/gem: Flush lmem contents after construction

From Chris Wilson
21ee19974b19edcda7a8e4f9bd5b02c3a750a69e in linux-6.1.y/6.1.23
d032ca43f2c80049ce5aabd3f208dc3849359497 in mainline linux

date 2023-04-07T04:06:11Z
author jsg
files src/sys/dev/pci/drm/i915/display/intel_dpt.c log diff annotate
src/sys/dev/pci/drm/i915/gem/i915_gem_object.h log diff annotate
src/sys/dev/pci/drm/i915/gem/i915_gem_object_types.h log diff annotate
message drm/i915/dpt: Treat the DPT BO as a framebuffer

From Ville Syrjala
c781c107731fc09ce4330c8c636b8446d0f72aa4 in linux-6.1.y/6.1.23
3413881e1ecc3cba722a2e87ec099692eed5be28 in mainline linux

date 2023-04-07T04:07:59Z
author jsg
files src/sys/dev/pci/drm/i915/display/intel_display.c log diff annotate
message drm/i915: Disable DC states for all commits

From Ville Syrjala
0fc6fea41c7122aa5f2088117f50144b507e13d7 in linux-6.1.y/6.1.23
a2b6e99d8a623544f3bdccd28ee35b9c1b00daa5 in mainline linux

date 2023-04-07T04:09:51Z
author jsg
files src/sys/dev/pci/drm/i915/display/intel_color.c log diff annotate
message drm/i915: Move CSC load back into .color_commit_arm() when PSR is enabled on skl/glk

From Ville Syrjala
fcf712b4e5d0aacbc193e71962bdaa4d4afe3335 in linux-6.1.y/6.1.23
a8e03e00b62073b494886dbff32f8b5338066c8b in mainline linux

date 2023-04-07T04:11:42Z
author jsg
files src/sys/dev/pci/drm/amd/amdkfd/kfd_migrate.c log diff annotate
message drm/amdkfd: Get prange->offset after svm_range_vram_node_new

From Xiaogang Chen
d0386bd84e6d81990ef22e10657d5a5d9c209763 in linux-6.1.y/6.1.23
8eeddc0d4200762063e1c66b9cc63afa7b24ebf0 in mainline linux

date 2023-04-07T06:18:26Z
author dlg
files src/sys/dev/ofw/ofw_regulator.c log diff annotate
message fixed regulators could have a "gpios" or "gpio" property.

we only handled "gpio" before. figuring this out has wasted many
days of my life recently.

ok patrick@ kettenis@

date 2023-04-07T06:33:49Z
author dlg
files src/sys/dev/fdt/if_dwqe_fdt.c log diff annotate
message register a mapping of dwqe interfaces to ofw nodes/phandles.

ok kettenis@

date 2023-04-07T08:53:03Z
author kettenis
files src/sys/dev/fdt/if_dwqe_fdt.c log diff annotate
src/sys/dev/ic/dwqe.c log diff annotate
src/sys/dev/ic/dwqevar.h log diff annotate
message Determine PHY mode and pass the appropriate flags down to the PHY when we
attach it.

ok dlg@

date 2023-04-07T09:31:59Z
author jsg
files src/sys/arch/arm64/dev/rtkit.c log diff annotate
message avoid use of uninitialised memory
ok miod@ kettenis@

date 2023-04-07T09:33:51Z
author dlg
files src/sys/dev/ic/dwqevar.h log diff annotate
message register a mapping of dwqe interfaces to ofw nodes/phandles.

i forgot to commit this as part of src/sys/dev/fdt/if_dwqe_fdt.c r1.7

found by mglocker@

date 2023-04-07T09:43:38Z
author tb
files src/sys/kern/makesyscalls.sh log diff annotate
message Fix whitespace on two lines

date 2023-04-07T22:02:58Z
author bluhm
files src/sys/net/if.c log diff annotate
src/sys/netinet/if_ether.c log diff annotate
message Remove kernel locks from the ARP input path. Caller if_netisr()
grabs the exclusive netlock and that is sufficent for in_arpinput()
and arpcache().
with kn@; OK mvs@; tested by Hrvoje Popovski

date 2023-04-07T22:55:26Z
author dlg
files src/sys/dev/fdt/if_dwqe_fdt.c log diff annotate
message print which gmac the dwqe driver is attaching to.

there's no guarantee that dwqe0 in the kernel will attach to gmac0
in the device tree, so print it to make it explicit what's going
where.

ok patrick@ kettenis@