2

Anyone know where I'd find an ATA reference that details the protocol for triggering a TRIM? I'm looking to discover what sort of structure/object/data I'd need to send in a raw IOCTL to get an ATA device to trigger a TRIM (assuming appropriate hardware/firmware support, obviously).

Thanks.

Mahmoud Al-Qudsi
  • 28,357
  • 12
  • 85
  • 125
  • Windows? Linux? Also, have you looked at the ATA spec for trim? – µBio Jul 16 '10 at 17:18
  • I'm looking for the actual low-level protocol - it's platform independent. IOCTLs are the same across OSes. As for whether I've looked at the ATA spec.... that's what I'm asking for a link to :) – Mahmoud Al-Qudsi Jul 16 '10 at 17:33
  • Sorry, I thought you were looking for a code sample (where you would use Linux's ioctl or Windows DeviceIoControl). Added answer re: specs. – µBio Jul 16 '10 at 17:53

1 Answers1

3

You will find more than you ever wanted to know about ATA on T13's website.

The most recent published spec ATA8 contains TRIM. It is the Data Set Management command.

This document (a clarification to an addendum to ATA8) probably has what you need.

Community
  • 1
  • 1
µBio
  • 10,668
  • 6
  • 38
  • 56
  • Thanks. If only they had a PDF/DOC without the changes tracked for first-timers! But you're right - it's definitely very much in-depth and *probably* contains everything I need :) – Mahmoud Al-Qudsi Jul 16 '10 at 18:33
  • It seems the documents are incomplete? Sections 6 is missing from e09158r0, e09158r1, e09158r2 – Mahmoud Al-Qudsi Jul 16 '10 at 18:46
  • OK, http://t13.org/Documents/UploadedDocuments/docs2008/e07154r6-Data_Set_Management_Proposal_for_ATA-ACS2.doc + http://t13.org/Documents/UploadedDocuments/docs2010/e09158r2-Trim_Clarifications.doc is the complete package. – Mahmoud Al-Qudsi Jul 16 '10 at 18:50