CVS: cvs.openbsd.org: src

2024-09-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/09/04 01:54:53

Modified files:
sys/arch/amd64/amd64: trap.c vmm_machdep.c 
sys/arch/hppa/include: mplock.h 
sys/arch/hppa/spmath: md.h 
sys/arch/i386/i386: trap.c 
sys/arch/luna88k/luna88k: disksubr.c 
sys/arch/macppc/dev: zs.c 
sys/arch/powerpc/include: mplock.h 
sys/arch/riscv64/dev: plic.c 
sys/arch/riscv64/riscv64: pmap.c 
sys/arch/sh/sh : interrupt.c vectors.S 
sys/arch/sparc64/dev: fb.c zs.c 
sys/arch/sparc64/sparc64: locore.s 
sys/arch/sparc64/stand/bootblk: bootblk.fth 
sys/crypto : siphash.h 
sys/ddb: db_elf.c 
sys/dev: kstat.c 
sys/dev/acpi   : atk0110.c 
sys/dev/ata: atascsi.c 
sys/dev/cardbus: com_cardbus.c 
sys/dev/i2c: i2c_scan.c 
sys/dev/ic : ahci.c aic6360.c aic6360var.h aic79xx.c 
 aic79xx.h aic7xxx.c atwvar.h fxpreg.h gemvar.h 
 ncr53c9xvar.h osiopvar.h sili.c trm.c trm.h 
sys/dev/pci: arc.c auich.c i82365_pci.c if_bge.c if_devar.h 
 if_em_hw.c if_em_hw.h if_ix.c if_nxe.c if_sk.c 
 if_tht.c ixgbe_type.h maestro.c qla_pci.c qle.c 
 qlw_pci.c vmwpvs.c 
sys/dev/pci/bktr: bktr_audio.c 
sys/dev/pv : xenreg.h 
sys/dev/sbus   : uperf_sbusreg.h 
sys/dev/usb: if_axe.c usb.c xhcireg.h 
sys/dev/x86emu : x86emu.c 
sys/lib/libkern/arch/arm: divsi3.S 
sys/lib/libkern/arch/mips64: memmove.S 
sys/msdosfs: msdosfs_vnops.c 
sys/net: if_aggr.c pf.c 
sys/net80211   : ieee80211_node.c 
sys/netinet6   : nd6.c 
sys/nfs: nfs_socket.c nfs_subs.c 
sys/ntfs   : ntfs_vfsops.c 
sys/scsi   : safte.c scsi_base.c scsiconf.c sd.c ses.h st.c 
sys/stand/efi/include: efiapi.h eficonsctl.h efidef.h efifs.h 
   efiprot.h 
sys/ufs/ext2fs : ext2fs_vfsops.c 
sys/uvm: uvm_addr.c uvm_swap.c 

Log message:
Fix some spelling.

Input and ok jmc@, jsg@



CVS: cvs.openbsd.org: src

2024-08-30 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/30 12:22:41

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Spelling



CVS: cvs.openbsd.org: src

2024-08-24 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/24 01:04:29

Modified files:
games/quiz/datfiles: index 

Log message:
Make clear it's about *ship* parts when you list the quiz(6) subjects.

ok jmc@



Re: CVS: cvs.openbsd.org: src

2024-08-23 Thread Marcus Glocker
On Fri, Aug 23, 2024 at 11:29:08AM -0600, Theo de Raadt wrote:

> CVSROOT:  /cvs
> Module name:  src
> Changes by:   dera...@cvs.openbsd.org 2024/08/23 11:29:08
> 
> Modified files:
>   games/quiz : Makefile 
>   games/quiz/datfiles: index 
> Added files:
>   games/quiz/datfiles: ship 
> Removed files:
>   games/quiz/datfiles: greek 
> 
> Log message:
> The greek quiz is so obscure that it is ridiculous -- noone can play
> this.  Replace it with a new quiz about galley (ship) parts.  This
> commit changes the *LAST UNMODIFIED ORIGINAL FILE* (meaning revision
> 1.1.1.1) from the original import that created OpenBSD on Oct 18,
> 1995.  With this commit, we have completed an amusing mission of
> replacing the final parts of the original OpenBSD.
> 
> We have reached OpenBSD of Theseus.
> 
> ideas & assistance from mglocker, naval terminology help from jmc
> 

Nice :-)

But one little thing.  Somebody looking at the quiz index will not
notice that this is about ships:

$ /usr/games/quiz | grep desc   
description part

We could do:

$ /usr/games/quiz | grep desc   
ship-description part

or

$ /usr/games/quiz | grep desc   
ship part


Index: games/quiz/datfiles/index
===
RCS file: /cvs/src/games/quiz/datfiles/index,v
diff -u -p -u -p -r1.4 index
--- games/quiz/datfiles/index   23 Aug 2024 17:29:08 -  1.4
+++ games/quiz/datfiles/index   23 Aug 2024 18:53:00 -
@@ -11,7 +11,7 @@
 /usr/share/games/quiz.db/elements:symbol:number:weight:element
 /usr/share/games/quiz.db/europe:Europe{an}:cap{ital}
 /usr/share/games/quiz.db/flowers:flower{s}:meaning
-/usr/share/games/quiz.db/ship:description:part
+/usr/share/games/quiz.db/ship:ship-description:part
 /usr/share/games/quiz.db/inca:inca:succ{essor}
 /usr/share/games/quiz.db/latin:latin:english
 /usr/share/games/quiz.db/locomotive:locomotive:name

Index: games/quiz/datfiles/index
===
RCS file: /cvs/src/games/quiz/datfiles/index,v
diff -u -p -u -p -r1.4 index
--- games/quiz/datfiles/index   23 Aug 2024 17:29:08 -  1.4
+++ games/quiz/datfiles/index   23 Aug 2024 18:53:00 -
@@ -11,7 +11,7 @@
 /usr/share/games/quiz.db/elements:symbol:number:weight:element
 /usr/share/games/quiz.db/europe:Europe{an}:cap{ital}
 /usr/share/games/quiz.db/flowers:flower{s}:meaning
-/usr/share/games/quiz.db/ship:description:part
+/usr/share/games/quiz.db/ship:ship:part
 /usr/share/games/quiz.db/inca:inca:succ{essor}
 /usr/share/games/quiz.db/latin:latin:english
 /usr/share/games/quiz.db/locomotive:locomotive:name



CVS: cvs.openbsd.org: src

2024-08-23 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/23 09:22:59

Modified files:
games/quiz : naphone2areas.sh 

Log message:
Speed up script by using awk(1).

Discussed with deraadt@



CVS: cvs.openbsd.org: src

2024-08-21 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/21 22:34:19

Modified files:
games/quiz : Makefile 
Added files:
games/quiz : naphone2areas.sh 
Removed files:
games/quiz/datfiles: areas 

Log message:
Generate areas datfile from /usr/share/misc/na.phone during make.

A deraadt/mglocker production



CVS: cvs.openbsd.org: src

2024-08-21 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/21 22:29:41

Modified files:
games/quiz/datfiles: seq-easy 

Log message:
Add Tribonacci number sequence.

Proposed by Anisja Mayer (math. student from Basel).

ok deraadt@



CVS: cvs.openbsd.org: src

2024-08-21 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/21 13:39:09

Modified files:
share/misc : na.phone 

Log message:
Fix typo.

ok deraadt@



CVS: cvs.openbsd.org: src

2024-08-20 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/20 22:29:43

Modified files:
games/quiz/datfiles: sexes 

Log message:
Add lions.

suggested and ok jmc@



CVS: cvs.openbsd.org: src

2024-08-20 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/20 22:28:05

Modified files:
games/quiz/datfiles: morse 

Log message:
Add numeric morse codes.

ok jmc@



CVS: cvs.openbsd.org: src

2024-08-20 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/20 22:27:02

Modified files:
games/quiz/datfiles: babies 

Log message:
Hippo and rhino babies are also calf's.

ok jmc@



CVS: cvs.openbsd.org: src

2024-08-20 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/20 22:25:26

Modified files:
games/quiz/datfiles: arith 

Log message:
Add new substraction problem which difference results in the answer to the
ultimate question of life, the universe, and everything.

ok jmc@



CVS: cvs.openbsd.org: src

2024-08-14 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/14 04:54:58

Modified files:
sys/dev/fdt: qcpmic.c qcspmi.c 

Log message:
In a qcspmi_cmd_read() error case, the register is only returning the error
bit, not SPMI_STATUS_DONE.  Therefore, catch the error at the right place,
and print the specific error type.

ok patrick@



CVS: cvs.openbsd.org: src

2024-08-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/04 14:10:38

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

Log message:
Fix typo.

ok kettenis@



CVS: cvs.openbsd.org: src

2024-08-01 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/01 15:55:48

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

Log message:
Add qcgpio at fdt.

ok kettenis@



CVS: cvs.openbsd.org: src

2024-08-01 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/08/01 05:53:03

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

Log message:
Add device tree mapping for Samsung Galaxy Book4 Edge.

ok kettenis@



CVS: cvs.openbsd.org: src

2024-07-31 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/07/31 04:07:33

Modified files:
share/man/man4 : ufshci.4 
sys/arch/arm64/conf: GENERIC RAMDISK 
sys/dev/fdt: files.fdt 
Added files:
sys/dev/fdt: ufshci_fdt.c 

Log message:
Add ufshci(4) at fdt support.

This lets me boot the Samsung Galaxy Book4 Edge in DT mode with ufshci(4),
based on a WIP DTB file.

ok kettenis@



CVS: cvs.openbsd.org: src

2024-07-30 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/07/30 13:47:06

Modified files:
sys/arch/arm64/conf: GENERIC RAMDISK 
sys/dev/acpi   : acpi.c files.acpi 
Added files:
sys/dev/acpi   : acpisectwo.c 

Log message:
Make the Samsung Galaxy Book4 Edge (x1e80100) boot in ACPI mode;
Until now the kernel did panic during early boot because we couldn't
respond to the battery requests sent to the 0xa1 "bus".  This (dummy)
driver registers a 0xa1 region space very early, and responds with a
static zero value to satisfy the battery requests on 0xa1, which let us
boot successfully to multi-user.

In the future this machine should be operated in FDT mode, and an improved
AML parsing interface might make this workaround obsolete also for RAMDISK.

Help and OK kettenis@, deraadt@



CVS: cvs.openbsd.org: src

2024-07-15 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/07/15 09:33:54

Modified files:
sys/dev/acpi   : qcgpio.c 

Log message:
Make the touchpad on the Samsung Galaxy Book4 Edge work.

ok patrick@



CVS: cvs.openbsd.org: src

2024-06-27 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/06/27 15:35:34

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Clear interrupt before we process the request as specified in the
documentation.



CVS: cvs.openbsd.org: src

2024-06-24 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/06/24 09:56:07

Modified files:
sys/dev/acpi   : acpibat.c 

Log message:
Some machines send AC change notifications to acpibat(4).  Forward this
notification to acpiac(4), so that the AC status can be reflected correctly
to programs like apm(8).

This for example fixes the AC status on the Microsoft Surface Go 4.

Help from kettenis@

ok deraadt@, kettenis@



CVS: cvs.openbsd.org: src

2024-06-15 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/06/15 12:26:25

Modified files:
sys/dev/ic : ufshci.c ufshcireg.h 

Log message:
To my current knowledge, UFSHCI has a single target design.  Reflect this
in the code, and remove some XXXs by that.  No functional changes.



CVS: cvs.openbsd.org: src

2024-06-14 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/06/14 07:38:15

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Improve return value handling of functions.

no objections from deraadt@



CVS: cvs.openbsd.org: src

2024-06-08 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/06/08 10:05:23

Modified files:
gnu/llvm/llvm/lib/Target/X86: X86RetClean.cpp 

Log message:
Fix typo in last commits comment.



CVS: cvs.openbsd.org: src

2024-06-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/06/04 22:58:05

Modified files:
sys/arch/amd64/amd64: hibernate_machdep.c 
sys/dev/ic : ufshci.c 

Log message:
Now that our hibernation sub-system supports 4096 byte sectors, add
hibernation support for ufshci(4).

Input from kettenis@, krw@, deraadt@, mlarkin@.

ok mlarkin@, deraadt@



CVS: cvs.openbsd.org: src

2024-06-03 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/06/03 06:01:57

Modified files:
sys/dev/ic : nvme.c 

Log message:
Remove superfluous pmap_extract() call in the hibernation path.

ok jsg@



CVS: cvs.openbsd.org: src

2024-05-29 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/29 07:56:49

Modified files:
sys/conf   : files 

Log message:
Set 'needs-flag' for ufshci(4) as preparation for some future hibernate
code.  Remove obsolete comment while here as pointed out by kettenis@.

ok kettenis@



CVS: cvs.openbsd.org: src

2024-05-27 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/27 04:27:59

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Use SCSI xfer timeout value for doorbell register status polling instead of
an own introduced timeout value.  This fixes an SCSI SYNC command timeout
seen during suspend.



CVS: cvs.openbsd.org: src

2024-05-24 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/24 14:34:06

Modified files:
sys/dev/ic : ufshci.c ufshcireg.h 

Log message:
Enable UFS "Auto-Hibernation".  From the documentation:
Auto-hibernate allows the host controller to put UniPro link into Hibernate
state autonomously.



CVS: cvs.openbsd.org: src

2024-05-24 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/24 03:51:14

Modified files:
sys/dev/pci: ufshci_pci.c 
sys/dev/ic : ufshci.c ufshcireg.h ufshcivar.h 

Log message:
Add support for suspend/resume.

ok dlg@



CVS: cvs.openbsd.org: src

2024-05-22 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/22 12:10:00

Modified files:
sys/dev/ic : ufshcireg.h 

Log message:
Fix some bogus masking for the HCS (Host Controller Status) register.



CVS: cvs.openbsd.org: src

2024-05-22 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/22 05:46:06

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Make the interrupt status poll function generic, rather than for only one
status type.  We'll use it later on to query more interrupt status types.



CVS: cvs.openbsd.org: src

2024-05-21 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/21 12:19:22

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Remove obsolete comment, and fix some spacing.



CVS: cvs.openbsd.org: src

2024-05-21 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/21 10:09:00

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Only enable BUS_DMA_64BIT if the controller supports it.



CVS: cvs.openbsd.org: src

2024-05-20 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/20 14:08:05

Modified files:
sys/dev/ic : ufshci.c ufshcireg.h 

Log message:
Introduce some macros for static intr. aggr. and slot integers, and  do
more strict checking on the slot count.



CVS: cvs.openbsd.org: src

2024-05-20 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/20 06:42:45

Modified files:
sys/dev/ic : ufshci.c ufshcivar.h 

Log message:
Add flag to switch between normal interrupts (one interrupt per completed
command) and interrupt aggregation (one interrupt per  completed
commands).  For now, enable normal interrupts by default, since it has
turned out that this works better for us currently (see comment in the diff
for more details).

Discussed with dlg@



CVS: cvs.openbsd.org: src

2024-05-19 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/19 14:24:03

Modified files:
sys/dev/ic : ufshci.c ufshcivar.h 

Log message:
Use aggregation interrupts like stated in the documentation;  Setup values
(counter and timeout) during device init, reset values once commands have
been completed.  This also let us get rid of the 'sc_intraggr_enabled'
variable.



CVS: cvs.openbsd.org: src

2024-05-16 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/16 04:52:11

Modified files:
sys/dev/ic : ufshci.c ufshcireg.h 

Log message:
As of the documentation, the value of the Command UPIU expected_xfer_len
field shall be the product of the Logical Block Size and the transfer
length field of the CDB.



CVS: cvs.openbsd.org: src

2024-05-15 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/15 14:15:33

Modified files:
sys/dev/ic : ufshcivar.h 

Log message:
Remove unused variable.



CVS: cvs.openbsd.org: src

2024-05-15 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/15 14:10:27

Modified files:
sys/dev/ic : ufshci.c ufshcireg.h 

Log message:
Fix multi-slot support.
We also add an timeout while waiting for command completion.



CVS: cvs.openbsd.org: src

2024-05-15 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/15 12:01:10

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Also free CCBs in the error case.  Fixes an intermittent panic seen on
arm64.



CVS: cvs.openbsd.org: src

2024-05-12 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/12 06:20:36

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Introduce debugging levels, to make debugging a bit more useful.



CVS: cvs.openbsd.org: src

2024-05-10 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/10 04:49:10

Modified files:
sys/dev/hid: hid.c hidms.c 

Log message:
Make the kernel compile also when turning on debugging.

ok mpi@



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/10 00:14:10

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Fix broken debugging.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 11:05:22

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

Log message:
Enable ufshci(4) on amd64.

ok kettenis@ deraadt@



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:24:09

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Back then I faced intermittent file-system corruptions for which setting
FUA (Force Unit Access) did help.  In the meantime it turned out that
those file-system corruptions were most likely caused by the slot issues.
Now that we fixed the slot management and limited to one slot for now,
remove FUA again, which increases the write performance significantly.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:21:52

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Sprinkle some more DPRINTFs.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:20:22

Modified files:
sys/dev/ic : ufshcireg.h 

Log message:
Pack hardware descriptor structures.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:18:20

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Parse the OCS response value for completed commands, and set error on
failure.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:16:32

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Perform bus DMA synchronization to update the command descriptors.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:13:57

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Use 1U for bit operations on 32-bit registers.

Proposed by dlg@



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:12:22

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Don't do math on KVA to get the required slot offset since that could
cause invalid pointers depending on the compiler interpretation of
(void *).  Instead work with the structure pointer itself.

Proposed by dlg@



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:09:17

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Don't use the task id for UPIU commands.  We don't use task management
commands yet.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:06:42

Modified files:
sys/dev/ic : ufshci.c ufshcireg.h ufshcivar.h 

Log message:
Don't schedule interrupt aggregation when commands are still in-progress.
As of the documentation:

"NOTE Write operations to IACTH and IATOVAL are only allowed when no
commands are outstanding."

Instead we only schedule interrupt aggregation at the start of the
SCSI command call, when all commands have completed.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:04:48

Modified files:
sys/dev/ic : ufshci.c ufshcivar.h 

Log message:
Prevent that scheduling of new commands is interfering with processing
of completed commands with a command mutex.



CVS: cvs.openbsd.org: src

2024-05-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/05/09 02:02:59

Modified files:
sys/dev/ic : ufshci.c ufshcivar.h 

Log message:
Don't relay on the doorbell register to track our slots.  As of the
documentation:

"UTRLDBR is a volatile register; software should only use its value to
determine commands that have completed, not to determine which commands
have previously been issued."

Instead we use the CCB structure to track our slots, as proposed by dlg@.

CAVEAT: Since using more than one slot is currently causing OCS errors,
we limit the slots to one until we can find a solution.



CVS: cvs.openbsd.org: src

2024-04-19 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/04/19 14:43:33

Modified files:
sys/dev/ic : ufshcireg.h 

Log message:
As of the documentation, the UTP Command Descriptor Base Address (UCDBA)
needs to be aligned on a 128-byte address.

This fixes an issue seen on the PCI controller, where a DMA transfer
scheduled on a odd slot will fail.



CVS: cvs.openbsd.org: src

2024-04-10 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/04/10 04:40:27

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

Log message:
Remove obsolete headers.

Spotted by jsg@



CVS: cvs.openbsd.org: src

2024-04-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/04/09 14:18:37

Modified files:
share/man/man4 : acpi.4 pci.4 

Log message:
Add ufshci(4) to pci(4).  While there, add ahci(4) to acpi(4).

Suggested and ok jmc@



CVS: cvs.openbsd.org: src

2024-04-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/04/09 08:58:41

Modified files:
share/man/man4 : ufshci.4 
sys/dev/pci: files.pci 
Added files:
sys/dev/pci: ufshci_pci.c 

Log message:
Add PCI support for ufshci(4).  Tested on the Microsoft Surface Go 4.

CAVEATS:
The ufshci(4) openings need to be limited to 1 currently, otherwise
file system corruptions have been identified using PCI.  I hope this
can be fixed soon.

Help and ok jsg@, kettenis@



CVS: cvs.openbsd.org: src

2024-02-16 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/02/16 15:30:54

Modified files:
sys/dev/pci: if_em.c if_em.h if_em_hw.h 

Log message:
Re-introduce TSO support after we've implemented fixes for the two reported
issues:

1. Unaligned memory access panic on sparc64 -> Made ether_extract_headers()
memory alignment safe.
2. em(4) watchdog timeouts in conjunction with ix(4)/vlan(4) -> Fixed
RX/LRO packet size calculation used for TSO tagging in ix(4).

Extensive testing done by bluhm@ on amd64 and sparc64 based on different
chips.
Testing done on Hrvoje Popovskis ix(4)/em(4)/vlan(4) setup from where the
issue 2 was reported.

OK bluhm@



Re: CVS: cvs.openbsd.org: src

2024-02-15 Thread Marcus Glocker
On Thu, Feb 15, 2024 at 03:56:53AM -0700, Marcus Glocker wrote:

> CVSROOT:  /cvs
> Module name:  src
> Changes by:   mgloc...@cvs.openbsd.org2024/02/15 03:56:53
> 
> Modified files:
>   sys/dev/pci: if_ix.c 
> 
> Log message:
> Fix bogus packet length calculation in the RX/LRO path, which can lead to
> TSO tagging forwarded packets which shouldn't.  This will also fix the em(4)
> watchdog timeouts seen after the em(4) TSO commit.
> 
> Thanks to Hrvoje Popovski for providing the infrastructure the reproduce
> the issue, and test the fix.
> 
> Discussed with bluhm@.  OK claudio@

And OK bluhm@



CVS: cvs.openbsd.org: src

2024-02-15 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/02/15 03:56:53

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

Log message:
Fix bogus packet length calculation in the RX/LRO path, which can lead to
TSO tagging forwarded packets which shouldn't.  This will also fix the em(4)
watchdog timeouts seen after the em(4) TSO commit.

Thanks to Hrvoje Popovski for providing the infrastructure the reproduce
the issue, and test the fix.

Discussed with bluhm@.  OK claudio@



CVS: cvs.openbsd.org: src

2024-01-28 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/01/28 11:42:58

Modified files:
sys/dev/pci: if_em.c if_em.h if_em_hw.h 

Log message:
Back out the TSO support diff, since we got issues reported for which
no solution could be found.  Known issues at this point:

1. sparc64 panics, probably because of an alignment issue in struct
tcphdr { th_off }.  A diff for potentially fixing the alignment issue
exists, but testing is pending.
2. Watchdogs reported on the I350 chip, which can't be reproduced on own
hardware.



CVS: cvs.openbsd.org: src

2024-01-06 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/01/06 10:47:43

Modified files:
sys/dev/acpi   : ufshci_acpi.c 
sys/dev/ic : ufshci.c 

Log message:
Zap more obsolete debug code.



CVS: cvs.openbsd.org: src

2024-01-06 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/01/06 06:23:47

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Unify UFS command function arguments a bit.



CVS: cvs.openbsd.org: src

2024-01-06 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/01/06 06:04:04

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Merge read/write UFS commands in to one single function, since they are very
similar.



CVS: cvs.openbsd.org: src

2024-01-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/01/04 14:35:56

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Zap some '#if 0' code which was initially required for debugging.



CVS: cvs.openbsd.org: src

2024-01-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/01/04 14:02:30

Modified files:
sys/dev/ic : ufshcireg.h 

Log message:
Set the interrupt aggregation counter down to 1, which fixes the read
performance from ~20MB/s to ~220MB/s.



CVS: cvs.openbsd.org: src

2024-01-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/01/04 06:30:20

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Fix timeout value for write command (typo).



CVS: cvs.openbsd.org: src

2024-01-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2024/01/04 05:22:35

Modified files:
sys/dev/ic : ufshci.c 

Log message:
Pass SCSI command directly to the UFS command descriptor instead of
decoding/encoding it.

Suggested and OK kettenis@



CVS: cvs.openbsd.org: src

2023-12-31 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2023/12/31 01:42:33

Modified files:
sys/dev/pci: if_em.c if_em.h if_em_hw.h 

Log message:
Add TCP Segmentation Offload (TSO) support for em(4).  Following chip-sets
are currently known to support TSO;  82575, 82576, 82580, I350, and I210.

Suggested by claudio@.  Feedback and testing from many on tech@.

OK bluhm@



Re: CVS: cvs.openbsd.org: src

2023-12-04 Thread Marcus Glocker
And ok miod@

> ROOT: /cvs
> Module name:  src
> Changes by:   mgloc...@cvs.openbsd.org2023/12/03 22:28:25
>
> Modified files:
>   sys/dev/usb: uthum.c
>
> Log message:
> Make the TEMPer{1,2} devices display minus degC.  From the NetBSD driver.
>
> ok deraadt@



CVS: cvs.openbsd.org: src

2023-12-03 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2023/12/03 22:28:25

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

Log message:
Make the TEMPer{1,2} devices display minus degC.  From the NetBSD driver.

ok deraadt@



CVS: cvs.openbsd.org: src

2023-11-08 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2023/11/08 11:59:01

Modified files:
sys/arch/i386/include: param.h 

Log message:
Increase NKMEMPAGES_MAX_DEFAULT to same value as on amd64.

OK deraadt@



CVS: cvs.openbsd.org: src

2023-04-10 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2023/04/10 22:45:11

Modified files:
sys/dev/acpi   : qcgpio.c 

Log message:
Nuke unused function prototype.
Only acknowledge interrupts when one was active.

ok kettenis@



CVS: cvs.openbsd.org: src

2023-04-05 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2023/04/05 11:23:30

Modified files:
sys/dev/ic : ufshci.c 

Log 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."



CVS: cvs.openbsd.org: src

2023-03-31 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2023/03/31 13:50:46

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

Log message:
Enable ufshci(4).

ok kettenis@



CVS: cvs.openbsd.org: src

2023-02-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2023/02/04 16:11:59

Modified files:
share/man/man4 : Makefile 
sys/arch/arm64/conf: GENERIC 
sys/conf   : files 
sys/dev/acpi   : files.acpi 
Added files:
share/man/man4 : ufshci.4 
sys/dev/acpi   : ufshci_acpi.c 
sys/dev/ic : ufshci.c ufshcireg.h ufshcivar.h 

Log message:
Initial driver for Universal Flash Storage (UFS) Host Controllers.

ok kettenis@



CVS: cvs.openbsd.org: src

2022-12-18 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/12/18 03:00:53

Modified files:
sys/dev/acpi   : qcgpio.c 

Log message:
Disable the keyboard on the Samsung Galaxy Book Go until we can fix the
resulting interrupt storm.  It's causing bad system performance, and breaks
the installer.



CVS: cvs.openbsd.org: src

2022-10-25 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/10/25 13:32:18

Modified files:
sys/dev/i2c: pijuice.c 

Log message:
Calculate approx. battery re-charge time.



CVS: cvs.openbsd.org: src

2022-10-24 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/10/24 12:34:29

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

Log message:
We recently added support for the DS1339.



CVS: cvs.openbsd.org: src

2022-10-23 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/10/23 22:28:01

Modified files:
sys/dev/i2c: pijuice.c 

Log message:
Fix comment;  sconds -> seconds



CVS: cvs.openbsd.org: src

2022-10-23 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/10/23 12:43:00

Modified files:
share/man/man4 : Makefile iic.4 
sys/arch/arm64/conf: GENERIC 
sys/dev/i2c: files.i2c 
Added files:
share/man/man4 : pijuice.4 
sys/dev/i2c: pijuice.c 

Log message:
Initial apm/sensor driver for the PiJuice HAT UPS, to feedback battery
status information.

ok deraadt@



CVS: cvs.openbsd.org: src

2022-10-20 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/10/20 04:35:35

Modified files:
sys/dev/i2c: ds1307.c 

Log message:
Remove the single part string for DS1339, since that is only required on
sparc64 because OpenFirmware doesn't support the , compatible
pattern.  We don't expect this chip to turn up on sparc64.

Suggested and ok kettenis@



CVS: cvs.openbsd.org: src

2022-10-18 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/10/18 10:07:59

Modified files:
sys/dev/i2c: ds1307.c 

Log message:
Add support for the DS1339 RTC, like found on the PiJuice.

>From Michal Mynar -- Thanks!

ok deraadt@



CVS: cvs.openbsd.org: src

2022-10-07 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/10/08 00:55:49

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

Log message:
regen



CVS: cvs.openbsd.org: src

2022-10-07 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/10/08 00:53:06

Modified files:
share/man/man4 : uwacom.4 
sys/dev/usb: usbdevs uwacom.c 

Log message:
Add Wacom One M CTL-672 USB tablet.



CVS: cvs.openbsd.org: src

2022-09-18 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/18 15:12:19

Modified files:
sys/dev/usb/dwc2: dwc2.c dwc2_hcd.c 

Log message:
Fix a memory leak which was introduced by the previous commit.

The issue was reported by Stephan Somogyi - Thanks!



CVS: cvs.openbsd.org: src

2022-09-15 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/15 12:03:52

Modified files:
sys/dev/acpi   : qcgpio.c 

Log message:
Enable the keyboard on the Samsung Galaxy Book Go.

Help from kettenis@, "Nice!" deraadt@



CVS: cvs.openbsd.org: src

2022-09-10 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/10 02:13:16

Modified files:
sys/dev/usb/dwc2: dwc2.c dwc2var.h 

Log message:
Finally, only allocate the number of frames for isoc transfers which we
really need.  The static allocation workaround in the code
(DWC2_MAXISOCPACKETS) was required because the NetBSD allocx USB method
has a second argument to pass nframes already there, which we don't
have.

Regression tested with video play, audio play, audio record.

ok mpi@



CVS: cvs.openbsd.org: src

2022-09-09 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/09 15:16:54

Modified files:
sys/dev/usb/dwc2: dwc2.c dwc2_hcd.c dwc2_hcdqueue.c 

Log message:
Let pool_get(9) do the memory initialisation directly.

ok kettenis@



CVS: cvs.openbsd.org: src

2022-09-08 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/08 13:32:54

Modified files:
sys/dev/usb/dwc2: dwc2_coreintr.c 

Log message:
There is no need to uncomment the clock gating exit/enter gadget functions,
since we define them void anyway.



CVS: cvs.openbsd.org: src

2022-09-08 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/08 13:18:46

Modified files:
sys/dev/usb/dwc2: dwc2_coreintr.c 

Log message:
There is no need to uncomment the call_gadget macro, since in our driver
it's getting defined void anyway.



CVS: cvs.openbsd.org: src

2022-09-08 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/08 13:02:04

Modified files:
sys/dev/usb/dwc2: dwc2_core.c 

Log message:
Zap inactive gadget functions.



CVS: cvs.openbsd.org: src

2022-09-08 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/08 12:16:26

Modified files:
sys/dev/usb/dwc2: dwc2_hcdqueue.c 
Added files:
sys/dev/usb/dwc2: bitmap.h 

Log message:
Move bitmap functions to a new home.

ok kettenis@



CVS: cvs.openbsd.org: src

2022-09-05 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/05 14:11:44

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

Log message:
Remove some inactive code, comments, and DPRINTFs.  Minor style changes.



CVS: cvs.openbsd.org: src

2022-09-05 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/05 03:00:34

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

Log message:
Cleanup USB methods so that they align to what we do in other HC drivers,
like xhci(4) and ehci(4).

ok mpi@



CVS: cvs.openbsd.org: src

2022-09-04 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/09/04 02:42:40

Modified files:
sys/arch/octeon/dev: octdwctwo.c 
sys/dev/fdt: bcm2835_dwctwo.c 
sys/dev/usb: uhub.c usbdivar.h 
sys/dev/usb/dwc2: dwc2.c dwc2.h dwc2_core.c dwc2_core.h 
  dwc2_coreintr.c dwc2_hcd.c dwc2_hcd.h 
  dwc2_hcdddma.c dwc2_hcdintr.c dwc2_hcdqueue.c 
  dwc2_hw.h dwc2var.h files.dwc2 
Added files:
sys/dev/usb/dwc2: dwc2_params.c gcd.h 

Log message:
Improve periodic USB transfers (device intr, isoc) used for input
devices, audio, and video.  It's still not perfect, and will need
further improvements.

High level, the diff contains following changes:

* Sync up with the Linux code base, which did re-work the periodic
scheduling code path.
* Run the driver in IPL_VM instead of IPL_USB to prioritize us before
lower/equal interrupts (same what NetBSD does).
* Add two new flags to our USB stack required by the updated driver
code:
- 'multi' flag in the usbd_hub structure to keep track whether
a hub has one Transaction Translator for all ports (single TT)
or one Transaction Translator per port (multi TT).
- 'hcpriv' pointer in the usbd_tt structure for the HC driver to
allocate memory for the scheduling depending on single or multi TT.

"go for it" kettenis@



CVS: cvs.openbsd.org: src

2022-08-27 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2022/08/27 14:31:45

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

Log message:
Remove unused mutex.

ok kettenis@



  1   2   3   4   5   >