[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: adding support for a possibly unsupported M.2 harddrive?
ng0 <ng0%n0.is@localhost> writes:
> Hi folx,
> 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.
> Its dmesg:
> [ 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).
> Two question paths:
> 1. How would I go about (no prior device driver writing
> experience) adding this to NetBSD?
My impression is that disk drives do not need explicit support for
normal operations. I have attached a number of ssd, both mSATA and
regular SATA, which simply worked as any other drive.
The missing device type in <> is surprising, but it's not clear that
this is a real issue or related to your problem.
I would check if you can read and write (destroying the label of course)
to the disk with dd.
Look at src/sys/dev/ata/wd.c:wdattach() which I think is what is
printing the attachment messages. See the call to wd_get_params() in
that function. There are debug defines you can turn on. Expect your
first time in the kernel to be an extended learning experience.
Main Index |
Thread Index |