From: Tejun Heo <htejun@gmail.com>
To: Albert Lee <albertcc@tw.ibm.com>
Cc: Jens Axboe <axboe@suse.de>, Jeff Garzik <jgarzik@pobox.com>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata-dev-2.6-ncq: rewrite __ata_qc_complete
Date: Mon, 27 Jun 2005 20:13:42 +0900 [thread overview]
Message-ID: <42BFDF66.3010402@gmail.com> (raw)
In-Reply-To: <42BFC68E.3020707@tw.ibm.com>
Albert Lee wrote:
>
> Tejun Heo wrote:
>
>> Also, remove spurious clearing of ATA_QCFLAG_ACTIVE from
>> ata_qc_complete().
>>
> Hi Tejun:
>
> Clearing the ATA_QCFLAG_ACTIVE in ata_qc_complete() is needed. We have to
> prevent the interrupt handler from racing with the error handler in ATAPI.
> (Please see the following link for the detail:
> http://marc.theaimsgroup.com/?l=linux-ide&m=111476734016857&w=2)
>
> Albert
>
Hello, Albert.
Ah... I see. Sorry, I didn't check the ATAPI code (Is any SATA ATAPI
device selling in retail shops? I want one for testing but cannot find
one). I'll remove that removal ;-) and add some comment there to
clarify things. it also means that ATAPI handling of my NCQ helpers is
broken
BTW, now that I've read how libata defers command completion to EH
using qc_complete return value, I have a question. While I was writing
NCQ EH, the biggest problem was that we're called differently from
several places and EH conventions differ in each case.
1. from libata core: we don't have associated SCSI command and EH
won't be entered.
2. from SCSI midlayer (SCSI special cmds): we have associated SCSI
command but EH won't be entered on failure (scsidone is overrided).
3. from blk via SCSI (SCSI normal cmds): we have associated SCSI
command and EH will be entered on failure.
I couldn't defer qc-completion on error interrupt to EH, as I don't
know whether it will be entered or not. So, NCQ helpers always
qc-completes commands and NCQ EH helper deals with what's left. It
seems that the current ATAPI code doesn't account for these differences
when handling errors. Is EH-entrance guaranteed on ATAPI failures?
TIA.
--
tejun
next prev parent reply other threads:[~2005-06-27 11:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-26 14:41 [PATCH] libata-dev-2.6-ncq: rewrite __ata_qc_complete Tejun Heo
2005-06-26 17:27 ` Jeff Garzik
2005-06-27 8:27 ` Jens Axboe
2005-06-27 9:27 ` Albert Lee
2005-06-27 11:13 ` Tejun Heo [this message]
2005-06-27 12:30 ` Jeff Garzik
2005-06-27 13:21 ` Tejun Heo
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=42BFDF66.3010402@gmail.com \
--to=htejun@gmail.com \
--cc=albertcc@tw.ibm.com \
--cc=axboe@suse.de \
--cc=jgarzik@pobox.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).