K 10 svn:author V 3 imp K 8 svn:date V 27 2015-03-06T00:23:23.716708Z K 7 svn:log V 908 Implement "NCQ TRIM" by using Send First Party DMA commands with a Dataset Management subcommand and setting the TRIM bit. For drives that support this method of TRIM, better latency is expected because TRIMs no longer act as a gating event forcing the queue to drain before they are executed and holding off new commands while the TRIM finishes. We still impose a one-at-a-time limit of the TRIMs, though that could be relaxed (though you start running into fairness issues if you have a lot of TRIMs competing with other I/Os), so that optimization is left for the future. Add a flag for supporting the NCQ DSM TRIM extention to the ata_cmd structure. Add a flag to adversize that the SIM knows how to do said kludge. When NCQ DSM Trim fails, fall back to normal DSM Trim. However, treat the original trim as advisory and don't reissue it. The stack is too fragile at this point in the code to risk it. END