From patchwork Sun Sep 20 18:16:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 33963 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id CC781B7B68 for ; Mon, 21 Sep 2009 04:16:50 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751079AbZITSQp (ORCPT ); Sun, 20 Sep 2009 14:16:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753616AbZITSQp (ORCPT ); Sun, 20 Sep 2009 14:16:45 -0400 Received: from mail-yw0-f173.google.com ([209.85.211.173]:46658 "EHLO mail-yw0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbZITSQo (ORCPT ); Sun, 20 Sep 2009 14:16:44 -0400 Received: by ywh3 with SMTP id 3so2925672ywh.22 for ; Sun, 20 Sep 2009 11:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=dp9EBw+9JaJ0SdvVtNi8gsEC48Q98UbdI84kRCzl7aA=; b=c/+vTWvMRCoBhtKbRCSrebwiellKhpbgkqndG70FkdAdhAq3K9BKCsCGKJcp+UhdA+ EZUIcTyH2hRiuuXcQr3fbKewhfu1zcIm8Gygib8AU6TgWEtEIXHGIK7EBSfs3rmhk0yN 1Ia6+gpLOUE2hOmFwh5KWR4iMVuSIsA17pMJ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=lLgUesiO6TH6FigUWAP1fkDWBhBW9bvBtqGkeCu2yNYy7H8mDxXqunxGn69uZHh6Kk KLgti4bTmyru4u7U7AXYbDINg9oKyUusj0lwYCHPK/LJN7snyQ4+xN2QNrnOMMl9RCGw ZZcU8d2w2fXDO07z2jfpleF2+nS5KNCMnySJ4= Received: by 10.150.175.1 with SMTP id x1mr6903919ybe.45.1253470607923; Sun, 20 Sep 2009 11:16:47 -0700 (PDT) Received: from ?192.168.1.148? (S0106000c41bb86e1.ss.shawcable.net [70.76.47.20]) by mx.google.com with ESMTPS id 21sm1574799ywh.1.2009.09.20.11.16.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 20 Sep 2009 11:16:47 -0700 (PDT) Message-ID: <4AB6718C.2050107@gmail.com> Date: Sun, 20 Sep 2009 12:16:44 -0600 From: Robert Hancock User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 MIME-Version: 1.0 To: ide , Jeff Garzik CC: Tejun Heo Subject: [PATCH] ahci: display all AHCI 1.3 HBA capability flags Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 --- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 " : "" ); }