From: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
To: linux-scsi@vger.kernel.org
Cc: vgoyal@in.ibm.com, Andrew Morton <akpm@linux-foundation.org>,
Yinghai Lu <yhlu.kernel@gmail.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] aacraid: fix shutdown handler to also disable interrupts.
Date: Wed, 30 May 2007 11:59:13 -0400 [thread overview]
Message-ID: <AE4F746F2AECFC4DA4AADD66A1DFEF01A55087@otce2k301.adaptec.com> (raw)
In-Reply-To: <AE4F746F2AECFC4DA4AADD66A1DFEF01A55010@otce2k301.adaptec.com>
[-- Attachment #1: Type: text/plain, Size: 2022 bytes --]
Moves quiesce, thread and interrupt shutdown into aacraid drivers'
.shutdown handler. This fix to the aac_shutdown handler will remove the
superfluous reset of the adapter during a (clean) kexec.
This fix may mitigate the active investigation 'kexec and aacraid
broken' but it is unlikely to affect the root cause (issue likely
present in both kexec and kdump). This patch reduces the chance the
problem will occur with a kexec. The fix for root cause is currently
expected to be the minimum value check to the aacraid.startup_timeout
driver variable after an adapter reset within aacraid_commit_reset.patch
submitted on 05/22/2007 and awaiting testing by Yinghai to confirm.
This attached patch is against current scsi-misc-2.6
ObligatoryDisclaimer: Please accept my condolences regarding Outlook's
handling of patch attachments.
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Sincerely -- Mark Salyzyn
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org
> [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Salyzyn, Mark
> Sent: Wednesday, May 30, 2007 10:31 AM
> To: vgoyal@in.ibm.com
> Cc: Andrew Morton; Yinghai Lu; Eric W. Biederman; Linux
> Kernel Mailing List; linux-scsi@vger.kernel.org; Michal Piotrowski
> Subject: RE: kexec and aacraid broken
>
> Vivek Goyal [mailto:vgoyal@in.ibm.com] writes:
> > So most likely if we start disabling the interrupts
> > in .shutdown routine we might skip resetting adapter
> > on every kexec without any side affects?
>
> Not that simple. The .shutdown would need to perform more resource
> cleanups of the .remove call to prevent side effects. I need to move
> some of the .remove activity into the .shutdown handler to
> make sure the
> adapter is quiesced.
>
> I will hold off on submitting any of these changes until they are
> evaluated and tested; I am waiting for feedback from Yinghai on the
> other mitigations that I feel are closer to the root cause.
>
> Sincerely -- Mark Salyzyn
[-- Attachment #2: aacraid_shutdown.patch --]
[-- Type: application/octet-stream, Size: 1524 bytes --]
diff -ru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
--- a/drivers/scsi/aacraid/linit.c 2007-05-30 11:00:36.619831521 -0400
+++ b/drivers/scsi/aacraid/linit.c 2007-05-30 11:04:35.325867212 -0400
@@ -859,6 +859,14 @@
.emulated = 1,
};
+static void __aac_shutdown(struct aac_dev * aac)
+{
+ kthread_stop(aac->thread);
+ aac_send_shutdown(aac);
+ aac_adapter_disable_int(aac);
+ free_irq(aac->pdev->irq, aac);
+}
+
static int __devinit aac_probe_one(struct pci_dev *pdev,
const struct pci_device_id *id)
{
@@ -1011,10 +1019,7 @@
return 0;
out_deinit:
- kthread_stop(aac->thread);
- aac_send_shutdown(aac);
- aac_adapter_disable_int(aac);
- free_irq(pdev->irq, aac);
+ __aac_shutdown(aac);
out_unmap:
aac_fib_map_free(aac);
pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);
@@ -1034,7 +1039,8 @@
{
struct Scsi_Host *shost = pci_get_drvdata(dev);
struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
- aac_send_shutdown(aac);
+ scsi_block_requests(shost);
+ __aac_shutdown(aac);
}
static void __devexit aac_remove_one(struct pci_dev *pdev)
@@ -1044,16 +1050,12 @@
scsi_remove_host(shost);
- kthread_stop(aac->thread);
-
- aac_send_shutdown(aac);
- aac_adapter_disable_int(aac);
+ __aac_shutdown(aac);
aac_fib_map_free(aac);
pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,
aac->comm_phys);
kfree(aac->queues);
- free_irq(pdev->irq, aac);
aac_adapter_ioremap(aac, 0);
kfree(aac->fibs);
next prev parent reply other threads:[~2007-05-30 15:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <86802c440705291859y39a4ca27uf5ddb84810f33510@mail.gmail.com>
2007-05-30 2:13 ` kexec and aacraid broken Andrew Morton
2007-05-30 11:44 ` Salyzyn, Mark
2007-05-30 13:24 ` Vivek Goyal
2007-05-30 13:57 ` Salyzyn, Mark
2007-05-30 14:17 ` Vivek Goyal
2007-05-30 14:30 ` Salyzyn, Mark
2007-05-30 15:59 ` Salyzyn, Mark [this message]
2007-05-30 17:36 ` [PATCH] aacraid: fix shutdown handler to also disable interrupts Yinghai Lu
2007-06-01 11:08 ` Vivek Goyal
2007-06-01 17:07 ` Yinghai Lu
2007-06-01 17:34 ` Salyzyn, Mark
2007-06-07 17:21 ` [PATCH] aacraid: add SCSI SYNCHONIZE_CACHE range checking Salyzyn, Mark
2007-06-11 20:17 ` [PATCH] aacraid: probe related code cleanup Salyzyn, Mark
2007-06-20 15:30 ` [PATCH] aacraid: add SCSI SYNCHONIZE_CACHE range checking (take 2) Salyzyn, Mark
2007-07-09 13:57 ` [PATCH] aacraid: add 51245, 51645 and 52245 adapters to documentation Salyzyn, Mark
2007-07-23 14:13 ` [PATCH] aacraid: sysfs adapter reset/status format change Salyzyn, Mark
2007-07-26 18:20 ` [PATCH 1/1] aacraid: draw line in sand, sundry cleanup and version update Salyzyn, Mark
2007-07-27 14:29 ` [PATCH 1/1] aacraid: fix Sunrise Lake reset handling Salyzyn, Mark
2007-08-02 19:38 ` [PATCH 1/1] aacraid: prevent panic on adapter resource failure Salyzyn, Mark
2007-08-07 19:36 ` [PATCH 1/1] aacraid: default timeout for arrays too short Salyzyn, Mark
2007-09-04 16:55 ` [PATCH 1/1] aacraid: Add documentation for new Adaptec, SMC and SUN cards Salyzyn, Mark
2007-05-30 21:19 ` kexec and aacraid broken Yinghai Lu
2007-05-30 21:22 ` Yinghai Lu
2007-05-30 21:49 ` Salyzyn, Mark
2007-05-30 22:11 ` Yinghai Lu
2007-05-31 12:37 ` Salyzyn, Mark
2007-05-31 19:59 ` Yinghai Lu
2007-05-31 20:45 ` Salyzyn, Mark
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=AE4F746F2AECFC4DA4AADD66A1DFEF01A55087@otce2k301.adaptec.com \
--to=mark_salyzyn@adaptec.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michal.k.k.piotrowski@gmail.com \
--cc=vgoyal@in.ibm.com \
--cc=yhlu.kernel@gmail.com \
/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