diff options
author | Mark Haverkamp <markh@osdl.org> | 2006-03-27 12:44:29 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-13 11:13:21 -0400 |
commit | d1ad94ad773c34a5a3491f9dcc0a97e264f971f6 (patch) | |
tree | 77d23e9005837c42278f9032d4f919b167473e4f /drivers/scsi/aacraid/linit.c | |
parent | dc4adbf41385486b0c73e7382ce73f0e8b873243 (diff) |
[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/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index eaf429b8778e..364232858f71 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, | |||
689 | return len; | 689 | return len; |
690 | } | 690 | } |
691 | 691 | ||
692 | static ssize_t aac_show_max_channel(struct class_device *class_dev, char *buf) | ||
693 | { | ||
694 | return snprintf(buf, PAGE_SIZE, "%d\n", | ||
695 | class_to_shost(class_dev)->max_channel); | ||
696 | } | ||
697 | |||
698 | static ssize_t aac_show_max_id(struct class_device *class_dev, char *buf) | ||
699 | { | ||
700 | return snprintf(buf, PAGE_SIZE, "%d\n", | ||
701 | class_to_shost(class_dev)->max_id); | ||
702 | } | ||
703 | |||
692 | 704 | ||
693 | static struct class_device_attribute aac_model = { | 705 | static struct class_device_attribute aac_model = { |
694 | .attr = { | 706 | .attr = { |
@@ -732,6 +744,20 @@ static struct class_device_attribute aac_serial_number = { | |||
732 | }, | 744 | }, |
733 | .show = aac_show_serial_number, | 745 | .show = aac_show_serial_number, |
734 | }; | 746 | }; |
747 | static struct class_device_attribute aac_max_channel = { | ||
748 | .attr = { | ||
749 | .name = "max_channel", | ||
750 | .mode = S_IRUGO, | ||
751 | }, | ||
752 | .show = aac_show_max_channel, | ||
753 | }; | ||
754 | static struct class_device_attribute aac_max_id = { | ||
755 | .attr = { | ||
756 | .name = "max_id", | ||
757 | .mode = S_IRUGO, | ||
758 | }, | ||
759 | .show = aac_show_max_id, | ||
760 | }; | ||
735 | 761 | ||
736 | static struct class_device_attribute *aac_attrs[] = { | 762 | static struct class_device_attribute *aac_attrs[] = { |
737 | &aac_model, | 763 | &aac_model, |
@@ -740,6 +766,8 @@ static struct class_device_attribute *aac_attrs[] = { | |||
740 | &aac_monitor_version, | 766 | &aac_monitor_version, |
741 | &aac_bios_version, | 767 | &aac_bios_version, |
742 | &aac_serial_number, | 768 | &aac_serial_number, |
769 | &aac_max_channel, | ||
770 | &aac_max_id, | ||
743 | NULL | 771 | NULL |
744 | }; | 772 | }; |
745 | 773 | ||