Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221511
b: refs/heads/master
c: 837f5fe
h: refs/heads/master
i:
  221509: 2e6ca7d
  221507: 98658e0
  221503: 7c51644
v: v3
  • Loading branch information
Yang, Bo authored and James Bottomley committed Oct 26, 2010
1 parent 3ae6724 commit 3355e48
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6dd1d8a7953cdc203c6eb694ce8eafe2dcd3e9da
refs/heads/master: 837f5fe89c843422452ef5e1a7e3d20e9caa3268
24 changes: 24 additions & 0 deletions trunk/drivers/scsi/megaraid/megaraid_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ static int megasas_poll_wait_aen;
static DECLARE_WAIT_QUEUE_HEAD(megasas_poll_wait);
static u32 support_poll_for_event;
static u32 megasas_dbg_lvl;
static u32 support_device_change;

/* define lock for aen poll */
spinlock_t poll_aen_lock;
Expand Down Expand Up @@ -4658,6 +4659,15 @@ megasas_sysfs_show_support_poll_for_event(struct device_driver *dd, char *buf)
static DRIVER_ATTR(support_poll_for_event, S_IRUGO,
megasas_sysfs_show_support_poll_for_event, NULL);

static ssize_t
megasas_sysfs_show_support_device_change(struct device_driver *dd, char *buf)
{
return sprintf(buf, "%u\n", support_device_change);
}

static DRIVER_ATTR(support_device_change, S_IRUGO,
megasas_sysfs_show_support_device_change, NULL);

static ssize_t
megasas_sysfs_show_dbg_lvl(struct device_driver *dd, char *buf)
{
Expand Down Expand Up @@ -4978,6 +4988,7 @@ static int __init megasas_init(void)
MEGASAS_EXT_VERSION);

support_poll_for_event = 2;
support_device_change = 1;

memset(&megasas_mgmt_info, 0, sizeof(megasas_mgmt_info));

Expand Down Expand Up @@ -5026,8 +5037,17 @@ static int __init megasas_init(void)
if (rval)
goto err_dcf_poll_mode_io;

rval = driver_create_file(&megasas_pci_driver.driver,
&driver_attr_support_device_change);
if (rval)
goto err_dcf_support_device_change;

return rval;

err_dcf_support_device_change:
driver_remove_file(&megasas_pci_driver.driver,
&driver_attr_poll_mode_io);

err_dcf_poll_mode_io:
driver_remove_file(&megasas_pci_driver.driver,
&driver_attr_dbg_lvl);
Expand Down Expand Up @@ -5057,6 +5077,10 @@ static void __exit megasas_exit(void)
&driver_attr_poll_mode_io);
driver_remove_file(&megasas_pci_driver.driver,
&driver_attr_dbg_lvl);
driver_remove_file(&megasas_pci_driver.driver,
&driver_attr_support_poll_for_event);
driver_remove_file(&megasas_pci_driver.driver,
&driver_attr_support_device_change);
driver_remove_file(&megasas_pci_driver.driver,
&driver_attr_release_date);
driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);
Expand Down

0 comments on commit 3355e48

Please sign in to comment.