summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2006-03-27 09:44:29 -0800
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-13 10:13:21 -0500
commitd1ad94ad773c34a5a3491f9dcc0a97e264f971f6 (patch)
tree77d23e9005837c42278f9032d4f919b167473e4f /drivers/scsi
parentdc4adbf41385486b0c73e7382ce73f0e8b873243 (diff)
downloadop-kernel-dev-d1ad94ad773c34a5a3491f9dcc0a97e264f971f6.zip
op-kernel-dev-d1ad94ad773c34a5a3491f9dcc0a97e264f971f6.tar.gz
[SCSI] aacraid: Show max channel and max id is sysfs
Received from Mark Salyzyn Add max_channel and max_id sysfs parameters. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aacraid/linit.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index eaf429b..3642328 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -689,6 +689,18 @@ static ssize_t aac_show_serial_number(struct class_device *class_dev,
return len;
}
+static ssize_t aac_show_max_channel(struct class_device *class_dev, char *buf)
+{
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+ class_to_shost(class_dev)->max_channel);
+}
+
+static ssize_t aac_show_max_id(struct class_device *class_dev, char *buf)
+{
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+ class_to_shost(class_dev)->max_id);
+}
+
static struct class_device_attribute aac_model = {
.attr = {
@@ -732,6 +744,20 @@ static struct class_device_attribute aac_serial_number = {
},
.show = aac_show_serial_number,
};
+static struct class_device_attribute aac_max_channel = {
+ .attr = {
+ .name = "max_channel",
+ .mode = S_IRUGO,
+ },
+ .show = aac_show_max_channel,
+};
+static struct class_device_attribute aac_max_id = {
+ .attr = {
+ .name = "max_id",
+ .mode = S_IRUGO,
+ },
+ .show = aac_show_max_id,
+};
static struct class_device_attribute *aac_attrs[] = {
&aac_model,
@@ -740,6 +766,8 @@ static struct class_device_attribute *aac_attrs[] = {
&aac_monitor_version,
&aac_bios_version,
&aac_serial_number,
+ &aac_max_channel,
+ &aac_max_id,
NULL
};
OpenPOWER on IntegriCloud