[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>

authored by Yang, Bo and committed by James Bottomley 837f5fe8 6dd1d8a7

+24
+24
drivers/scsi/megaraid/megaraid_sas.c
··· 103 103 static DECLARE_WAIT_QUEUE_HEAD(megasas_poll_wait); 104 104 static u32 support_poll_for_event; 105 105 static u32 megasas_dbg_lvl; 106 + static u32 support_device_change; 106 107 107 108 /* define lock for aen poll */ 108 109 spinlock_t poll_aen_lock; ··· 4659 4658 static DRIVER_ATTR(support_poll_for_event, S_IRUGO, 4660 4659 megasas_sysfs_show_support_poll_for_event, NULL); 4661 4660 4661 + static ssize_t 4662 + megasas_sysfs_show_support_device_change(struct device_driver *dd, char *buf) 4663 + { 4664 + return sprintf(buf, "%u\n", support_device_change); 4665 + } 4666 + 4667 + static DRIVER_ATTR(support_device_change, S_IRUGO, 4668 + megasas_sysfs_show_support_device_change, NULL); 4669 + 4662 4670 static ssize_t 4663 4671 megasas_sysfs_show_dbg_lvl(struct device_driver *dd, char *buf) 4664 4672 { ··· 4988 4978 MEGASAS_EXT_VERSION); 4989 4979 4990 4980 support_poll_for_event = 2; 4981 + support_device_change = 1; 4991 4982 4992 4983 memset(&megasas_mgmt_info, 0, sizeof(megasas_mgmt_info)); 4993 4984 ··· 5037 5026 if (rval) 5038 5027 goto err_dcf_poll_mode_io; 5039 5028 5029 + rval = driver_create_file(&megasas_pci_driver.driver, 5030 + &driver_attr_support_device_change); 5031 + if (rval) 5032 + goto err_dcf_support_device_change; 5033 + 5040 5034 return rval; 5035 + 5036 + err_dcf_support_device_change: 5037 + driver_remove_file(&megasas_pci_driver.driver, 5038 + &driver_attr_poll_mode_io); 5041 5039 5042 5040 err_dcf_poll_mode_io: 5043 5041 driver_remove_file(&megasas_pci_driver.driver, ··· 5077 5057 &driver_attr_poll_mode_io); 5078 5058 driver_remove_file(&megasas_pci_driver.driver, 5079 5059 &driver_attr_dbg_lvl); 5060 + driver_remove_file(&megasas_pci_driver.driver, 5061 + &driver_attr_support_poll_for_event); 5062 + driver_remove_file(&megasas_pci_driver.driver, 5063 + &driver_attr_support_device_change); 5080 5064 driver_remove_file(&megasas_pci_driver.driver, 5081 5065 &driver_attr_release_date); 5082 5066 driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);