linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ahci: display all AHCI 1.3 HBA capability flags
@ 2009-09-20 18:16 Robert Hancock
  2009-09-20 20:39 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Hancock @ 2009-09-20 18:16 UTC (permalink / raw)
  To: ide, Jeff Garzik; +Cc: Tejun Heo

Update the AHCI driver to display all of the HBA capabilities defined in the
AHCI 1.3 specification. Some of these are in a new CAP2 (HBA Capabilities
Extended) register.

For example, on an Intel Ibex Peak (PCH) controller:

ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pmp pio slum part ems
sxs apst 

We don't do anything special with these new flags yet.

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index acd1162..d7b0f12 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -122,6 +122,7 @@ enum {
 	HOST_VERSION		= 0x10, /* AHCI spec. version compliancy */
 	HOST_EM_LOC		= 0x1c, /* Enclosure Management location */
 	HOST_EM_CTL		= 0x20, /* Enclosure Management Control */
+	HOST_CAP2		= 0x24, /* host capabilities, extended */
 
 	/* HOST_CTL bits */
 	HOST_RESET		= (1 << 0),  /* reset controller; self-clear */
@@ -2534,13 +2535,14 @@ static void ahci_print_info(struct ata_host *host)
 	struct ahci_host_priv *hpriv = host->private_data;
 	struct pci_dev *pdev = to_pci_dev(host->dev);
 	void __iomem *mmio = host->iomap[AHCI_PCI_BAR];
-	u32 vers, cap, impl, speed;
+	u32 vers, cap, cap2, impl, speed;
 	const char *speed_s;
 	u16 cc;
 	const char *scc_s;
 
 	vers = readl(mmio + HOST_VERSION);
 	cap = hpriv->cap;
+	cap2 = readl(mmio + HOST_CAP2);
 	impl = hpriv->port_map;
 
 	speed = (cap >> 20) & 0xf;
@@ -2583,7 +2585,7 @@ static void ahci_print_info(struct ata_host *host)
 		"flags: "
 		"%s%s%s%s%s%s%s"
 		"%s%s%s%s%s%s%s"
-		"%s\n"
+		"%s%s%s%s%s%s%s\n"
 		,
 
 		cap & (1 << 31) ? "64bit " : "",
@@ -2598,10 +2600,16 @@ static void ahci_print_info(struct ata_host *host)
 		cap & (1 << 19) ? "nz " : "",
 		cap & (1 << 18) ? "only " : "",
 		cap & (1 << 17) ? "pmp " : "",
+		cap & (1 << 16) ? "fbss " : "",
 		cap & (1 << 15) ? "pio " : "",
 		cap & (1 << 14) ? "slum " : "",
 		cap & (1 << 13) ? "part " : "",
-		cap & (1 << 6) ? "ems ": ""
+		cap & (1 << 7) ? "ccc " : "",
+		cap & (1 << 6) ? "ems " : "",
+		cap & (1 << 5) ? "sxs " : "",
+		cap2 & (1 << 2) ? "apst " : "",
+		cap2 & (1 << 1) ? "nvmp " : "",
+		cap2 & (1 << 0) ? "boh " : ""
 		);
 }
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-30 23:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-20 18:16 [PATCH] ahci: display all AHCI 1.3 HBA capability flags Robert Hancock
2009-09-20 20:39 ` Jeff Garzik
2009-09-20 23:02   ` [PATCH] ahci: display all AHCI 1.3 HBA capability flags (v2) Robert Hancock
2009-09-29  2:34     ` Robert Hancock
2009-09-30 23:02       ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).