# FYI - SSD and SATA3 ports



## Crotalus (Dec 7, 2020)

My system drive was getting full so I decided to upgrade to a SSD. What I found.
This may be a help to other people out there.
First the environment;

```
FreeBSD 12.2-RELEASE-p1 GENERIC amd64
FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
VT(vga): resolution 640x480
CPU: AMD FX(tm)-6300 Six-Core Processor              (3492.50-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x600f20  Family=0x15  Model=0x2  Stepping=0
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x3e98320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x1ebbfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,TCE,NodeId,TBM,Topology,PCXC,PNXC>
  Structured Extended Features=0x8<BMI1>
  SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=65536
  TSC: P-state invariant, performance statistics
real memory  = 25769803776 (24576 MB)
avail memory = 24951009280 (23795 MB)
```
I had no problems moving the old HDD to a larger SSD.
The SSD;

```
ada0: <Samsung SSD 860 EVO 500GB RVT04B6Q> ACS-4 ATA SATA 3.x device
ada0: Serial Number S598NJ0NA46584E
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 476940MB (976773168 512 byte sectors)
```
My problem came when I started to get the dreaded errors;

```
Dec  7 03:05:13 Prometheus kernel: (ada0:ahcich0:0:0:0): WRITE_FPDMA_QUEUED. ACB: 61 40 40 5c fe 40 00 00 00 00 00 00
Dec  7 03:05:13 Prometheus kernel: (ada0:ahcich0:0:0:0): CAM status: Uncorrectable parity/CRC error
Dec  7 03:05:13 Prometheus kernel: (ada0:ahcich0:0:0:0): Retrying command, 3 more tries remain
Dec  7 03:05:44 Prometheus kernel: (ada0:ahcich0:0:0:0): READ_FPDMA_QUEUED. ACB: 60 40 80 b5 7c 40 01 00 00 00 00 00
Dec  7 03:05:44 Prometheus kernel: (ada0:ahcich0:0:0:0): CAM status: ATA Status Error
Dec  7 03:05:44 Prometheus kernel: (ada0:ahcich0:0:0:0): ATA status: 41 (DRDY ERR), error: 84 (ICRC ABRT )
Dec  7 03:05:44 Prometheus kernel: (ada0:ahcich0:0:0:0): RES: 41 84 80 b5 7c 00 01 00 00 40 00
Dec  7 03:05:44 Prometheus kernel: (ada0:ahcich0:0:0:0): Retrying command, 3 more tries remain
```

I changed the cable, tried every port on the motherboard with same problem. The motherboard is an ASRock 970 Extreme3 R2.0. It has 5 SATA3 ports on the board. When I put the new SSD on an addin controller card everything works with out a problem.

Here is the port from the motherboard;

```
ahci0: <AMD SB7x0/SB8x0/SB9x0 AHCI SATA controller> port 0xf090-0xf097,0xf080-0xf083,0xf070-0xf077,0xf060-0xf063,0xf050-0xf05f mem 0xfe50b000-0xfe50b3ff irq 19 at device 17.0 on pci0
ahci0: AHCI v1.20 with 4 6Gbps ports, Port Multiplier supported
ahci0: quirks=0x22000<ATI_PMP_BUG,1MSI>
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
```

Here is the ports from the add in controller card;

```
ahci1: <ASMedia ASM1062 AHCI SATA controller> port 0xc050-0xc057,0xc040-0xc043,0xc030-0xc037,0xc020-0xc023,0xc000-0xc01f mem 0xfe210000-0xfe2101ff irq 16 at device 0.0 on pci4
ahci1: AHCI v1.20 with 2 6Gbps ports, Port Multiplier supported
ahci1: quirks=0xc00000<NOCCS,NOAUX>
ahcich4: <AHCI channel> at channel 0 on ahci1
ahcich5: <AHCI channel> at channel 1 on ahci1
```

New SSD is now ada5.

For those people out there that knows more about this stuff than I do, I have a few questions.
1. Is the SSD defective in any way?
2. Is the SSD not compatible with the hardware?
3. Does the AMD SB7x0/SB8x0/SB9x0 AHCI SATA controller not support a SSD or this particular SSD?
4. Does the bios not support SSDs?
5. Does the bios need updating?

```
Vendor: American Megatrends Inc.
Version: P1.60
Release Date: 06/05/2014
BIOS Revision: 4.6Vendor: American Megatrends Inc.
Version: P1.60
Release Date: 06/05/2014
BIOS Revision: 4.6
```

Thanks for the replies.


----------



## richardtoohey2 (Dec 7, 2020)

Searching for that particular MB and the word "SSD" gives a few matches e.g. https://forums.linuxmint.com/viewtopic.php?t=154683

EDIT: Not saying anything in that link matches what you'd need to do, just that other people have seen issues.

But you can find matches for most things on the internet these days!


----------



## ralphbsz (Dec 7, 2020)

The error log (with the parity error) tells you that communication with the SSD worked well enough so the OS and motherboard were able to establish that the SATA device is an SSD, but not well enough for production usage. And the parity/CRC error is a very low-level thing. So replacing the SATA cable was the correct reaction. Since that didn't work ... the next suspects are the SSD itself (very unlikely, Samsung is a quality brand), the motherboard (very unlikely), the OS (possible, although this is a very up-to-date version, but it is also a new technology CPU), and perhaps the power supply (very unlikely, SSD power consumption is low but fluctuates with IO, and the SSD worked on the card).

Honestly, I don't know what to replace next. You may just have to use the SSD on the add-in card for now, and try to file a bug report.

Note that there was another report this morning of someone having SATA problems in a similar CPU/motherboard, but different FreeBSD version.


----------



## Crotalus (Dec 8, 2020)

Ralphbsz,

Thanks to all for the comments.

The SSD is a new one, never used with a manufactures date of 17 MAY 2020.
I copied my system drive using "dd" and then resizing it and growing it. There was no errors spit out during this process.

I worked the new drive from the add-in controller using a perl script I wrote to backup the system from a "cron" execution using "tar" to create a compressed tar ball on another drive. No read problems at all. I compiled Firefox as it uses a lot of CPU and disk writes and reads. No problems at all. I don't have a problem using the add-on controller as it works fine, so far.

It would be interesting to know what chip set was on the SATA controller that the person that reported a problem with their system. Was it the same as my motherboard? It is an older board and no new bios is available.

Just a funny note: I bought the new drive at MicroCenter. The young person that helped me, I told him I was replacing a Seagate 2.5" 15K RPM Ultra-320 SCSI drive. He had no Idea what I was talking about. Eliminating the SCSI cable gave the case a lot of new empty space.


----------



## ralphbsz (Dec 8, 2020)

The other person who has a similar problem had an ASRock S570 motherboard: https://forums.freebsd.org/threads/ccb-request-was-invalid.77967/
They just wrote that their problem didn't go away when running an up-to-date FreeBSD or when running Linux, so they are returning their motherboard.


----------

