Date: Thu, 17 Mar 2005 00:48:54 +0600 From: Max Khon <fjoe@samodelkin.net> To: Doug White <dwhite@gumbysoft.com> Cc: sos@freebsd.org Subject: Re: ATAng: reboot after panic, crashdumps [PATCH] Message-ID: <20050316184854.GA11806@samodelkin.net> In-Reply-To: <20050316101107.C24083@carver.gumbysoft.com> References: <20050316053338.GA69911@samodelkin.net> <20050316101107.C24083@carver.gumbysoft.com>
index | next in thread | previous in thread | raw e-mail
Hi!
On Wed, Mar 16, 2005 at 10:11:58AM -0800, Doug White wrote:
> > Attached patch fixes reboot after panic for me on RELENG_5 and RELENG_5_3.
> > Crashdumps work again for me as well.
> >
> > The problem was in ata_shutdown() -- ATA_FLUSHCACHE request issued from
> > ata_shutdown() never completes (ata_queue_request() sleeps in
> > sema_wait(&request->done)) because ata_interrupt() is never called
> > (callouts do not work as well, so that if the controller is busy
> > ATA_FLUSHCACHE was not retried).
> >
> > I am not sure if "if (panicstr == NULL)" check is required (for normal
> > shutdown sequence). addump() does not check if we are shutting down
> > cleanly (ata_flushcache() was copy-n-pasted from addump()) and always
> > uses atadev->channel->hw.begin_transaction(&request)/end_transaction(&request)
> > directly.
>
> This part here:
>
> + if (atadev->channel->hw.begin_transaction(&request) ==
> ATA_OP_CONTINUES) {
> + do {
> + DELAY(20);
> + } while (atadev->channel->hw.end_transaction(&request) ==
> ATA_OP_CONTINUES);
>
> looks like it could get stuck in an infinite loop if the controller is
> hung. I'm not familiar with the ata code so i don't nkow if this is
> handled elsewhere, but I figure I'd ask :)
This part is exactly what addump() does.
/fjoe
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050316184854.GA11806>
