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)
Mon, Dec 16, 9:54 PM
Unknown Object (File)
Oct 31 2024, 10:03 AM
Unknown Object (File)
Oct 2 2024, 8:32 AM
Unknown Object (File)
Oct 1 2024, 10:38 PM
Unknown Object (File)
Sep 24 2024, 5:37 PM
Unknown Object (File)
Sep 21 2024, 10:19 AM
Unknown Object (File)
Sep 18 2024, 12:47 AM
Unknown Object (File)
Sep 13 2024, 6:49 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 Skipped
Unit
Tests Skipped

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

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.