Inside drivers/ata/libata-scsi.c:

       if (ata_ncq_enabled(dev) && ata_fpdma_dsm_supported(dev)) {
                /* Newer devices support queued TRIM commands */
                tf->protocol = ATA_PROT_NCQ;
                tf->command = ATA_CMD_FPDMA_SEND;
                tf->hob_nsect = ATA_SUBCMD_FPDMA_SEND_DSM & 0x1f;
                tf->nsect = qc->tag << 3;
                tf->hob_feature = (size / 512) >> 8;
                tf->feature = size / 512;

                tf->auxiliary = 1;
        } else {

so perhaps following the command mentioned above (decode the macro first) 
you can issue the command to the SATA drive?

I know the specs are difficult to read, but nonetheless, as I skim through 
it, it seemed quite detailed and potentially can be used to construct the 
command properly:

https://www.google.com.sg/search?q=site%3At13.org+queued+trim

On Wednesday, April 2, 2014 1:21:07 PM UTC+8, ll...@storvisor.com wrote:
>
> Any one could point to a document or sample code?
>
> Thanks, Lei
>

-- 
You received this message because you are subscribed to the Google Groups 
"linuxkernelnewbies" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linuxkernelnewbies+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to