Commit 88d155c6 authored by Shivasharan S's avatar Shivasharan S Committed by Martin K. Petersen

scsi: megaraid_sas: Expose fw_cmds_outstanding through sysfs

Expose FW outstanding commands (fw_outstanding) through sysfs interface.
This helps in debugging certain performance issues in the field.
Signed-off-by: default avatarSasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
Signed-off-by: default avatarShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4959e61b
...@@ -3122,6 +3122,16 @@ megasas_ldio_outstanding_show(struct device *cdev, struct device_attribute *attr ...@@ -3122,6 +3122,16 @@ megasas_ldio_outstanding_show(struct device *cdev, struct device_attribute *attr
return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&instance->ldio_outstanding)); return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&instance->ldio_outstanding));
} }
static ssize_t
megasas_fw_cmds_outstanding_show(struct device *cdev,
struct device_attribute *attr, char *buf)
{
struct Scsi_Host *shost = class_to_shost(cdev);
struct megasas_instance *instance = (struct megasas_instance *)shost->hostdata;
return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&instance->fw_outstanding));
}
static DEVICE_ATTR(fw_crash_buffer, S_IRUGO | S_IWUSR, static DEVICE_ATTR(fw_crash_buffer, S_IRUGO | S_IWUSR,
megasas_fw_crash_buffer_show, megasas_fw_crash_buffer_store); megasas_fw_crash_buffer_show, megasas_fw_crash_buffer_store);
static DEVICE_ATTR(fw_crash_buffer_size, S_IRUGO, static DEVICE_ATTR(fw_crash_buffer_size, S_IRUGO,
...@@ -3132,6 +3142,8 @@ static DEVICE_ATTR(page_size, S_IRUGO, ...@@ -3132,6 +3142,8 @@ static DEVICE_ATTR(page_size, S_IRUGO,
megasas_page_size_show, NULL); megasas_page_size_show, NULL);
static DEVICE_ATTR(ldio_outstanding, S_IRUGO, static DEVICE_ATTR(ldio_outstanding, S_IRUGO,
megasas_ldio_outstanding_show, NULL); megasas_ldio_outstanding_show, NULL);
static DEVICE_ATTR(fw_cmds_outstanding, S_IRUGO,
megasas_fw_cmds_outstanding_show, NULL);
struct device_attribute *megaraid_host_attrs[] = { struct device_attribute *megaraid_host_attrs[] = {
&dev_attr_fw_crash_buffer_size, &dev_attr_fw_crash_buffer_size,
...@@ -3139,6 +3151,7 @@ struct device_attribute *megaraid_host_attrs[] = { ...@@ -3139,6 +3151,7 @@ struct device_attribute *megaraid_host_attrs[] = {
&dev_attr_fw_crash_state, &dev_attr_fw_crash_state,
&dev_attr_page_size, &dev_attr_page_size,
&dev_attr_ldio_outstanding, &dev_attr_ldio_outstanding,
&dev_attr_fw_cmds_outstanding,
NULL, NULL,
}; };
......
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