diff options
| author | adam radford <aradford@gmail.com> | 2011-05-11 21:34:29 -0400 |
|---|---|---|
| committer | James Bottomley <jbottomley@parallels.com> | 2011-05-24 12:35:34 -0400 |
| commit | 541f90b7c6dffe4cf4a3e8142ac8bd047da94733 (patch) | |
| tree | 994fea7b508ba072d1349f772670f50b8397fc49 | |
| parent | 46fd256e05581e4a04d5a8ec107d35afe938c65b (diff) | |
[SCSI] megaraid_sas: Fix bug where AENs could be lost in probe() and resume()
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
| -rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index a32b6ba0e9e5..f43ab031edc8 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
| @@ -4115,6 +4115,14 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 4115 | megasas_mgmt_info.max_index++; | 4115 | megasas_mgmt_info.max_index++; |
| 4116 | 4116 | ||
| 4117 | /* | 4117 | /* |
| 4118 | * Register with SCSI mid-layer | ||
| 4119 | */ | ||
| 4120 | if (megasas_io_attach(instance)) | ||
| 4121 | goto fail_io_attach; | ||
| 4122 | |||
| 4123 | instance->unload = 0; | ||
| 4124 | |||
| 4125 | /* | ||
| 4118 | * Initiate AEN (Asynchronous Event Notification) | 4126 | * Initiate AEN (Asynchronous Event Notification) |
| 4119 | */ | 4127 | */ |
| 4120 | if (megasas_start_aen(instance)) { | 4128 | if (megasas_start_aen(instance)) { |
| @@ -4122,13 +4130,6 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 4122 | goto fail_start_aen; | 4130 | goto fail_start_aen; |
| 4123 | } | 4131 | } |
| 4124 | 4132 | ||
| 4125 | /* | ||
| 4126 | * Register with SCSI mid-layer | ||
| 4127 | */ | ||
| 4128 | if (megasas_io_attach(instance)) | ||
| 4129 | goto fail_io_attach; | ||
| 4130 | |||
| 4131 | instance->unload = 0; | ||
| 4132 | return 0; | 4133 | return 0; |
| 4133 | 4134 | ||
| 4134 | fail_start_aen: | 4135 | fail_start_aen: |
| @@ -4383,12 +4384,6 @@ megasas_resume(struct pci_dev *pdev) | |||
| 4383 | 4384 | ||
| 4384 | instance->instancet->enable_intr(instance->reg_set); | 4385 | instance->instancet->enable_intr(instance->reg_set); |
| 4385 | 4386 | ||
| 4386 | /* | ||
| 4387 | * Initiate AEN (Asynchronous Event Notification) | ||
| 4388 | */ | ||
| 4389 | if (megasas_start_aen(instance)) | ||
| 4390 | printk(KERN_ERR "megasas: Start AEN failed\n"); | ||
| 4391 | |||
| 4392 | /* Initialize the cmd completion timer */ | 4387 | /* Initialize the cmd completion timer */ |
| 4393 | if (poll_mode_io) | 4388 | if (poll_mode_io) |
| 4394 | megasas_start_timer(instance, &instance->io_completion_timer, | 4389 | megasas_start_timer(instance, &instance->io_completion_timer, |
| @@ -4396,6 +4391,12 @@ megasas_resume(struct pci_dev *pdev) | |||
| 4396 | MEGASAS_COMPLETION_TIMER_INTERVAL); | 4391 | MEGASAS_COMPLETION_TIMER_INTERVAL); |
| 4397 | instance->unload = 0; | 4392 | instance->unload = 0; |
| 4398 | 4393 | ||
| 4394 | /* | ||
| 4395 | * Initiate AEN (Asynchronous Event Notification) | ||
| 4396 | */ | ||
| 4397 | if (megasas_start_aen(instance)) | ||
| 4398 | printk(KERN_ERR "megasas: Start AEN failed\n"); | ||
| 4399 | |||
| 4399 | return 0; | 4400 | return 0; |
| 4400 | 4401 | ||
| 4401 | fail_irq: | 4402 | fail_irq: |
