Commit 541f90b7 authored by adam radford's avatar adam radford Committed by James Bottomley

[SCSI] megaraid_sas: Fix bug where AENs could be lost in probe() and resume()

Signed-off-by: default avatarAdam Radford <aradford@gmail.com>
Signed-off-by: default avatarJames Bottomley <jbottomley@parallels.com>
parent 46fd256e
...@@ -4114,6 +4114,14 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -4114,6 +4114,14 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = instance; megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = instance;
megasas_mgmt_info.max_index++; megasas_mgmt_info.max_index++;
/*
* Register with SCSI mid-layer
*/
if (megasas_io_attach(instance))
goto fail_io_attach;
instance->unload = 0;
/* /*
* Initiate AEN (Asynchronous Event Notification) * Initiate AEN (Asynchronous Event Notification)
*/ */
...@@ -4122,13 +4130,6 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -4122,13 +4130,6 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
goto fail_start_aen; goto fail_start_aen;
} }
/*
* Register with SCSI mid-layer
*/
if (megasas_io_attach(instance))
goto fail_io_attach;
instance->unload = 0;
return 0; return 0;
fail_start_aen: fail_start_aen:
...@@ -4383,12 +4384,6 @@ megasas_resume(struct pci_dev *pdev) ...@@ -4383,12 +4384,6 @@ megasas_resume(struct pci_dev *pdev)
instance->instancet->enable_intr(instance->reg_set); instance->instancet->enable_intr(instance->reg_set);
/*
* Initiate AEN (Asynchronous Event Notification)
*/
if (megasas_start_aen(instance))
printk(KERN_ERR "megasas: Start AEN failed\n");
/* Initialize the cmd completion timer */ /* Initialize the cmd completion timer */
if (poll_mode_io) if (poll_mode_io)
megasas_start_timer(instance, &instance->io_completion_timer, megasas_start_timer(instance, &instance->io_completion_timer,
...@@ -4396,6 +4391,12 @@ megasas_resume(struct pci_dev *pdev) ...@@ -4396,6 +4391,12 @@ megasas_resume(struct pci_dev *pdev)
MEGASAS_COMPLETION_TIMER_INTERVAL); MEGASAS_COMPLETION_TIMER_INTERVAL);
instance->unload = 0; instance->unload = 0;
/*
* Initiate AEN (Asynchronous Event Notification)
*/
if (megasas_start_aen(instance))
printk(KERN_ERR "megasas: Start AEN failed\n");
return 0; return 0;
fail_irq: fail_irq:
......
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