Commit 30202e06 authored by Raghava Aditya Renukunta's avatar Raghava Aditya Renukunta Committed by Martin K. Petersen

scsi: aacraid: Added sysfs for driver version

Added support to retrieve driver version from a new sysfs variable called
driver_version. It makes it easier for the user to figure out the driver
version that is currently running.
Signed-off-by: default avatarRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: default avatarDavid Carroll <David.Carroll@microsemi.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1bff5abc
...@@ -1131,6 +1131,13 @@ static ssize_t aac_show_bios_version(struct device *device, ...@@ -1131,6 +1131,13 @@ static ssize_t aac_show_bios_version(struct device *device,
return len; return len;
} }
static ssize_t aac_show_driver_version(struct device *device,
struct device_attribute *attr,
char *buf)
{
return snprintf(buf, PAGE_SIZE, "%s\n", aac_driver_version);
}
static ssize_t aac_show_serial_number(struct device *device, static ssize_t aac_show_serial_number(struct device *device,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
...@@ -1241,6 +1248,13 @@ static struct device_attribute aac_bios_version = { ...@@ -1241,6 +1248,13 @@ static struct device_attribute aac_bios_version = {
}, },
.show = aac_show_bios_version, .show = aac_show_bios_version,
}; };
static struct device_attribute aac_lld_version = {
.attr = {
.name = "driver_version",
.mode = 0444,
},
.show = aac_show_driver_version,
};
static struct device_attribute aac_serial_number = { static struct device_attribute aac_serial_number = {
.attr = { .attr = {
.name = "serial_number", .name = "serial_number",
...@@ -1278,6 +1292,7 @@ static struct device_attribute *aac_attrs[] = { ...@@ -1278,6 +1292,7 @@ static struct device_attribute *aac_attrs[] = {
&aac_kernel_version, &aac_kernel_version,
&aac_monitor_version, &aac_monitor_version,
&aac_bios_version, &aac_bios_version,
&aac_lld_version,
&aac_serial_number, &aac_serial_number,
&aac_max_channel, &aac_max_channel,
&aac_max_id, &aac_max_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment