[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>
This commit is contained in:
parent
dc4adbf413
commit
d1ad94ad77
1 changed files with 28 additions and 0 deletions
|
@ -689,6 +689,18 @@ static ssize_t aac_show_serial_number(struct class_device *class_dev,
|
||||||
return len;
|
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 = {
|
static struct class_device_attribute aac_model = {
|
||||||
.attr = {
|
.attr = {
|
||||||
|
@ -732,6 +744,20 @@ static struct class_device_attribute aac_serial_number = {
|
||||||
},
|
},
|
||||||
.show = aac_show_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[] = {
|
static struct class_device_attribute *aac_attrs[] = {
|
||||||
&aac_model,
|
&aac_model,
|
||||||
|
@ -740,6 +766,8 @@ static struct class_device_attribute *aac_attrs[] = {
|
||||||
&aac_monitor_version,
|
&aac_monitor_version,
|
||||||
&aac_bios_version,
|
&aac_bios_version,
|
||||||
&aac_serial_number,
|
&aac_serial_number,
|
||||||
|
&aac_max_channel,
|
||||||
|
&aac_max_id,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue