I have an M.2 SSD for which I have to assume no support exists so far
in NetBSD 9.99.17.
This is an "TREKSTOR M.2 SSD-Modul 64 GB" bought in 2018.
[ 3.739718] wd1 at atabus1 drive 0
[ 3.739718] wd1: <>
[ 3.739718] wd1: drive supports 1-sector PIO transfers, LBA48 addressing
[ 3.739718] wd1: 61057 MB, 124053 cyl, 16 head, 63 sec, 512 bytes/sect x 125045424 sectors
[ 3.739718] wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133), WRITE DMA FUA, NCQ (32 tags)
[ 3.739718] wd1(ahcisata0:1:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA), NCQ (31 tags)
With fdisk I can see an earlier partition I created on another
system, but making any changes to partitioning etc pp operations
on disk fail (I can reproduce the information how it fails).
It seems it's configured to attach as AHCI instead of NVMe. Can you check if there are any relevant BIOS settings, which would make it available as NVMe?
Nevertheless, even when attached via AHCI it shouldn't give errors. Can you please post specific errors from kernel when you try to do the partitioning?