]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cciss: add transport mode attribute to sys
authorJoe Handzik <joseph.t.handzik@beardog.cce.hp.com>
Mon, 8 Aug 2011 09:40:17 +0000 (11:40 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Mon, 8 Aug 2011 09:40:17 +0000 (11:40 +0200)
Signed-off-by: Joseph Handzik <joseph.t.handzik@beardog.cce.hp.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
drivers/block/cciss.c

index f5bb0a3bb8c0d5d18bdcfdd2bf8ce70765ed4dc5..53d99edd1d75acf45fc63152b111d5fbcc6ea202 100644 (file)
@@ -71,3 +71,10 @@ Description: Value of 1 indicates the controller can honor the reset_devices
                a dump device, as kdump requires resetting the device in order
                to work reliably.
 
+Where:         /sys/bus/pci/devices/<dev>/ccissX/transport_mode
+Date:          July 2011
+Kernel Version:        3.0
+Contact:       iss_storagedev@hp.com
+Description:   Value of "simple" indicates that the controller has been placed
+               in "simple mode". Value of "performant" indicates that the
+               controller has been placed in "performant mode".
index 61f0b5b6a415c8d2a9b9e92f08d59a5b0ddd8b97..6da7edea700a274815fb4367598478197a853f4e 100644 (file)
@@ -641,6 +641,18 @@ static ssize_t host_store_rescan(struct device *dev,
 }
 static DEVICE_ATTR(rescan, S_IWUSR, NULL, host_store_rescan);
 
+static ssize_t host_show_transport_mode(struct device *dev,
+                                struct device_attribute *attr,
+                                char *buf)
+{
+       struct ctlr_info *h = to_hba(dev);
+
+       return snprintf(buf, 20, "%s\n",
+               h->transMethod & CFGTBL_Trans_Performant ?
+                       "performant" : "simple");
+}
+static DEVICE_ATTR(transport_mode, S_IRUGO, host_show_transport_mode, NULL);
+
 static ssize_t dev_show_unique_id(struct device *dev,
                                 struct device_attribute *attr,
                                 char *buf)
@@ -813,6 +825,7 @@ static DEVICE_ATTR(usage_count, S_IRUGO, cciss_show_usage_count, NULL);
 static struct attribute *cciss_host_attrs[] = {
        &dev_attr_rescan.attr,
        &dev_attr_resettable.attr,
+       &dev_attr_transport_mode.attr,
        NULL
 };