rpms/kernel/devel linux-2.6-ahci-export-capabilities.patch, NONE, 1.1 kernel.spec, 1.1789, 1.1790
Matthew Garrett
mjg59 at fedoraproject.org
Thu Sep 10 16:11:32 UTC 2009
- Previous message (by thread): rpms/qbittorrent/devel .cvsignore, 1.13, 1.14 qbittorrent.spec, 1.32, 1.33 sources, 1.13, 1.14 icons_qrc.patch, 1.1, NONE
- Next message (by thread): rpms/java-1.6.0-openjdk/devel .cvsignore, 1.60, 1.61 java-1.6.0-openjdk.spec, 1.133, 1.134 sources, 1.67, 1.68 java-1.6.0-openjdk-execvpe.patch, 1.1, NONE java-1.6.0-openjdk-makefile.patch, 1.13, NONE java-1.6.0-openjdk-netxandplugin.patch, 1.1, NONE java-1.6.0-openjdk-securitypatches.patch, 1.3, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mjg59
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29280
Modified Files:
kernel.spec
Added Files:
linux-2.6-ahci-export-capabilities.patch
Log Message:
* Thu Sep 10 2009 Matthew Garrett <mjg at redhat.com>
- linux-2.6-ahci-export-capabilities.patch: Backport from upstream
linux-2.6-ahci-export-capabilities.patch:
ahci.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
--- NEW FILE linux-2.6-ahci-export-capabilities.patch ---
commit 489b070aa53cb6a70494f53d9d8bd4c8570439e4
Author: Matthew Garrett <mjg at redhat.com>
Date: Fri Jul 17 20:06:06 2009 +0100
libata: Export AHCI capabilities
AHCI exports various capability bits that may be of interest to userspace
such as whether the BIOS claims a port is hotpluggable or eSATA. Providing
these via sysfs along with the version of the AHCI spec implemented by
the host allows userspace to make policy decisions for things like ALPM.
Signed-off-by: Matthew Garrett <mjg at redhat.com>
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 336eb1e..5a5c160 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -327,10 +327,24 @@ static ssize_t ahci_activity_store(struct ata_device *dev,
enum sw_activity val);
static void ahci_init_sw_activity(struct ata_link *link);
+static ssize_t ahci_show_host_caps(struct device *dev,
+ struct device_attribute *attr, char *buf);
+static ssize_t ahci_show_host_version(struct device *dev,
+ struct device_attribute *attr, char *buf);
+static ssize_t ahci_show_port_cmd(struct device *dev,
+ struct device_attribute *attr, char *buf);
+
+DEVICE_ATTR(ahci_host_caps, S_IRUGO, ahci_show_host_caps, NULL);
+DEVICE_ATTR(ahci_host_version, S_IRUGO, ahci_show_host_version, NULL);
+DEVICE_ATTR(ahci_port_cmd, S_IRUGO, ahci_show_port_cmd, NULL);
+
static struct device_attribute *ahci_shost_attrs[] = {
&dev_attr_link_power_management_policy,
&dev_attr_em_message_type,
&dev_attr_em_message,
+ &dev_attr_ahci_host_caps,
+ &dev_attr_ahci_host_version,
+ &dev_attr_ahci_port_cmd,
NULL
};
@@ -696,6 +710,36 @@ static void ahci_enable_ahci(void __iomem *mmio)
WARN_ON(1);
}
+static ssize_t ahci_show_host_caps(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct Scsi_Host *shost = class_to_shost(dev);
+ struct ata_port *ap = ata_shost_to_port(shost);
+ struct ahci_host_priv *hpriv = ap->host->private_data;
+
+ return sprintf(buf, "%x\n", hpriv->cap);
+}
+
+static ssize_t ahci_show_host_version(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct Scsi_Host *shost = class_to_shost(dev);
+ struct ata_port *ap = ata_shost_to_port(shost);
+ void __iomem *mmio = ap->host->iomap[AHCI_PCI_BAR];
+
+ return sprintf(buf, "%x\n", readl(mmio + HOST_VERSION));
+}
+
+static ssize_t ahci_show_port_cmd(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct Scsi_Host *shost = class_to_shost(dev);
+ struct ata_port *ap = ata_shost_to_port(shost);
+ void __iomem *port_mmio = ahci_port_base(ap);
+
+ return sprintf(buf, "%x\n", readl(port_mmio + PORT_CMD));
+}
+
/**
* ahci_save_initial_config - Save and fixup initial config values
* @pdev: target PCI device
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1789
retrieving revision 1.1790
diff -u -p -r1.1789 -r1.1790
--- kernel.spec 10 Sep 2009 05:35:19 -0000 1.1789
+++ kernel.spec 10 Sep 2009 16:11:31 -0000 1.1790
@@ -662,6 +662,7 @@ Patch610: hda_intel-prealloc-4mb-dmabuff
Patch611: alsa-tell-user-that-stream-to-be-rewound-is-suspended.patch
Patch670: linux-2.6-ata-quirk.patch
+Patch671: linux-2.6-ahci-export-capabilities.patch
Patch680: linux-2.6-rt2x00-asus-leds.patch
Patch681: linux-2.6-mac80211-age-scan-results-on-resume.patch
@@ -1283,6 +1284,9 @@ ApplyPatch linux-2.6-silence-fbcon-logo.
# ia64 ata quirk
ApplyPatch linux-2.6-ata-quirk.patch
+# Make it possible to identify non-hotplug SATA ports
+ApplyPatch linux-2.6-ahci-export-capabilities.patch
+
# rt2x00: back-port activity LED init patches
#ApplyPatch linux-2.6-rt2x00-asus-leds.patch
@@ -2010,6 +2014,9 @@ fi
# and build.
%changelog
+* Thu Sep 10 2009 Matthew Garrett <mjg at redhat.com>
+- linux-2.6-ahci-export-capabilities.patch: Backport from upstream
+
* Thu Sep 10 2009 Ben Skeggs <bskeggs at redhat.com>
- drm-nouveau.patch: add some scaler-only modes for LVDS, GEM/TTM fixes
- Previous message (by thread): rpms/qbittorrent/devel .cvsignore, 1.13, 1.14 qbittorrent.spec, 1.32, 1.33 sources, 1.13, 1.14 icons_qrc.patch, 1.1, NONE
- Next message (by thread): rpms/java-1.6.0-openjdk/devel .cvsignore, 1.60, 1.61 java-1.6.0-openjdk.spec, 1.133, 1.134 sources, 1.67, 1.68 java-1.6.0-openjdk-execvpe.patch, 1.1, NONE java-1.6.0-openjdk-makefile.patch, 1.13, NONE java-1.6.0-openjdk-netxandplugin.patch, 1.1, NONE java-1.6.0-openjdk-securitypatches.patch, 1.3, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list