git: ahci: Print "Serial ATA Additional capabilities"

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Mon Nov 18 05:27:53 PST 2013


commit b989944d9c9d41d5ac043c4117d250a473e05d4e
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Nov 18 19:26:34 2013 +0800

    ahci: Print "Serial ATA Additional capabilities"
    
    The 7th bit of this field indicates whether SEND FPDMA QUEUED and
    RECEIVE FPDMA QUEUED are supported or not.  SEND FPDMA QUEUED could
    be used to support NCQ TRIM.
    
    If this bit is set, following steps are needed to determine whether
    NCQ TRIM could be used or not:
    
        READ LOG EXT (0x00, General Purpose Log Directory Log)
        if (!log8[0x26]) {
           no NCQ TRIM support
           return
        }
        READ LOG EXT (0x13, NCQ Send and Receive Log)
        if ((log32[0] & 0x1) == 0) {
           no NCQ TRIM support
           return
        }
        if ((log32[1] & 0x1) == 0) {
           no NCQ TRIM support
           return
        }
        /* NCQ TRIM is supported */

Summary of changes:
 sys/dev/disk/ahci/ahci_cam.c | 3 ++-
 sys/dev/disk/ahci/atascsi.h  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b989944d9c9d41d5ac043c4117d250a473e05d4e


-- 
DragonFly BSD source repository



More information about the Commits mailing list