Page MenuHomeFreeBSD

CAM: Add 4k quirks for Samsung 845 enterprise series SSD
ClosedPublic

Authored by hannula_gmail.com on Sep 20 2016, 10:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 11 2024, 11:28 PM
Unknown Object (File)
Jan 19 2024, 12:40 AM
Unknown Object (File)
Jan 10 2024, 1:44 AM
Unknown Object (File)
Jan 7 2024, 1:08 AM
Unknown Object (File)
Dec 22 2023, 12:23 AM
Unknown Object (File)
Oct 30 2023, 4:10 PM
Unknown Object (File)
Oct 17 2023, 2:20 PM
Unknown Object (File)
Aug 21 2023, 10:12 PM

Details

Summary

Like other Samsung SSD drives this has the same problem with queued trimming. With default kernel the SSD stops working with first trim being issued in ZFS.

root@fbsd:/usr/src # camcontrol identify ada0
pass0: <Samsung SSD 845DC PRO 400GB DXV80X3Q> ACS-2 ATA SATA 3.x device
pass0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-9 SATA 3.x
device model          Samsung SSD 845DC PRO 400GB
firmware revision     DXV80X3Q
serial number         XXX
WWN                   XXX
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         268435455 sectors
LBA48 supported       781422768 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6
media RPM             non-rotating

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
NCQ Queue Management           no
NCQ Streaming                  no
Receive & Send FPDMA Queued    yes
SMART                          yes      no
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            no       no
write-read-verify              yes      no      0/0x0
unload                         no       no
general purpose logging        yes      yes
free-fall                      no       no
Data Set Management (DSM/TRIM) yes
DSM - max 512byte blocks       yes              8
DSM - deterministic read       yes              zeroed
Host Protected Area (HPA)      yes      no      781422768/781422768
HPA - Security                 no

The drive works with no problems after the patch (replaced kernel in the installer and finished setup with new ZFS with no problems):

ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <Samsung SSD 845DC PRO 400GB DXV80X3Q> ACS-2 ATA SATA 3.x device
ada0: Serial Number XXX
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 381554MB (781422768 512 byte sectors)
ada0: quirks=0x3<4K,NCQ_TRIM_BROKEN>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

hannula_gmail.com retitled this revision from to CAM: Add 4k quirks for Samsung 845 enterprise series SSD.
hannula_gmail.com updated this object.
hannula_gmail.com edited the test plan for this revision. (Show Details)
hannula_gmail.com set the repository for this revision to rS FreeBSD src repository - subversion.

This looks good to me. Need to dig into the samsung NCQ issue though.

sys/cam/ata/ata_da.c
640 ↗(On Diff #20525)

I wonder why Linux doesn't need this quirk...

This revision is now accepted and ready to land.Jul 13 2017, 4:55 PM
This revision was automatically updated to reflect the committed changes.