Author: mav
Date: Thu Jul 25 10:29:40 2013
New Revision: 253647
URL: http://svnweb.freebsd.org/changeset/base/253647

Log:
  Decode some bits defined in AHCI 1.3.1 Device Sleep Technical Proposal.
  For now this is only conmetics to report HBA capabilities (Haswell?).
  
  Submitted by: Dmitry Luhtionov <dmitryluhtio...@gmail.com>

Modified:
  head/sys/dev/ahci/ahci.c
  head/sys/dev/ahci/ahci.h

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c    Thu Jul 25 09:30:00 2013        (r253646)
+++ head/sys/dev/ahci/ahci.c    Thu Jul 25 10:29:40 2013        (r253647)
@@ -538,7 +538,10 @@ ahci_attach(device_t dev)
                    (ctlr->caps & AHCI_CAP_NPMASK) + 1);
        }
        if (bootverbose && version >= 0x00010200) {
-               device_printf(dev, "Caps2:%s%s%s\n",
+               device_printf(dev, "Caps2:%s%s%s%s%s%s\n",
+                   (ctlr->caps2 & AHCI_CAP2_DESO) ? " DESO":"",
+                   (ctlr->caps2 & AHCI_CAP2_SADM) ? " SADM":"",
+                   (ctlr->caps2 & AHCI_CAP2_SDS) ? " SDS":"",
                    (ctlr->caps2 & AHCI_CAP2_APST) ? " APST":"",
                    (ctlr->caps2 & AHCI_CAP2_NVMP) ? " NVMP":"",
                    (ctlr->caps2 & AHCI_CAP2_BOH) ? " BOH":"");

Modified: head/sys/dev/ahci/ahci.h
==============================================================================
--- head/sys/dev/ahci/ahci.h    Thu Jul 25 09:30:00 2013        (r253646)
+++ head/sys/dev/ahci/ahci.h    Thu Jul 25 10:29:40 2013        (r253647)
@@ -100,6 +100,7 @@
 #define         ATA_SS_IPM_ACTIVE       0x00000100
 #define         ATA_SS_IPM_PARTIAL      0x00000200
 #define         ATA_SS_IPM_SLUMBER      0x00000600
+#define         ATA_SS_IPM_DEVSLEEP     0x00000800
 
 #define ATA_SERROR                      14
 #define         ATA_SE_DATA_CORRECTED   0x00000001
@@ -205,6 +206,9 @@
 #define                AHCI_CAP2_BOH   0x00000001
 #define                AHCI_CAP2_NVMP  0x00000002
 #define                AHCI_CAP2_APST  0x00000004
+#define                AHCI_CAP2_SDS   0x00000008
+#define                AHCI_CAP2_SADM  0x00000010
+#define                AHCI_CAP2_DESO  0x00000020
 
 #define AHCI_OFFSET                 0x100
 #define AHCI_STEP                   0x80
@@ -262,6 +266,7 @@
 #define         AHCI_P_CMD_ACTIVE   0x10000000
 #define         AHCI_P_CMD_PARTIAL  0x20000000
 #define         AHCI_P_CMD_SLUMBER  0x60000000
+#define         AHCI_P_CMD_DEVSLEEP 0x80000000
 
 #define AHCI_P_TFD                  0x20
 #define AHCI_P_SIG                  0x24
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to