All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Brian King <brking@linux.vnet.ibm.com>,
	linux-ide <linux-ide@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: Need help with libata error handling in libsas
Date: Mon, 25 Feb 2008 12:45:21 -0500	[thread overview]
Message-ID: <47C2FEB1.7020303@garzik.org> (raw)
In-Reply-To: <1203958631.3254.48.camel@localhost.localdomain>

James Bottomley wrote:
> On Mon, 2008-02-25 at 10:34 -0600, Brian King wrote:
>> The new libata-eh is used for more than just EH. It is used for device
>> probing, device revalidation, and power management. It is also woken for
>> all command failures and is where the request sense for ATAPI devices is
>> issued. Device revalidation following reset is also critical for ATA and
>> ATAPI devices. One example of this is some SATA/PATA converter chips
>> lose their DMA xfer settings following a reset and default to PIO mode
>> only. Any DMA transfer that is attempted simply hangs.

Strongly seconded.  Doing your own ATA EH would be foolish, as that 
would imply duplicating all that carefully-time-tested logic handling 
devices which follow the ATA specs... about 98% of the time :)

Just the set-transfer-mode logic took years to get right for the 
majority of ATA devices.


> OK ... I'm grepping around in the source trying to figure out all of
> this.  Is it documented anywhere?  That would really help me out at the
> moment.

Unfortunately, not really.  The simplistic version is...  freeze, set 
some flags, call a function to schedule EH as needed -- most notably 
when your HBA signals an ATA device error or some other error in the ATA 
domain.


Regardless of all this...   libsas IMO will cause some libata-EH growing 
pains.  libsas needs libata-EH for probing, revalidation, 
initialization, etc.  But libsas probably does NOT need libata-EH for 
certain duties like SATA PHY diagnosis and link handling.

libsas needs libata-EH.  Unfortunately for libsas, libata-EH was written 
from the "libata controls the world" point of view, and probably needs 
some modifications to play well in the new SATA/SAS shared worldview.

Brian's recommendation is quite sane...  your ->error_handler() probably 
just needs hard reset (aka COMRESET) capability.

	Jeff




      reply	other threads:[~2008-02-25 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-24 21:02 Need help with libata error handling in libsas James Bottomley
2008-02-25 16:34 ` Brian King
2008-02-25 16:57   ` James Bottomley
2008-02-25 17:45     ` 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=47C2FEB1.7020303@garzik.org \
    --to=jeff@garzik.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@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 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.