OpenBSD cvs log

created 2021-07-04T15:02:24Z
begin 2021-06-30T00:00:00Z
end 2021-07-01T00:00:00Z
path src/sys
commits 14

date 2021-06-30T01:08:10Z
author jsg
files src/sys/arch/riscv64/riscv64/pmap.c log diff annotate
message MULTIPTOCESSOR -> MULTIPROCESSOR

ok deraadt@

date 2021-06-30T07:39:05Z
author jsg
files src/sys/arch/riscv64/riscv64/pmap.c log diff annotate
message add missing call to sbi_remote_fence_i()

ok kettenis@

date 2021-06-30T09:42:22Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
message Make Tx-done interrupt processing in iwm(4) more similar to iwlwifi.

When iwm(4) takes a frame off a non-aggregation queue we used the ring index
reported by firmware to figure out which frame can be taken off the ring.
This logic was inherited from iwn(4).

We have sometimes seen an index get skipped and had a workaround in place
where we took all pending frames up to this index off the ring.

Apart from the ring index the firmware reports another value which is its
starting sequence number (SSN). An SSN is usually associated with a Tx
aggregation queue that uses block ack. On non-aggregation queues the SSN
matches the ring index most of the time and hence seems redundant at first
sight. But the values are not always the same.

We now always use the SSN as the upper bound which matches the Linux driver.

This seems to fix fatal firmware errors during Tx commands seen by jcs@
which suggests that we were sometimes taking frames off the ring too early.

The ring index is still used to feed information about a frame to the Tx
rate control algorithm but no longer determines when frames are taken off
the ring.

test and ok jcs@

date 2021-06-30T09:43:59Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
message Make the iwm(4) mac context task send its command only if we are still in
RUN state when the task gets to run. Fixes fatal firmware errors where
mac context updates were erroneously sent in states other than RUN state.

Additionally, avoid scheduling a mac context task if a pending newstate
task is going to move us out of RUN state anyway.

Issue debugged by zxystd in OpenIntelWireless itlwm; patch by me.

date 2021-06-30T09:44:56Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
message Align HT protection flags we send to iwm(4) firmware with flags used by
Linux iwlwifi.

Setting the FAT protection flag while we're using 20 MHz channels doesn't
really make a lot of sense to me but apparently firmware expects it to be
set regardless. Linux does not use the SELF_CTS_EN flag so it might be better
to avoid using SELF_CTS_EN.

According to zxystd from OpenIntelWireless, the same change fixed fatal
firmware errors seen during HT protection updates for them:
https://github.com/OpenIntelWireless/itlwm/commit/032a14185a434b7181c0e78a953dc2e1c21a0853

test and ok gnezdo@

date 2021-06-30T09:45:47Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
src/sys/dev/pci/if_iwmreg.h log diff annotate
message Fix Tx queue flushing in iwm(4).

iwm(4) was still using an outdated version of the TX_FLUSH command.
Current firmware expects a different version which has the same size but
different semantics. The iwx(4) driver is already using the new version.

Also do not log errors if flushing Tx queues fails. This can happen if
the AP disappeared. Just cope by resetting the device and clearing rings.

Should fix "flushing Tx queues failed" and related firmware errors.

date 2021-06-30T09:46:46Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
src/sys/dev/pci/if_iwxvar.h log diff annotate
message Make Tx-done interrupt processing in iwx(4) more similar to iwlwifi.

When iwx(4) takes a frame off the queue we used the ring index reported
by firmware to figure out which frame can be taken off the ring.
This logic was inherited from iwn(4).

We have sometimes seen an index get skipped and had a workaround in place
where we took all pending frames up to this index off the ring.

Apart from the ring index the firmware reports another value which is its
starting sequence number (SSN). An SSN is usually associated with a Tx
aggregation queue that uses block ack. On non-aggregation queues the SSN
matches the ring index most of the time and hence seems redundant at first
sight. But the values are not always the same.

We now always use the SSN as the upper bound which matches the Linux driver.

This seems to fix fatal firmware errors during Tx commands seen by jcs@
which suggests that we were sometimes taking frames off the ring too early.

date 2021-06-30T09:47:20Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
message Make the iwx(4) mac context task send its command only if we are still in
RUN state when the task gets to run. Fixes fatal firmware errors where
mac context updates were erroneously sent in states other than RUN state.

Additionally, avoid scheduling a mac context task if a pending newstate
task is going to move us out of RUN state anyway.

Issue debugged by zxystd in OpenIntelWireless itlwm; patch by me.

date 2021-06-30T09:47:57Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
message Align HT protection flags we send to iwx(4) firmware with flags used by
Linux iwlwifi.

Setting the FAT protection flag while we're using 20 MHz channels doesn't
really make a lot of sense to me but apparently firmware expects it to be
set regardless. Linux does not use the SELF_CTS_EN flag so it might be better
to avoid using SELF_CTS_EN.

According to zxystd from OpenIntelWireless, the same change fixed fatal
firmware errors seen during HT protection updates for them:
https://github.com/OpenIntelWireless/itlwm/commit/032a14185a434b7181c0e78a953dc2e1c21a0853

test and ok gnezdo@

date 2021-06-30T11:26:49Z
author bluhm
files src/sys/netinet/tcp_subr.c log diff annotate
message For path MTU discovery tcp_mtudisc() should resend a TCP packet by
calling tcp_output() if the TCP maximum segment size changes. But
that did not work, as the new value was compared before tcp_mss()
had a chance to modify it. Move the comparison and change it from
not equal to greater than. It makes only sense to resend a packet
immediately if it becomes smaller and is more likely to fit.
OK sashan@ tobhe@

date 2021-06-30T12:19:01Z
author deraadt
files src/sys/arch/armv7/conf/RAMDISK log diff annotate
message grow ramdisk area due to increased firmware sizes..
ok jsg

date 2021-06-30T12:21:02Z
author bluhm
files src/sys/crypto/crypto.c log diff annotate
src/sys/crypto/cryptodev.h log diff annotate
src/sys/kern/init_main.c log diff annotate
message Remove unused variable cryptodesc_pool. Document global variables
in crypto.c and annotate locking protection. Assert kernel lock
where needed. Remove dead code from crypto_get_driverid(). Move
crypto_init() prototype into header file.
OK mpi@

date 2021-06-30T13:23:33Z
author bluhm
files src/sys/net/if.c log diff annotate
message Remove splnet() from ifnewlladdr(), it is not needed anymore.
Add asserts and comments for the locks that are necessary.
discussed with dlg@ mpi@ mvs@; tested by Hrvoje Popovski; OK mpi@

date 2021-06-30T22:20:56Z
author kettenis
files src/sys/arch/riscv64/include/cpu.h log diff annotate
src/sys/arch/riscv64/include/pcb.h log diff annotate
src/sys/arch/riscv64/riscv64/fpu.c log diff annotate
src/sys/arch/riscv64/riscv64/genassym.cf log diff annotate
src/sys/arch/riscv64/riscv64/machdep.c log diff annotate
src/sys/arch/riscv64/riscv64/sig_machdep.c log diff annotate
src/sys/arch/riscv64/riscv64/vm_machdep.c log diff annotate
message Simplify the way we track the FPU state, using powerpc64 as a model.
The new code still uses the clean/dirty state that the hardware reports
to optimize saving/restoring the FPU register, but no longer attempts to
keep the FPU registers alive across a context switch. Fixes panics seen
on MP kernels.

ok drahn@