CVS: cvs.openbsd.org: src

2024-04-25 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/04/25 02:51:37

Modified files:
sys/dev/ic : dwqe.c dwqereg.h 

Log message:
Mask off MAC management counter interrupts.  The driver doesn't know how
to handle these, so if they're enabled, they will cause an interrupt
storm.

ok patrick@ jsg@ stsp@



CVS: cvs.openbsd.org: src

2024-04-11 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/04/11 00:42:12

Modified files:
sys/dev/pci: if_mcx.c 

Log message:
Match on ConnectX-6 virtual functions too, since they don't seem to be
any different to earlier revisions.

from Brad



CVS: cvs.openbsd.org: src

2024-04-10 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/04/10 23:30:55

Modified files:
sys/dev/pci: if_mcx.c 

Log message:
Add support for media types from the extended ethernet capabilities fields.
If none of the regular ethernet capabilities are present, check the extended
capabilities.  Since we only report that the link is active if there's a
detected media type, this isn't just a cosmetic change.

Joerg Streckfuss reported that a gigabit SFP didn't work in a ConnectX-6 Lx,
and tested that this change makes it work.

ok dlg@



CVS: cvs.openbsd.org: src

2024-03-20 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/03/20 22:10:37

Modified files:
share/man/man4 : mcx.4 

Log message:
mention that SR-IOV virtual functions work too



CVS: cvs.openbsd.org: src

2024-01-18 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/01/18 20:25:13

Modified files:
sys/dev/pci: if_bnxt.c 

Log message:
Add TSO support.  Previous commit fixed up a bug that could only be
triggered with TCP socket splicing and TSO, and with that fixed, it
works reliably.

tested by hrvoje, jan@, mbuhl@, bluhm@, feedback from jan@ and bluhm@,
ok jan@ mbuhl@ bluhm@



CVS: cvs.openbsd.org: src

2024-01-15 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/01/15 01:56:46

Modified files:
sys/dev/pci: if_bnxt.c 

Log message:
The maximum number of ring slots a tx packet can use is 32, which is
indicated by writing 0 to the 5 bit 'BD count' field in the first slot.
Accordingly, mask the value we're writing there.

Each packet uses one slot for offload information and then one per DMA
segment, which means the maximum number of DMA segments must be 31 rather
than 32.  Trying to send a packet using 33 slots makes the nic firmware
very upset.

ok dlg@



CVS: cvs.openbsd.org: src

2024-01-09 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/01/09 22:06:00

Modified files:
sys/dev/pci: if_bnxt.c 

Log message:
If bringing up a queue fails, only tear down the ones that we set up
successfully, rather than trying to tear them all down and crashing.

tested by hrvoje, who can make queue setup fail sometimes
ok bluhm@



CVS: cvs.openbsd.org: src

2024-01-08 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/01/08 21:32:29

Modified files:
sys/dev/pci: if_bnxt.c 

Log message:
remove needless comment



CVS: cvs.openbsd.org: src

2024-01-08 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/01/08 21:29:46

Modified files:
sys/dev/pci: if_bnxt.c 

Log message:
If there are still mbufs on a ring when we're freeing it,
it'd be a good idea to free them too.

ok dlg@



CVS: cvs.openbsd.org: src

2024-01-03 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2024/01/04 00:08:47

Modified files:
sys/dev/pci: if_bnxt.c 

Log message:
fix up barriers in bnxt_down() - use barriers for all interrupts and
for the rx refill timeouts.

tested by hrvoje
ok bluhm@



CVS: cvs.openbsd.org: src

2023-12-14 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/12/14 23:03:01

Modified files:
distrib/amd64/ramdisk_cd: Makefile 
distrib/amd64/iso: Makefile 

Log message:
For amd64 cdXX.iso and installXX.iso, create an EFI system partition image
containing the EFI boot loaders and install it as an El Torito boot image,
making the install CDs bootable in EFI mode.

"looks great" deraadt@
ok mlarkin@



CVS: cvs.openbsd.org: src

2023-11-28 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/11/28 23:59:23

Modified files:
share/man/man4 : mpii.4 

Log message:
update supported hardware lists



CVS: cvs.openbsd.org: src

2023-11-28 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/11/28 23:54:09

Modified files:
sys/dev/pci: mpii.c 

Log message:
Add support for new SAS HBAs (codenamed Aero and Sea, sold as Broadcom HBA
9500, Dell HBA350/5, Lenovo ThinkSystem 440 HBA, Supermicro AOC-S3808/16)

These apparently have a hardware problem that results in reads of some
registers returning all zeros under some transient conditions, which can
apparently be worked around by retrying reads that return 0 up to 3 times.

ok dlg@



CVS: cvs.openbsd.org: src

2023-11-28 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/11/28 23:46:58

Modified files:
sys/dev/pci: pcidevs.h pcidevs_data.h 

Log message:
regen



CVS: cvs.openbsd.org: src

2023-11-28 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/11/28 23:46:30

Modified files:
sys/dev/pci: pcidevs 

Log message:
add some new Broadcom SAS HBA ids



CVS: cvs.openbsd.org: src

2023-11-24 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/11/24 01:47:35

Modified files:
sys/dev/pci: ccp_pci.c 

Log message:
Match on 19h/1xh PSP

ok dlg@



CVS: cvs.openbsd.org: src

2023-11-23 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/11/23 21:34:35

Modified files:
sys/dev/pci: pcidevs.h pcidevs_data.h 

Log message:
regen



CVS: cvs.openbsd.org: src

2023-11-23 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/11/23 21:34:09

Modified files:
sys/dev/pci: pcidevs 

Log message:
Add devices found in 4th generation (Genoa) Epyc systems

input from and ok jsg@



CVS: cvs.openbsd.org: src

2023-11-21 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/11/21 01:46:06

Modified files:
gnu/usr.sbin/mkhybrid/src: defaults.h eltorito.c iso9660.h 
   mkhybrid.8 mkisofs.c mkisofs.h 

Log message:
Add '-e' (or -eltorito-boot-efi) option for writing an EFI eltorito boot
image, in addition to or instead of the x86 boot image, to the output file.
Per the UEFI standard, the EFI boot image should be an image of an EFI
System Partition to be loaded in no-emulation mode, so we always record it
that way rather than checking if it looks like a floppy image.

with, tested by and ok yasuoka@
strong encouragement from deraadt@



CVS: cvs.openbsd.org: src

2023-10-24 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/10/24 03:13:22

Modified files:
sys/dev/usb: if_umb.c 

Log message:
Delete any existing v4 address before setting a new one.  This allows us
to keep a working default route when the address changes.

ok dlg@ kn@



CVS: cvs.openbsd.org: src

2023-09-18 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/09/18 00:47:21

Modified files:
sys/dev/pci: if_mcx.c 

Log message:
Add 100GB LR4 Ethernet capability and map it to IFM_100G_LR4.
This isn't listed in the public PRM but it can be found in the Linux driver.

from Olivier Croquin



CVS: cvs.openbsd.org: src

2023-09-16 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/09/16 17:25:16

Modified files:
sys/arch/arm64/dev: acpipci.c 

Log message:
Skip non-MSI interrupt controllers when looking for one matching the ITS id
given in the IORT node.  Using a non-MSI interrupt controller here will
crash as ic->ic_establish_msi will be NULL.

tested by phessler@
ok phessler@ patrick@



CVS: cvs.openbsd.org: src

2023-09-12 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/09/12 02:32:58

Modified files:
sys/arch/arm64/dev: acpipci.c 
sys/dev/acpi   : acpireg.h 

Log message:
Use IORT ITS nodes to find the right ITS instance to use when establishing
interrupts.  This makes MSI/MSI-X work on platforms like the Ampere Altra
which have an ITS instance for each PCI domain.

also tested by cheloha@
ok kettenis@ patrick@



CVS: cvs.openbsd.org: src

2023-09-12 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/09/12 02:29:28

Modified files:
sys/arch/arm64/dev: agintc.c 
sys/arch/arm64/include: intr.h 

Log message:
Store ITS ID in struct interrupt_controller so it can be used to look up
the right ITS to use when establishing interrupts.

ok kettenis@ patrick@



CVS: cvs.openbsd.org: src

2023-09-12 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/09/12 02:22:07

Modified files:
sys/arch/arm64/stand/efiboot: efiacpi.c 

Log message:
Add an "openbsd,gic-its-id" property to gic-its nodes containing the ITS ID.

ok kettenis@ patrick@



CVS: cvs.openbsd.org: src

2023-07-08 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/07/08 03:01:30

Modified files:
sys/dev/pci: if_ix.c 

Log message:
Check rx dma map was allocated before trying to free it, so we don't crash
if we ran out of memory while bringing the interface up.

tested by hrvoje, ok kevlo@



CVS: cvs.openbsd.org: src

2023-07-06 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/07/06 02:32:37

Modified files:
sys/dev/fdt: if_dwge.c 

Log message:
Register a mapping of dwge interfaces to ofw nodes/phandles.

ok kettenis@



CVS: cvs.openbsd.org: src

2023-07-05 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/07/05 12:48:49

Modified files:
sys/dev/fdt: if_dwge.c 

Log message:
Handle fixed-link configuration in the device tree.

If fixed-link is present, populate the interface baudrate, link status
(full duplex or half duplex) and media type, and then call the statch
handler to apply that config to the MAC.  If fixed-link is specified
then do not attach a phy.

Note that phy lookup and reset still occurs in case the device tree
still uses the deprecated snps,reset-gpio properties.

Based on if_dwqe_fdt.c v1.11 and dwqe.c v1.8.
Tested on a Banana Pi R1 (aka Lamobo R1), which has its dwge interface
connected directly to an ethernet switch.

ok kettenis@



CVS: cvs.openbsd.org: src

2023-07-04 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/07/04 04:22:39

Modified files:
sys/dev/pci: if_bge.c if_bgereg.h 

Log message:
Make the hardware counters available on BCM5705 and newer available as
kstats.  Some of the hardware counters are already used in
bge_stats_update_regs() to update interface counters and work around
hardware bugs, and all counters reset on read, so to keep things simple
the work is split between that function and bge_kstat_read(), which
reads the rest of the counters.

tested by bluhm@ on BCM5720 (with counters) and BCM5704 (without), and
by me on BCM5720 A0 (with counters and hardware bugs)
ok bluhm@ dlg@



CVS: cvs.openbsd.org: src

2023-06-25 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/06/25 16:36:09

Modified files:
sys/dev/fdt: if_dwge.c 

Log message:
Provide kstats based on the byte and packet counters available in some
dwge(4) implementations.  The counters are all 32 bit, so enable reset-on-read
and accumulate them into 64 bit software counters, and enable the MMC
interrupts that indicate one or more counters is halfway to overflowing.
Tested on an RK3399, which has the counters, and an Allwinner A20, which
doesn't.

ok dlg@



CVS: cvs.openbsd.org: src

2023-05-21 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/05/21 23:59:05

Modified files:
usr.sbin/ypldap: ldapclient.c 

Log message:
Keep trying LDAP servers until we get full results from one, rather than
just until one accepts the TCP connection. In multi server environments,
this makes ypldap more resilient when some servers are misbehaving.

While here, add the server address to log messages relating to connection
errors to make it easier to identify which server is failing.

ok tb@



CVS: cvs.openbsd.org: src

2023-04-24 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/04/24 03:18:55

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Add initial support for Atlantic 2 hardware.  Atlantic 2 has
much more complicated rx processing, and here we're doing the
bare minimum to get packets moving.  RSS is not implemented yet,
vlans and multicast (among others) probably don't work yet either.

tested by kettenis@ on an M2 Mac Mini, and by me on an AQC113
card provided by Brad
ok dlg@



CVS: cvs.openbsd.org: src

2023-04-23 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/04/23 16:57:23

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Adjust some printfs in the attach code path to make more sense,
and include the mac address of the interface on the attach line.

ok dlg@



CVS: cvs.openbsd.org: src

2023-04-23 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/04/23 16:48:03

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Prepare for adding Atlantic 2 support by renaming functions and defines
specific to Atlantic 1, shuffling some of the setup code, and adding
get_mac_addr to the firmware ops struct.

ok dlg@



CVS: cvs.openbsd.org: src

2023-03-30 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/30 21:38:26

Modified files:
usr.sbin/ypldap: ldapclient.c ypldap.c 

Log message:
Only send the used portion of struct idm_req in imsgs from the ldapclient
process to the main process. This significantly reduces memory usage when
updating larger directories.

ok aisha@



CVS: cvs.openbsd.org: src

2023-03-12 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/12 04:50:06

Modified files:
sys/arch/armv7/conf: GENERIC 

Log message:
Enable mvtemp(4)



CVS: cvs.openbsd.org: src

2023-03-12 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/12 04:49:05

Modified files:
share/man/man4 : mvtemp.4 

Log message:
Update supported hardware list and fix spelling of Marvell while I'm here



CVS: cvs.openbsd.org: src

2023-03-12 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/12 04:46:27

Modified files:
sys/dev/fdt: mvtemp.c 

Log message:
Match on the Armada 380 temperature sensor, which works the same as the
CP110 sensor.

ok kettenis@



CVS: cvs.openbsd.org: src

2023-03-04 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/04 21:30:08

Modified files:
sys/arch/armv7/marvell: mvmpic.c 

Log message:
Mask off IPL flags before storing the IPL for an interrupt.
This fixes the IPL calculations in mpic_calc_mask() in the presence
of IPL_MPSAFE interrupts such as mvneta(4).

ok patrick@ kettenis@ dlg@



CVS: cvs.openbsd.org: src

2023-03-04 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/04 03:42:26

Modified files:
sys/arch/armv7/marvell: files.marvell 

Log message:
Add mvortc(4) and mvodog(4) here too



CVS: cvs.openbsd.org: src

2023-03-02 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/02 03:07:18

Modified files:
share/man/man4/man4.armv7: Makefile 
Added files:
share/man/man4/man4.armv7: mvodog.4 mvortc.4 

Log message:
mvodog(4) and mvortc(4)



CVS: cvs.openbsd.org: src

2023-03-02 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/02 02:59:29

Modified files:
sys/arch/armv7/conf: GENERIC RAMDISK 

Log message:
Enable mvodog(4) and mvortc(4)



CVS: cvs.openbsd.org: src

2023-03-02 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/02 02:57:43

Added files:
sys/arch/armv7/marvell: mvortc.c 

Log message:
Add mvortc(4), a driver for the RTC on the ARMADA 38x series.

ok kettenis@ patrick@



CVS: cvs.openbsd.org: src

2023-03-02 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/02 02:56:52

Added files:
sys/arch/armv7/marvell: mvodog.c 

Log message:
Add mvodog(4), a driver for the watchdog on the ARMADA 38x series.

ok kettenis@ patrick@



CVS: cvs.openbsd.org: src

2023-03-02 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/03/02 02:39:45

Modified files:
sys/arch/armv7/conf: GENERIC RAMDISK 

Log message:
Add eephy(4), found on the Turris Omnia's WAN port



CVS: cvs.openbsd.org: src

2023-02-27 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/02/27 02:59:46

Modified files:
sys/dev/fdt: if_mvneta.c 

Log message:
Pass MII flags depending on the phy mode specified in the device tree.
With this, the WAN port on the Turris Omnia works.

tested on Turris MOX by kettenis@
ok patrick@



CVS: cvs.openbsd.org: src

2023-01-16 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2023/01/16 15:08:50

Modified files:
sys/dev/usb: if_urtwn.c 

Log message:
Fix transmit queue selection based on frame type.  I introduced an error
here when I split up urtwn_tx() to add support for RTL8192EU devices.

from Mikhail (mp395990 at gmail)
ok stsp@



CVS: cvs.openbsd.org: src

2022-11-23 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/11/23 21:04:39

Modified files:
sys/dev/acpi   : acpimadt.c acpireg.h 

Log message:
Don't report unknown apic structure types if they're in the OEM reserved
range (0x80 to 0xff).  We're not going to understand OEM specific
structures, and some machines such as the Dell R6515 have significant
numbers of them.

ok kettenis@



CVS: cvs.openbsd.org: src

2022-11-21 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/11/21 23:48:32

Modified files:
sys/dev/pci: if_mcx.c 

Log message:
Allocate additional command queue slots and use command completion events
to run commands where we can sleep while waiting.  Rather than actually
using it as a queue, just allocate the slots to particular uses.
The first slot is used for polled commands (anything run while cold),
then there's one for general ioctls, one for kstat reads, and one for
link operations.  Since we can sleep while waiting now, we need to serialize
access to the command slots.  This is done with rwlocks for the ioctl and
kstat slots, and link slot is only used from a single instance task.
This also means we don't need to hold the kernel lock while doing kstat
reads.

Using interrupt based command completion drops the time taken to read all
the kstats off mcx interfaces from tens of milliseconds to almost nothing,
which is a pretty big win when you're reading them every few seconds on
busy firewalls.

ok dlg@



CVS: cvs.openbsd.org: src

2022-11-10 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/11/10 01:26:54

Modified files:
sys/arch/amd64/amd64: ipi.c lapic.c 

Log message:
Convert amd64 clock and ipi event counters to per-cpu

ok kettenis@ jca@ cheloha@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/11/10 00:08:02

Modified files:
sys/arch/sparc64/sparc64: clock.c 

Log message:
Convert sparc64 clock event counter to per-cpu and increment using
evcount_inc() rather than atomic operations.

ok kettenis@ jca@ cheloha@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/11/10 00:05:41

Modified files:
share/man/man9 : evcount.9 
sys/kern   : init_main.c subr_evcount.c 
sys/sys: evcount.h 

Log message:
Add support for per-cpu event counters, to be used for clock and IPI
counters where the event being counted occurs across all CPUs in the
system.  Counter instances can be made per-cpu by calling evcount_percpu()
after the counter is attached, and this can occur before or after all system
CPUs are attached.  Per-cpu counter instances should be incremented using
evcount_inc().

ok kettenis@ jca@ cheloha@



CVS: cvs.openbsd.org: src

2022-10-12 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/10/12 22:55:33

Modified files:
usr.sbin/ypldap: aldap.c aldap.h ldapclient.c parse.y 
 ypldap.conf.5 ypldap.h 

Log message:
Add client certificate authentication and optional SASL EXTERNAL bind,
which allows the client to bind as the subject of the certificate in cases
where the directory doesn't implicitly do that.

The client certificate is configured with 'certfile' and 'keyfile'
directives, and SASL EXTERNAL bind is configured with the 'bindext'
directive.

ok tb@



CVS: cvs.openbsd.org: src

2022-08-22 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/08/22 20:57:27

Modified files:
usr.sbin/ypldap: ypldap_dns.c 

Log message:
log a warning if we can't resolve the ldap server hostname



CVS: cvs.openbsd.org: src

2022-08-22 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/08/22 04:10:59

Modified files:
usr.sbin/ypldap: ldapclient.c 

Log message:
log connect, TLS and bind errors more prominently



CVS: cvs.openbsd.org: src

2022-08-22 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/08/22 02:02:02

Modified files:
usr.sbin/ypldap: ypldap.c 

Log message:
remove extra newlines from log messages



CVS: cvs.openbsd.org: src

2022-08-22 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/08/22 01:07:45

Modified files:
usr.sbin/ypldap: ypldap.conf.5 

Log message:
use Ic for all config options, and Xr ypldap 8 instead of Nm when talking
about operations the daemon performs.



CVS: cvs.openbsd.org: src

2022-08-18 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/08/18 21:50:32

Modified files:
usr.sbin/ypldap: parse.y yp.c ypldap.conf.5 ypldap.h 

Log message:
Add local bind mode, where ypldap manages the YP binding file itself
rather than relying on ypbind to do it, which also means you don't need
portmap running.  In this mode, ypldap binds its rpc sockets to loopback,
so YP services are only available to the host it's running on.  The
previous behaviour, now called portmap bind mode, is still the default.

encouragement from deraadt@ and dlg@



CVS: cvs.openbsd.org: src

2022-07-19 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/07/19 15:49:22

Modified files:
sys/dev/fdt: if_mvneta.c 

Log message:
Fix up tx ring slot calculations so we store the mbuf and dma map with
the last slot of the packet rather than the first slot of the next.

ok dlg@



CVS: cvs.openbsd.org: src

2022-07-11 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/07/11 04:44:08

Modified files:
sys/arch/armv7/marvell: mvacc.c 

Log message:
r1.3 converted the clock rates from kHz to Hz, so we shouldn't multiply by
1000 to pass the rate to amptimer_set_clockrate().  Fixes the system clock
running too slow for ntpd to keep in sync.

ok patrick@



CVS: cvs.openbsd.org: src

2022-06-26 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/06/26 09:38:11

Modified files:
sys/dev/usb: if_urtwn.c 

Log message:
Add missing splx before returning when urtwn_ccmp_decap() fails.

from Christian Ludwig



CVS: cvs.openbsd.org: src

2022-06-26 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/06/26 09:33:37

Modified files:
sys/dev/pci: if_mcx.c 

Log message:
Break out of the switch statement rather than returning early on ioctl
errors, ensuring the IPL is correctly restored.

from Christian Ludwig



CVS: cvs.openbsd.org: src

2022-06-26 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/06/26 09:25:03

Modified files:
sys/dev/usb: if_uaq.c 

Log message:
add missing splx in error path

from Christian Ludwig



CVS: cvs.openbsd.org: src

2022-06-14 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/06/14 03:03:46

Modified files:
share/misc : airport 

Log message:
Add Longreach airport (LRE), which I visited so long ago I had to check with
my parents.



CVS: cvs.openbsd.org: src

2022-06-01 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/06/01 21:09:39

Modified files:
sys/arch/arm64/conf: GENERIC RAMDISK 

Log message:
enable aq(4) on arm64 now that it works reasonably well



CVS: cvs.openbsd.org: src

2022-05-25 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/05/25 03:49:17

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
As with if_em.c r1.350, and for the same reasons (arm64 systems with non
cache coherent PCIe), map the rx and tx rings coherent.

tested by kevlo@ on rockpro64
ok dlg@



CVS: cvs.openbsd.org: src

2022-05-14 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/05/14 19:28:27

Modified files:
share/man/man4 : uaq.4 

Log message:
add StarTech USG5GA30 to the device list
from Brad



CVS: cvs.openbsd.org: src

2022-04-27 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/04/27 22:17:57

Modified files:
share/man/man4 : uaq.4 

Log message:
add Sabrent NT-SS5G, sort the device list alphabetically

from Brad



CVS: cvs.openbsd.org: src

2022-04-23 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/04/23 18:04:10

Modified files:
sys/dev/usb: if_uaq.c 

Log message:
Increase rx buffer size to 62kB (same as linux).  It turns out the device
doesn't fit packets into the host's rx buffer until it's full, it keeps
going as long as it has space in its own receive buffer, and then
truncates to fit the usb transfer.  The packet descriptors are at the end,
so this means losing all the packets in the buffer.  At 32kB, it's fairly
easy to overrun, but 62kB seems fine.

tested by and ok mlarkin@



CVS: cvs.openbsd.org: www

2022-04-10 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:www
Changes by: jmatt...@cvs.openbsd.org2022/04/10 21:17:10

Modified files:
.  : 71.html 

Log message:
mention msk fixes



CVS: cvs.openbsd.org: www

2022-04-10 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:www
Changes by: jmatt...@cvs.openbsd.org2022/04/10 18:21:43

Modified files:
.  : 71.html 

Log message:
tidy up wired network section a bit: put ure(4) changes next to each other,
shorten aq(4) stuff a little, dwxe(4) and dwge(4) were both made mpsafe.



CVS: cvs.openbsd.org: src

2022-04-02 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/04/02 03:00:46

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Add dmamap syncs for rings and mbufs, fixing occasional errors seen
on a rockpro64, where dma is less coherent than on typical amd64 systems.

with and ok dlg@



CVS: cvs.openbsd.org: src

2022-03-31 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/31 15:41:17

Modified files:
sys/dev/pci: files.pci if_aq_pci.c 

Log message:
If we've created multiple queues, set up an RSS key and indirection table
to distribute received packets across the queues.

ok dlg@



CVS: cvs.openbsd.org: src

2022-03-29 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/29 18:25:28

Modified files:
sys/dev/pci: if_aq_pci.c files.pci 

Log message:
If enough MSI-X vectors are available, set up multiple tx and rx queues.
In multi-vector mode, the MSI-X vector number is the same as the irq number
on the nic, so use vector/irq 0 for link interrupts, then assign one to
each pair of rx and tx queues.  We don't configure RSS yet, so packets
will only be received on the first queue, but they can be transmitted on
any queue.

ok dlg@



CVS: cvs.openbsd.org: src

2022-03-26 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/26 00:04:20

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Expand tx dma maps to allow packets up to the MTU limit to be transmitted.
Don't clear TPB_TX_BUF_EN when taking the interface down, as somehow that
causes transmission to fail when the interface comes up again if any large
packets had been sent.

Handle packets received into multiple rx buffers using the same approach as
ixl(4), with the addition that a receive error can be signaled on any of
the buffers rather than just the last one.  Set the low water mark on the
rx ring so there are always enough buffers to receive the largest packet
supported by the interface, and fix the calculation of the data pointer
in rx buffers so there's actually MCLBYTES space available.

ok dlg@



CVS: cvs.openbsd.org: src

2022-03-19 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/19 18:01:34

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Enable interrupt moderation, targeting around 20k interrupts per second.
There are separate timers for rx and tx interrupts, so we can use longer
timeouts for tx since that doesn't affect packet processing latency.

ok dlg@



CVS: cvs.openbsd.org: src

2022-03-14 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/14 20:07:21

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Enable checksum offloads.  The nic does all the work here, so we don't
need to calculate header offsets for it.

ok dlg@



CVS: cvs.openbsd.org: src

2022-03-13 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/13 04:13:54

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Enable vlan promisc and header stripping, and use vlan rx/tx offloads.
The vlan tx information takes up an extra slot on the tx ring, so this
affects the point at which we stop putting packets on the ring too.

ok dlg@



CVS: cvs.openbsd.org: src

2022-03-12 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/12 16:54:53

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Transmit segmented packets using multiple tx ring slots rather than
defragging them first.

ok dlg@



CVS: cvs.openbsd.org: src

2022-03-11 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/11 23:54:05

Modified files:
sys/dev/pci: if_rge.c 

Log message:
Constify struct cfattach, not struct cfdriver



CVS: cvs.openbsd.org: src

2022-03-11 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/11 05:14:17

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Fix receive filter handling.  Update the unicast mac address in the filter
when bringing the interface up, so it's possible to change it with
ifconfig.  Rearrange multicast handling so IFF_ALLMULTI is set correctly
and multicast ranges don't trigger promisc mode.  Perhaps most importantly,
set RPF_MCAST_FILTER_EN to 0 when we don't want all multicast traffic -
we use mac address filters to receive specific multicast groups, and the
multicast filter is programmed to accept all multicast traffic.

based on a diff from Brad
ok dlg@



CVS: cvs.openbsd.org: src

2022-03-10 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/10 04:35:13

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Invalidate the nic's rx descriptor cache when taking the interface up
or down, and turn off the global tx and rx enables when going down.
Without this, the nic can write to mbufs that were taken off the ring
when the interface was taken down, triggering mbuf cluster pool use
after free checks.

ok dlg@



CVS: cvs.openbsd.org: src

2022-03-07 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/03/07 23:56:15

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
Handle rxrinfo ioctl.

ok dlg@



CVS: cvs.openbsd.org: src

2022-02-20 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/02/20 20:50:46

Modified files:
sbin/ping  : ping.c 

Log message:
If the signature on an icmp echo reply doesn't match, don't count it as
a reply we've received, and print out the source address and sequence number
as that might help the user understand what's going on.

ok florian@ dlg@



CVS: cvs.openbsd.org: src

2022-01-07 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/01/07 17:20:10

Modified files:
sys/dev/fdt: if_dwxe.c 

Log message:
Apply mpsafe changes from dwge(4) to dwxe(4):

Rework the tx path to use the consumer and producer positions to work out
the number of slots available, and to put packets on the ring until fewer
than DWXE_NTXSEGS slots are left, making dwxe_start() and dwxe_txeof()
work independently.  While here, only write to DWXE_TX_CTL1 once
per call to dwxe_start() rather than once per packet.

Adjust the rx interrupt path to check the number of slots in use and
return slots once per interrupt.

Add interrupt and ifq barriers before taking the interface down.
With all of this done, we can mark dwxe(4) mpsafe.

tested on arm64 (a64 sopine) by mlarkin@ and armv7 (h2+) by me
ok dlg@



CVS: cvs.openbsd.org: src

2021-12-31 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/12/31 01:15:47

Modified files:
sys/dev/usb: if_uaq.c 

Log message:
Fix up handling of IFF_ALLMULTI and call uaq_iff() from uaq_init().

from Brad



CVS: cvs.openbsd.org: src

2021-12-20 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/12/20 17:23:15

Modified files:
share/man/man5 : pf.conf.5 

Log message:
Multiply the number of states in the example adaptive timeout calculation
by 10 so it works with the numbers in the config, which were previously
multiplied.

ok dlg@



CVS: cvs.openbsd.org: src

2021-12-19 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/12/19 21:21:32

Modified files:
sys/dev/fdt: if_dwge.c 

Log message:
Rework the tx path to use the consumer and producer positions to work out
the number of slots available, and to put packets on the ring until fewer
than DWGE_NTXSEGS slots are left, making dwge_start() and dwge_txeof()
work independently.  While here, only write to GMAC_TX_POLL_DEMAND once
per call to dwge_start() rather than once per packet.

Adjust the rx interrupt path to check the number of slots in use and
return slots once per interrupt.

Add interrupt and ifq barriers before taking the interface down.
With all of this done, we can mark dwge(4) mpsafe.

ok dlg@ patrick@



CVS: cvs.openbsd.org: src

2021-12-15 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/12/15 04:36:40

Modified files:
usr.sbin/ldapd : ldapd.c 

Log message:
ldapd always uses O_CREAT when reopening database files, so the database
directory must be unveiled with "rwc" rather than just "rw".

ok deraadt@ mestre@



CVS: cvs.openbsd.org: src

2021-10-09 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/10/09 02:38:13

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
No need to enable bus mastering, it's already done for us.

from Brad



CVS: cvs.openbsd.org: www

2021-10-03 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:www
Changes by: jmatt...@cvs.openbsd.org2021/10/03 20:48:17

Modified files:
.  : 70.html 

Log message:
move ure to network hardware section (it's not wireless), add bnxt msix fix



CVS: cvs.openbsd.org: src

2021-09-19 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/09/19 19:27:23

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
wire up bpf correctly

ok dlg@ deraadt@



CVS: cvs.openbsd.org: src

2021-09-19 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/09/19 19:18:00

Modified files:
sys/dev/pci: if_aq_pci.c 

Log message:
pci_mapreg_map() will assign an address to the BAR if it doesn't have one
already, so we shouldn't refuse to attach in that case.

noticed by kevlo@ on arm64
ok dlg@ deraadt@



CVS: cvs.openbsd.org: src

2021-09-13 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/09/13 03:57:48

Modified files:
sys/arch/amd64/conf: GENERIC RAMDISK_CD 

Log message:
Enable uaq(4) on amd64.  Investigations into problems on other platforms
are ongoing.



CVS: cvs.openbsd.org: src

2021-09-04 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/09/04 06:11:46

Modified files:
share/man/man4 : Makefile usb.4 
sys/dev/usb: files.usb 
Added files:
share/man/man4 : uaq.4 
sys/dev/usb: if_uaq.c 

Log message:
Add uaq(4), a driver for Aquantia AQC111U/AQC112U USB ethernet devices.

hardware provided by Brad
tested with modest success by mlarkin@, kevlo@ and Brad
ok kevlo@



CVS: cvs.openbsd.org: src

2021-08-31 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/08/31 16:56:24

Modified files:
sys/dev/usb: usbdevs.h usbdevs_data.h 

Log message:
regen



CVS: cvs.openbsd.org: src

2021-08-31 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/08/31 16:55:56

Modified files:
sys/dev/usb: usbdevs 

Log message:
Add Aquantia USB ethernet devices

from Brad originally



CVS: cvs.openbsd.org: src

2021-08-09 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/08/09 01:21:48

Modified files:
sys/dev/usb: if_aue.c if_udav.c if_ugl.c if_upl.c if_url.c 
 if_wi_usb.c 

Log message:
Fix up flags passed to usbd_open_pipe_intr() - interrupt pipes are always
opened exclusively, and the flags argument is passed to usbd_setup_xfer().
USBD_EXCLUSIVE_USE has the same value as USBD_NO_COPY, which means that
data transferred would not be copied to the buffer where the driver expects
it.

None of these drivers actually used the interrupt data for anything, and
in some the interrupt pipe code was #if 0'd out, so this doesn't change
anything, but fixing this up prevents unwary developers like me from
copying code that doesn't work.

ok mglocker@



CVS: cvs.openbsd.org: src

2021-07-23 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/07/23 23:49:59

Modified files:
sys/dev/pci: if_bnxt.c 

Log message:
Use the presence of an intrmap, rather than the number of queues, to
determine how admin interrupts are set up, so we don't get confused about
it when there's only one queue.



CVS: cvs.openbsd.org: src

2021-07-22 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2021/07/22 18:29:15

Modified files:
sys/dev/pci: if_bnxt.c if_ix.c if_ixl.c if_mcx.c if_vmx.c 
 pci.c pcivar.h 

Log message:
pci_intr_msix_count() is the function that drivers using multiple MSI-X
vectors use to decide whether to use MSI-X, so make it return 0 if MSI
is not enabled for the device.

fixes problems with ix(4) on older amd64 hardware and current riscv64
ok kettenis@ dlg@



  1   2   3   4   5   >