From: adam radford <aradford@gmail.com>
To: linux-scsi <linux-scsi@vger.kernel.org>, Bo.Yang@lsi.com
Subject: [PATCH 5/8] megaraid_sas: Fix bug where AENs could be lost in probe() and resume()
Date: Wed, 11 May 2011 18:34:29 -0700 [thread overview]
Message-ID: <BANLkTi=Om7hfCeKnCgh4R5Sh8xYD6jfqaA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]
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@gmail.com>
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 #2: megaraid_sas.patch5 --]
[-- Type: application/octet-stream, Size: 1445 bytes --]
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:
reply other threads:[~2011-05-12 1:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=Om7hfCeKnCgh4R5Sh8xYD6jfqaA@mail.gmail.com' \
--to=aradford@gmail.com \
--cc=Bo.Yang@lsi.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).