Date: Sat, 22 Aug 2009 17:07:00 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 167616 for review Message-ID: <200908221707.n7MH70Yp012818@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167616 Change 167616 by mav@mav_mavbook on 2009/08/22 17:06:53 Report extended capabilities register content from AHCI 1.2. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#48 edit .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#17 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#48 (text+ko) ==== @@ -121,7 +121,7 @@ struct ahci_controller *ctlr = device_get_softc(dev); device_t child; int error, unit, speed; - u_int32_t version, caps; + u_int32_t version, caps, caps2; ctlr->dev = dev; /* if we have a memory BAR(5) we are likely on an AHCI part */ @@ -161,6 +161,7 @@ /* Announce HW capabilities. */ version = ATA_INL(ctlr->r_mem, AHCI_VS); caps = ATA_INL(ctlr->r_mem, AHCI_CAP); + caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); speed = (caps & AHCI_CAP_ISS) >> AHCI_CAP_ISS_SHIFT; device_printf(dev, "AHCI v%x.%02x with %d %sGbps ports, Port Multiplier %s\n", @@ -195,6 +196,10 @@ (caps & AHCI_CAP_EMS) ? " EM":"", (caps & AHCI_CAP_SXS) ? " eSATA":"", (caps & AHCI_CAP_NPMASK) + 1); + device_printf(dev, "Caps2:%s%s%s\n", + (caps2 & AHCI_CAP2_APST) ? " APST":"", + (caps2 & AHCI_CAP2_NVMP) ? " NVMP":"", + (caps2 & AHCI_CAP2_BOH) ? " BOH":""); } /* Attach all channels on this controller */ for (unit = 0; unit < ctlr->channels; unit++) { @@ -524,6 +529,7 @@ ch->dev = dev; ch->unit = (intptr_t)device_get_ivars(dev); ch->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); + ch->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1, resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#17 (text+ko) ==== @@ -176,6 +176,11 @@ #define AHCI_PI 0x0c #define AHCI_VS 0x10 +#define AHCI_CAP2 0x24 +#define AHCI_CAP2_BOH 0x00000001 +#define AHCI_CAP2_NVMP 0x00000002 +#define AHCI_CAP2_APST 0x00000004 + #define AHCI_OFFSET 0x100 #define AHCI_STEP 0x80 @@ -336,6 +341,7 @@ struct cam_sim *sim; struct cam_path *path; uint32_t caps; /* Controller capabilities */ + uint32_t caps2; /* Controller capabilities */ int numslots; /* Number of present slots */ int pm_level; /* power management level */ int sata_rev; /* Maximum allowed SATA generation */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908221707.n7MH70Yp012818>