linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	albertcc@tw.ibm.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH 2/2] libata: add @disable_on_err argument to ata_set_mode()
Date: Sat, 25 Mar 2006 14:40:08 +0900	[thread overview]
Message-ID: <20060325054008.GG5288@htj.dyndns.org> (raw)
In-Reply-To: <4424C12B.7070106@pobox.com>

On Fri, Mar 24, 2006 at 11:03:55PM -0500, Jeff Garzik wrote:
> Tejun Heo wrote:
> >ata_set_mode() used to disable whole port on failure.  This patch adds
> >@disable_on_err which makes ata_set_mode() disable failing devices
> >when non-zero, and simply return when zero.  Due to the port-wide
> >characteristic of ATA xfer mode configuration, ata_mode_set() is the
> >final place to determine device offlining; thus, the @disable_on_err
> >mechanism to tell it which action to take on failure.
> >
> >With this patch, only failing devices are disabled not the whole port.
> >Transfer mode configuration must consider all devices on the port
> >regardless of failure status; otherwise, device selection timing can
> >be violoated resulting in malfunction.  This patch makes
> >ata_dev_xfermask() consider disabled but present devices such that
> >device timing selection timing is honored.
> >
> >Signed-off-by: Tejun Heo <htejun@gmail.com>
> 
> ACK, but dropped due to dropping patch #1
> 

I'll remove ata_dev_present() for the time being.  It's used in only
one place anyway.  We can do with ata_dev_enabled() ||
ata_dev_disabled() for the time being and resurrect ata_dev_present()
after one or two releases, I think.

> 
> >As said in the above comment, this patch makes sure that present but
> >disabled devices are taken into account when determining transfer
> >mode.  If IDENTIFY data is present, it is used; otherwise, PIO0 is
> >forced.  I think this should be enough.
> 
> Several follow-up comments:
> 
> * Ideally, I think libata should re-read the identify data from the 
> device.  This (a) makes sure PIO is working, and (b) tells us for 
> certain what mode the device is.  That's fine for a follow-up patch 
> though, since few will exercise this code anyway.

Agreed, we can revalidate the device and then try to configure the
next lower transfer mode until we succeed.  For the time being, I just
wanna move forward with the current code so that EH changes can be
submitted sooner than later.

> * skipping ->post_set_mode() in this error case being discussing is 
> probably unwise.

We don't skip ->post_set_mode() unless @disable_on_err is zero, in
which case the upper layer is responsible for handling the error
condition.  Upper layer will usually reset and reconfigure the whole
thing again, so omitting ->post_set_mode() should be fine there (we
need to force PIO0 before IDENTIFY'ing though).

> BTW, got any PATA hardware lying about?  Since you're wandering into 
> xfer mode territory, it would better to test PATA than SATA, as xfer 
> mode matters more in the PATA realm.  Intel PATA should be fairly easy 
> to find, covered by ata_piix, and all the docs are on developer.intel.com.

Yeap, my test machine's ICH7 can do ata_piix and my notebook has
ICH6M.

-- 
tejun

  reply	other threads:[~2006-03-25  5:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24  6:25 [PATCHSET] libata: add @disable_on_err to ata_set_mode(), take#2 Tejun Heo
2006-03-24  6:25 ` [PATCH 1/5] libata: check if port is disabled after internal command Tejun Heo
2006-03-24 14:40   ` Jeff Garzik
2006-03-24  6:25 ` [PATCH 3/5] libata: use ata_dev_disable() in ata_bus_probe() Tejun Heo
2006-03-24  6:25 ` [PATCH 4/5] libata: make ata_set_mode() responsible for failure handling Tejun Heo
2006-03-24  6:25 ` [PATCH 5/5] libata: add @disable_on_err argument to ata_set_mode() Tejun Heo
2006-03-24 15:04   ` Jeff Garzik
2006-03-24 15:51     ` Alan Cox
2006-03-25  0:53       ` [PATCH 1/2] libata: implement ata_dev_enabled, disabled and present() Tejun Heo
2006-03-25  3:50         ` Jeff Garzik
2006-03-25  1:14       ` [PATCH 2/2] libata: add @disable_on_err argument to ata_set_mode() Tejun Heo
2006-03-25  4:03         ` Jeff Garzik
2006-03-25  5:40           ` Tejun Heo [this message]
2006-03-25  6:12             ` [PATCH 1/2] libata: implement ata_dev_enabled and disabled() Tejun Heo
2006-03-25 23:54               ` Alan Cox
2006-03-25 23:57                 ` Tejun Heo
2006-03-27 11:17                   ` Alan Cox
2006-03-29  6:58                     ` Tejun Heo
2006-03-29 11:59                       ` Alan Cox
2006-03-30 21:59               ` Jeff Garzik
2006-03-30 23:36                 ` Tejun Heo
2006-03-25  6:13             ` [PATCH 2/2] libata: add @disable_on_err argument to ata_set_mode() Tejun Heo
2006-03-25 23:58           ` Alan Cox
2006-03-24  6:25 ` [PATCH 2/5] libata: implement ata_dev_disable() 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=20060325054008.GG5288@htj.dyndns.org \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertcc@tw.ibm.com \
    --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).