All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Dustin Harrison <d.harrison@sutus.com>,
	Sagar Borikar <sagar.borikar@gmail.com>,
	linux-ide@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH 2/2] sata_sil: disable DMA engine in ->freeze
Date: Wed, 08 Apr 2009 13:40:39 -0700	[thread overview]
Message-ID: <49DD0BC7.5090801@gmail.com> (raw)
In-Reply-To: <49DCFFE5.7080807@garzik.org>

Hello,

Jeff Garzik wrote:
>> Thanks for updating the patch Jeff.  I see you spotted the reason why
>> I didn't put the code into sil_freeze.  I tested your patch and it
>> prevented the kernel panic.  I now get the following output, which
>> seems to be correct to me.
>>
>> WARNING: at drivers/ata/libata-core.c:5209 ata_qc_complete()
> 
> hum, my patch would indeed trigger this WARN_ON_ONCE() in
> ata_qc_complete():
> 
>         if (ap->ops->error_handler) {
>                 struct ata_device *dev = qc->dev;
>                 struct ata_eh_info *ehi = &dev->link->eh_info;
> 
>                 WARN_ON_ONCE(ap->pflags & ATA_PFLAG_FROZEN);
> 
> Tejun, was that WARN_ON() originally added to detect spurious callers?
> Or, completions after the EH started?
> 
> AFAICS, libata still owns the qc's at this point, so it should not be a
> problem to complete them when the port is frozen.

Ah... that one.  The WARN_ON_ONCE() was added because I was worried
that LLD interrupt handler might get activated after the port is
frozen and try to complete the commands which now belong to EH.  Given
that ata_qc_from_tag() returns NULL for any commands which get already
marked failed, it's a bit paranoid.  Well, I was a bit paranoid when
adding new EH the first time, so...

Removing it should be fine at this point, I think, but I'm away from
my toys so testing is a bit difficult, so please test the path which
triggered the WARN_ON_ONCE() works fine (it should) before removing
it.

Thanks.

-- 
tejun

      reply	other threads:[~2009-04-08 20:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07 23:22 [PATCH 1/2] libata EH: freeze port before aborting commands Jeff Garzik
2009-04-07 23:23 ` [PATCH 2/2] sata_sil: disable DMA engine in ->freeze Jeff Garzik
2009-04-08  5:13   ` Sagar Borikar
2009-04-08  5:17     ` Jeff Garzik
2009-04-08  5:31       ` Sagar Borikar
2009-04-08 19:37       ` Dustin Harrison
2009-04-08 19:49         ` Jeff Garzik
2009-04-08 20:40           ` Tejun Heo [this message]

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=49DD0BC7.5090801@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=d.harrison@sutus.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sagar.borikar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.