James/linux-scsi, The following patch for megaraid_sas fixes a bug where AENs could be lost in probe() and resume(). Signed-off-by: Adam Radford <aradford@xxxxxxxxx> diff -Naur scsi-misc/drivers/scsi/megaraid/megaraid_sas_base.c scsi-misc.new/drivers/scsi/megaraid/megaraid_sas_base.c --- scsi-misc/drivers/scsi/megaraid/megaraid_sas_base.c 2011-05-11 15:12:58.708429569 -0700 +++ scsi-misc.new/drivers/scsi/megaraid/megaraid_sas_base.c 2011-05-11 15:19:01.260428701 -0700 @@ -4115,6 +4115,14 @@ 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) */ if (megasas_start_aen(instance)) { @@ -4122,13 +4130,6 @@ goto fail_start_aen; } - /* - * Register with SCSI mid-layer - */ - if (megasas_io_attach(instance)) - goto fail_io_attach; - - instance->unload = 0; return 0; fail_start_aen: @@ -4383,12 +4384,6 @@ 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 */ if (poll_mode_io) megasas_start_timer(instance, &instance->io_completion_timer, @@ -4396,6 +4391,12 @@ MEGASAS_COMPLETION_TIMER_INTERVAL); instance->unload = 0; + /* + * Initiate AEN (Asynchronous Event Notification) + */ + if (megasas_start_aen(instance)) + printk(KERN_ERR "megasas: Start AEN failed\n"); + return 0; fail_irq:
Attachment:
megaraid_sas.patch5
Description: Binary data