diff options
author | Yang, Bo <Bo.Yang@lsi.com> | 2010-10-11 08:59:20 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-26 12:05:37 -0400 |
commit | 837f5fe89c843422452ef5e1a7e3d20e9caa3268 (patch) | |
tree | 3116c4d3fa4abbebad545d7d5a3f58efb9fe44e9 | |
parent | 6dd1d8a7953cdc203c6eb694ce8eafe2dcd3e9da (diff) |
[SCSI] megaraid_sas: support devices update flag
Driver added the Device update flag to tell LSI application driver
whether to do the device Update. LSI MegaRAID SAS application will
check this flag to decide if it needs to update the Device or not.
Signed-off-by Bo Yang <bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index d3c9cdee292b..09a455d4b6ed 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -103,6 +103,7 @@ static int megasas_poll_wait_aen; | |||
103 | static DECLARE_WAIT_QUEUE_HEAD(megasas_poll_wait); | 103 | static DECLARE_WAIT_QUEUE_HEAD(megasas_poll_wait); |
104 | static u32 support_poll_for_event; | 104 | static u32 support_poll_for_event; |
105 | static u32 megasas_dbg_lvl; | 105 | static u32 megasas_dbg_lvl; |
106 | static u32 support_device_change; | ||
106 | 107 | ||
107 | /* define lock for aen poll */ | 108 | /* define lock for aen poll */ |
108 | spinlock_t poll_aen_lock; | 109 | spinlock_t poll_aen_lock; |
@@ -4658,6 +4659,15 @@ megasas_sysfs_show_support_poll_for_event(struct device_driver *dd, char *buf) | |||
4658 | static DRIVER_ATTR(support_poll_for_event, S_IRUGO, | 4659 | static DRIVER_ATTR(support_poll_for_event, S_IRUGO, |
4659 | megasas_sysfs_show_support_poll_for_event, NULL); | 4660 | megasas_sysfs_show_support_poll_for_event, NULL); |
4660 | 4661 | ||
4662 | static ssize_t | ||
4663 | megasas_sysfs_show_support_device_change(struct device_driver *dd, char *buf) | ||
4664 | { | ||
4665 | return sprintf(buf, "%u\n", support_device_change); | ||
4666 | } | ||
4667 | |||
4668 | static DRIVER_ATTR(support_device_change, S_IRUGO, | ||
4669 | megasas_sysfs_show_support_device_change, NULL); | ||
4670 | |||
4661 | static ssize_t | 4671 | static ssize_t |
4662 | megasas_sysfs_show_dbg_lvl(struct device_driver *dd, char *buf) | 4672 | megasas_sysfs_show_dbg_lvl(struct device_driver *dd, char *buf) |
4663 | { | 4673 | { |
@@ -4978,6 +4988,7 @@ static int __init megasas_init(void) | |||
4978 | MEGASAS_EXT_VERSION); | 4988 | MEGASAS_EXT_VERSION); |
4979 | 4989 | ||
4980 | support_poll_for_event = 2; | 4990 | support_poll_for_event = 2; |
4991 | support_device_change = 1; | ||
4981 | 4992 | ||
4982 | memset(&megasas_mgmt_info, 0, sizeof(megasas_mgmt_info)); | 4993 | memset(&megasas_mgmt_info, 0, sizeof(megasas_mgmt_info)); |
4983 | 4994 | ||
@@ -5026,8 +5037,17 @@ static int __init megasas_init(void) | |||
5026 | if (rval) | 5037 | if (rval) |
5027 | goto err_dcf_poll_mode_io; | 5038 | goto err_dcf_poll_mode_io; |
5028 | 5039 | ||
5040 | rval = driver_create_file(&megasas_pci_driver.driver, | ||
5041 | &driver_attr_support_device_change); | ||
5042 | if (rval) | ||
5043 | goto err_dcf_support_device_change; | ||
5044 | |||
5029 | return rval; | 5045 | return rval; |
5030 | 5046 | ||
5047 | err_dcf_support_device_change: | ||
5048 | driver_remove_file(&megasas_pci_driver.driver, | ||
5049 | &driver_attr_poll_mode_io); | ||
5050 | |||
5031 | err_dcf_poll_mode_io: | 5051 | err_dcf_poll_mode_io: |
5032 | driver_remove_file(&megasas_pci_driver.driver, | 5052 | driver_remove_file(&megasas_pci_driver.driver, |
5033 | &driver_attr_dbg_lvl); | 5053 | &driver_attr_dbg_lvl); |
@@ -5058,6 +5078,10 @@ static void __exit megasas_exit(void) | |||
5058 | driver_remove_file(&megasas_pci_driver.driver, | 5078 | driver_remove_file(&megasas_pci_driver.driver, |
5059 | &driver_attr_dbg_lvl); | 5079 | &driver_attr_dbg_lvl); |
5060 | driver_remove_file(&megasas_pci_driver.driver, | 5080 | driver_remove_file(&megasas_pci_driver.driver, |
5081 | &driver_attr_support_poll_for_event); | ||
5082 | driver_remove_file(&megasas_pci_driver.driver, | ||
5083 | &driver_attr_support_device_change); | ||
5084 | driver_remove_file(&megasas_pci_driver.driver, | ||
5061 | &driver_attr_release_date); | 5085 | &driver_attr_release_date); |
5062 | driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version); | 5086 | driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version); |
5063 | 5087 | ||