SSD, AHCI, and TRIM

RU482

Lifer
Apr 9, 2000
12,689
3
81
can someone point me to a document that ties AHCI to TRIM....or to put it more clearly, specifies that AHCI is a prerequisite for TRIM to function?

thanks
 

bryanW1995

Lifer
May 22, 2007
11,144
32
91
It's not necessary to use ahci for trim. I ran my x25 m g2 for 2 yrs in IDE mode and I ran trim 5-6 times per year.
 

Old Hippie

Diamond Member
Oct 8, 2005
6,361
1
0
can someone point me to a document that ties AHCI to TRIM....or to put it more clearly, specifies that AHCI is a prerequisite for TRIM to function?

thanks
I can't and good question.

I've never assumed that one required another.

I'm sure someone else will know.
 

Coup27

Platinum Member
Jul 17, 2010
2,140
3
81
+1 to the above.

AHCI is a more sophisticated way for the SATA controllers to operate. AHCI is faster than IDE.

TRIM is something completely difference and works in IDE or AHCI mode.
 

LokutusofBorg

Golden Member
Mar 20, 2001
1,065
0
76
AHCI enables, for instance, NCQ and SATA hot-swap. AHCI is just an enhancement to the ATA spec. TRIM is built into the ATA spec.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0

Heh, nice call out. Still insisting that TRIM is causing your issues? Even when the Linux OS doesn't enable it by default? Yet you are insisting it is "TRIM issues" causing your SATA to IDE bridge to fail?

I will admit that I am wrong in the sense that AHCI is required.

However reading here:
http://www.t13.org/documents/UploadedDocuments/docs2009/d2015r1a-ATAATAPI_Command_Set_-_2_ACS-2.pdf

indicates

7.10 DATA SET MANAGEMENT - 06h, DMA
7.10.1 Feature Set
This 48-bit command is optional for devices that implement the General feature set.
7.10.2 Description
The purpose of the DATA SET MANAGEMENT command is for host to provide file system information for device
optimization.

Meaning prior to March 2009, some IDE controllers [and drivers] will simply mark op code 06h as invalid. Prior the code was "reserved." AHCI turns on the advanced commands, often including allowing these commands to pass. Generally the rule is "AHCI" because that means the controller and likely the firmware / OS are new enough to understand the command.
 
Last edited:

RU482

Lifer
Apr 9, 2000
12,689
3
81
not insisting, rather trying to understand. I'm not 100% comfortable with "The SSD may be sending data to fast for it" explanation....if that were true, why would the system work after TRIM is disabled in the OS?
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
not insisting, rather trying to understand. I'm not 100% comfortable with "The SSD may be sending data to fast for it" explanation....if that were true, why would the system work after TRIM is disabled in the OS?

The point was Linux [all versions of ubuntu at least] don't enable it by default and you were still having issues. This would lead to TRIM not being your issue. One of the main reasons of the SATA cable was to move to serial because it could be ramped up and didn't suffer from the crosstalk on the PATA cable. The 80 pin cable tried to ground out the noise but it didn't always do that well when reaching the limits of the cable. Add in a cable that has bent breaking and you could have the faster drives become unstable due to a high data CRC error count.

Also the part that confuses me is that Windows 7 (per MS) requires an ACHI driver to enable TRIM, which makes me wonder why it activates on a PATA controller. I guess it is possible somewhere along the line a TRIM supported PATA driver was released.
 

Coup27

Platinum Member
Jul 17, 2010
2,140
3
81
I find it quite funny how you've split another fork of your argument into another section.

Why are you using an IDE to SATA bridge? Why cannot you use either an IDE or SATA HDD? (whichever way it's working).

Anyway, I don't understand what you're doing.

TRIM is a command that only SSDs recognise. If you open up a program like crystaldiskinfo and select a HDD you will see that TRIM is greyed out. HDD's do not support or recognise TRIM. If you are having issues installing an OS onto a HDD, TRIM is not involved regardless if you are using IDE mode, AHCI, or some funky bridge.
 

Coup27

Platinum Member
Jul 17, 2010
2,140
3
81
he's probably referring to the intel ssd toolbox which allows you to manually TRIM your drive. It was a feature provided for XP users or users who use a storage driver which does not support TRIM.
 

RU482

Lifer
Apr 9, 2000
12,689
3
81
I find it quite funny how you've split another fork of your argument into another section.

Why are you using an IDE to SATA bridge? Why cannot you use either an IDE or SATA HDD? (whichever way it's working).

Anyway, I don't understand what you're doing.

TRIM is a command that only SSDs recognise. If you open up a program like crystaldiskinfo and select a HDD you will see that TRIM is greyed out. HDD's do not support or recognise TRIM. If you are having issues installing an OS onto a HDD, TRIM is not involved regardless if you are using IDE mode, AHCI, or some funky bridge.

The bridge is a burden caused by the menlow (Intel Atom Z5xx series) only having PATA natively. The product originally featured a PATA interface, and no problems with Win7 or Linux installation. Later in production, the manufacturer integrated a PATA to SATA bridge IC into the design, using a bridge from Genesys Logic. This is where my problems with Win7 and trim enabled SSDs came into play. Later, they switched the bridge IC to a newer Marvell IC, and the TRIM issues went away.

PATA hard drives became to difficult to source....this is the reason behind the integration of the bridge to provide a SATA interface.

I won't get into why we were locked into this design, I just had to create the work arounds.
 

Coup27

Platinum Member
Jul 17, 2010
2,140
3
81
After reading the threads you have linked to it definately seems odd your problem. I have zero knowledge of Linux so cannot help.
 
Last edited:

bryanW1995

Lifer
May 22, 2007
11,144
32
91
probably means running the SSD Optimizer in the Intel SSD Toolbox

Yes, that was it. I installed the ssd toolbox right after buying the drive and never updated the firmware. I never set it up to run automatically, and I would sometimes go 3-4 months between TRIM's. It's much harder to spot the need for TRIM when your laptop and work computer both use 5400 rpm drives. I was kind of a slacker back then, anyway, b/c I never bothered to diagnose why I was unable to enable AHCI in my bios, either.