From: Joe Handzik <joseph.t.handzik@beardog.cce.hp.com>
To: axboe@kernel.dk
Cc: linux-kernel@vger.kernel.org, stephenmcameron@gmail.com,
scameron@beardog.cce.hp.com, akpm@linux-foundation.org,
mikem@beardog.cce.hp.com, thenzl@redhat.com
Subject: [PATCH 2/2] cciss: add transport mode attribute to sys
Date: Wed, 27 Jul 2011 16:38:36 -0500 [thread overview]
Message-ID: <20110727213835.13453.64091.stgit@beardog.cce.hp.com> (raw)
In-Reply-To: <20110727213830.13453.15208.stgit@beardog.cce.hp.com>
From: Joseph Handzik <joseph.t.handzik@beardog.cce.hp.com>
Signed-off-by: Joseph Handzik <joseph.t.handzik@beardog.cce.hp.com>
---
.../ABI/testing/sysfs-bus-pci-devices-cciss | 7 +++++++
drivers/block/cciss.c | 13 +++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
index f5bb0a3..53d99ed 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
+++ b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
@@ -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".
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 61f0b5b..6da7ede 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -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
};
next prev parent reply other threads:[~2011-07-27 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 21:38 [PATCH 1/2] cciss: Adds simple mode functionality Joe Handzik
2011-07-27 21:38 ` Joe Handzik [this message]
2011-08-02 19:19 ` [PATCH 2/2] cciss: add transport mode attribute to sys scameron
2011-08-02 19:19 ` [PATCH 1/2] cciss: Adds simple mode functionality scameron
2011-08-03 18:32 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110727213835.13453.64091.stgit@beardog.cce.hp.com \
--to=joseph.t.handzik@beardog.cce.hp.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=mikem@beardog.cce.hp.com \
--cc=scameron@beardog.cce.hp.com \
--cc=stephenmcameron@gmail.com \
--cc=thenzl@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox