From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: albertcc@tw.ibm.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH libata-dev-2.6:upstream 02/02] libata: add host_set locking to ata_scsi_error()
Date: Sun, 21 Aug 2005 15:52:27 -0400 [thread overview]
Message-ID: <4308DB7B.7090706@pobox.com> (raw)
In-Reply-To: <20050820141408.52DFBF95@htj.dyndns.org>
Tejun Heo wrote:
> 02_libata_add-locking-to-ata_scsi_error.patch
>
> SCSI EH can start before ata_qc_complete is completely
> complete. so, latter part of ata_qc_complete can run
> side-by-side with ->eng_timeout(), interfering EH.
>
> This patch makes ata_scsi_error() to grab and release host_set
> lock before invoking ->eng_timeout().
>
> Note: host_failed decrementing and eh_cmd_q banging are moved
> above ->eng_timeout() invocation such that they're done while
> holding the lock.
I think it's better to follow a path that sets a "EH owns this port now"
flag inside spinlock,
spin_lock_irqsave()
ap->in_eh = 1;
spin_unlock_irqrestore()
and then check that flag in ata_qc_complete()
if (qc->ap->in_eh)
return; /* do nothing else with command */
so that for the case of a late interrupt, the interrupt handler should
acknowledge the interrupt, but not actually touch the ata_queued_cmd state.
Jeff
next prev parent reply other threads:[~2005-08-21 21:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-20 14:15 [PATCH libata-dev-2.6:upstream 00/02] libata: race fixes Tejun Heo
2005-08-20 14:15 ` [PATCH libata-dev-2.6:upstream 01/02] libata: implement ata_poll_qc_complete and use it in polling functions Tejun Heo
2005-08-21 19:53 ` Jeff Garzik
2005-08-22 8:12 ` Tejun Heo
2005-08-23 5:06 ` Jeff Garzik
2005-08-20 14:15 ` [PATCH libata-dev-2.6:upstream 02/02] libata: add host_set locking to ata_scsi_error() Tejun Heo
2005-08-21 19:52 ` Jeff Garzik [this message]
2005-08-22 8:23 ` Tejun Heo
2005-08-21 20:08 ` a word about ATA interrupts, and SATA (was Re: [PATCH libata-dev-2.6:upstream 00/02] libata: race fixes) Jeff Garzik
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=4308DB7B.7090706@pobox.com \
--to=jgarzik@pobox.com \
--cc=albertcc@tw.ibm.com \
--cc=htejun@gmail.com \
--cc=linux-ide@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).