linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: axboe@suse.de, albertcc@tw.ibm.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH libata-dev-2.6:ncq 00/11] libata: new error handling & NCQ generic helpers (review only)
Date: Sat, 20 Aug 2005 02:08:08 -0400	[thread overview]
Message-ID: <4306C8C8.2010901@pobox.com> (raw)
In-Reply-To: <20050707130840.5046338C@htj.dyndns.org>

Tejun Heo wrote:

> 01_libata_implement-ata_qc_exec_special.patch
> 	: implement ata_qc_exec_special()
> 
> 	This patch implements ata_qc_exec_special() function which
> 	generalizes libata internal special command execution and adds
> 	timeout.  All internal commands are converted.  Timeout
> 	constants are added to libata.h and, while at it, removed
> 	unused ATA_TMOUT_EDD.

this seems sane, though I wonder if it could be split up a bit more


> 02_libata_new-error-handling.patch
> 	: implement new EH framework and convert non-ncq EH
> 
> 	This patch implements new EH framework and converts non-ncq EH
> 	to use it.  Now errors and timeouts are all handled by EH
> 	handler inside EH thread.
> 
> 	* All failed commands are posted to EH by using ata_qc_error()
> 	  without qc-completion.  All timed out commands are posted to
> 	  EH, too.  On entry to EH handler, all active qc's are either
> 	  failed or timed out qc's, and they are all.  Also it's
> 	  guaranteed that once EH is started, only EH can finish or
> 	  retry it.  Normal or spurious interrupts during recovery
> 	  don't affect failed qc's.
> 
> 	* EH handles error and determines whether to retry or fail
> 	  qc's.  It is responsible for setting error information to
> 	  notify upper layer if it's gonna fail a command.  (Jeff,
> 	  this should make implementing error classes you've talked
> 	  about easier.  All error handling is done inside EH and we
> 	  can just set sense data appropriately and eh-complete the
> 	  commands.)
> 
> 	* After EH is complete, operation resumes.
> 
> 	The following changes are worth noting.
> 
> 	* ->eng_timeout renamed to ->error_handler
> 
> 	* ata_eh_qc_complete(), ata_eh_qc_retry() added
> 
> 	* __ata_qc_complete() used to deal with resource freeing and
> 	  completing wait for special cmds.  As this patch removes the
> 	  only use of __ata_qc_complete(), it's moved into
> 	  ata_qc_free() and ata_qc_free() deals only with resource
> 	  freeing.  New __ata_qc_complete() is defined to be used by
> 	  ata_eh_qc_*() functions (internal use only).
> 
> 	* After allocated, all commands are either freed with
>           ata_qc_free() if it can't be issued or completed with
>           ata[_eh]_qc_complete().  No half-completion anymore.
> 
> 	* As filling upper layer error info is the reponsibility of
> 	  the recovery handler now, qc->complete_fn() doesn't need
> 	  drv_stat argument.  Also, as all commands are completed
> 	  fully at once, there's no need for int return value.  This
> 	  leaves very little functionality to qc->complete_fn,
> 	  currently only ATAPI inquiry result tempering.  I think just
> 	  inlining that part and removing this callback will make the
> 	  code easier.
> 
> 	* Although it looks like a lot of changes, from a device's
> 	  point of view, nothing changes.  Only software structure is
> 	  changed.
> 
> 	This patch is separated out only to make changes incremental.
> 	I haven't really tested this patch alone.  Please test with
> 	the following NCQ EH patches applied.

this seems mostly OK, though I need to read it over again.  Definitely 
needs to be split up.  Things like the renaming should be moved to 
separate patches.


> 05_libata_add-drv_err-to-ata_to_sense_error.patch
> 	: add drv_err argument to ata_to_sense_error()
> 
> 	During NCQ error handling, drv_stat and drv_err values are
> 	obtained from log page 10h.  This patch adds drv_err argument
> 	to ata_to_sense_error() such that it can be used with values
> 	obtained from log page 10h.

Seems OK, though the s/err/drv_err/ should be a separate patch.


> 07_libata_convert-ahci-to-new-eh.patch
> 	: convert ahci driver to use new NCQ helpers
> 
> 	This patch converts ahci driver to use new NCQ helpers.

the start-DMA path seems a bit heavy, though if its ONLY used in EH 
paths, I suppose its OK.


> 08_libata_ahci-stop-dma-before-resetting.patch
> 	: stop dma before reset
> 
> 	AHCI 1.1 mandates stopping dma before issueing COMMRESET.  The
> 	original code didn't and it resulted in occasional lockup of
> 	the controller during EH recovery.  This patch fixes the
> 	problem.

patch should probably be bumped to the top of the list (modulo obvious 
dependencies)



      parent reply	other threads:[~2005-08-20  6:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07 13:09 [PATCH libata-dev-2.6:ncq 00/11] libata: new error handling & NCQ generic helpers (review only) Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 01/11] libata: implement ata_qc_exec_special() Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 02/11] libata: implement new EH framework and convert non-ncq EH Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 03/11] libata: convert sata_sil and ata_piix to use new EH Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 04/11] libata: implement ap->sactive Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 05/11] libata: add drv_err argument to ata_to_sense_error() Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 06/11] libata: implement generic NCQ helpers Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 07/11] libata: convert ahci driver to use new " Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 08/11] libata: stop dma before reset Tejun Heo
2005-07-07 13:09 ` [PATCH libata-dev-2.6:ncq 09/11] libata: remove unused functions Tejun Heo
2005-07-07 13:10 ` [PATCH libata-dev-2.6:ncq 10/11] libata: add ATAPI support to ahci Tejun Heo
2005-07-07 13:30   ` how it's broken Tejun Heo
2005-07-12  6:26     ` Tejun Heo
2005-07-07 13:10 ` [PATCH libata-dev-2.6:ncq 11/11] libata: debug stuff Tejun Heo
2005-08-20  6:08 ` Jeff Garzik [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=4306C8C8.2010901@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=albertcc@tw.ibm.com \
    --cc=axboe@suse.de \
    --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).