Date: Wed, 20 Jan 2010 22:23:14 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 173435 for review Message-ID: <201001202223.o0KMNE7u030086@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=173435 Change 173435 by mav@mav_mavtest on 2010/01/20 22:23:06 Log enclosure management capabilities. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#97 edit .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#33 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#97 (text+ko) ==== @@ -336,6 +336,8 @@ ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); if (version >= 0x00010020) ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); + if (ctlr->caps & AHCI_CAP_EMS) + ctlr->capsem = ATA_INL(ctlr->r_mem, AHCI_EM_CTL); ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); if (ctlr->quirks & AHCI_Q_1CH) { ctlr->caps &= ~AHCI_CAP_NPMASK; @@ -405,6 +407,17 @@ (ctlr->caps2 & AHCI_CAP2_NVMP) ? " NVMP":"", (ctlr->caps2 & AHCI_CAP2_BOH) ? " BOH":""); } + if (bootverbose && (ctlr->caps & AHCI_CAP_EMS)) { + device_printf(dev, "EM Caps: %s%s%s%s%s%s%s%s\n", + (ctlr->capsem & AHCI_EM_PM) ? " PM":"", + (ctlr->capsem & AHCI_EM_ALHD) ? " ALHD":"", + (ctlr->capsem & AHCI_EM_XMT) ? " XMT":"", + (ctlr->capsem & AHCI_EM_SMB) ? " SMB":"", + (ctlr->capsem & AHCI_EM_SGPIO) ? " SGPIO":"", + (ctlr->capsem & AHCI_EM_SES2) ? " SES-2":"", + (ctlr->capsem & AHCI_EM_SAFTE) ? " SAF-TE":"", + (ctlr->capsem & AHCI_EM_LED) ? " LED":""); + } /* Attach all channels on this controller */ for (unit = 0; unit < ctlr->channels; unit++) { if ((ctlr->ichannels & (1 << unit)) == 0) ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#33 (text+ko) ==== @@ -186,6 +186,20 @@ #define AHCI_CCCC_EN 0x00000001 #define AHCI_CCCP 0x18 +#define AHCI_EM_LOC 0x1C +#define AHCI_EM_CTL 0x20 +#define AHCI_EM_MR 0x00000001 +#define AHCI_EM_TM 0x00000100 +#define AHCI_EM_RST 0x00000200 +#define AHCI_EM_LED 0x00010000 +#define AHCI_EM_SAFTE 0x00020000 +#define AHCI_EM_SES2 0x00040000 +#define AHCI_EM_SGPIO 0x00080000 +#define AHCI_EM_SMB 0x01000000 +#define AHCI_EM_XMT 0x02000000 +#define AHCI_EM_ALHD 0x04000000 +#define AHCI_EM_PM 0x08000000 + #define AHCI_CAP2 0x24 #define AHCI_CAP2_BOH 0x00000001 #define AHCI_CAP2_NVMP 0x00000002 @@ -402,6 +416,7 @@ } irqs[16]; uint32_t caps; /* Controller capabilities */ uint32_t caps2; /* Controller capabilities */ + uint32_t capsem; /* Controller capabilities */ int quirks; int numirqs; int channels;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001202223.o0KMNE7u030086>