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: albertcc@tw.ibm.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/4] libata: make ata_set_mode() responsible for failure handling
Date: Mon, 13 Mar 2006 18:44:01 +0900	[thread overview]
Message-ID: <20060313094401.GD2091@htj.dyndns.org> (raw)
In-Reply-To: <44152F3D.50307@pobox.com>

On Mon, Mar 13, 2006 at 03:37:17AM -0500, Jeff Garzik wrote:
> 
> I have the following concern with this patch (#3) however:
> 
> >-static void ata_dev_set_mode(struct ata_port *ap, struct ata_device *dev)
> >+static int ata_dev_set_mode(struct ata_port *ap, struct ata_device *dev)
> > {
> >-	if (!ata_dev_present(dev) || (ap->flags & ATA_FLAG_PORT_DISABLED))
> >-		return;
> 
> I think you drop too many ATA_FLAG_PORT_DISABLED tests in this patch, 
> leading the code to potentially miss a previously-flagged PORT_DISABLED 
> (perhaps by an LLDD).
> 

Hmmm... the plan is to disallow LLDD's take ports or devices offline
from low level callbacks.  They should just let upper layer know by
returning failure code.

Currently, during probing, the only place where disabling a port is
allowed is ->phy_reset (for compatibility), which ata_bus_probe()
interprets as no active device and reenables the port.  Later,
->error_handler() would have that power too but I don't think any
other callback should be allowed to do that.  Also, no current
in-kernel LLDD does that during probing process.

If we're gonna allow some callbacks to disable ports or devices.  I
think we need to come up with clear rules such that checks can be
performed exactly where needed.

Thanks.

-- 
tejun

  reply	other threads:[~2006-03-13  9:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13  8:09 [PATCHSET] libata: add @disable_on_err to ata_set_mode() Tejun Heo
2006-03-13  8:12 ` [PATCH 2/4] libata: use ata_dev_disable() in ata_bus_probe() Tejun Heo
2006-03-13  8:12 ` [PATCH 4/4] libata: add @disable_on_err argument to ata_set_mode() Tejun Heo
2006-03-13  8:12 ` [PATCH 1/4] libata: implement ata_dev_disable() Tejun Heo
2006-03-13  8:12 ` [PATCH 3/4] libata: make ata_set_mode() responsible for failure handling Tejun Heo
2006-03-13  8:37   ` Jeff Garzik
2006-03-13  9:44     ` Tejun Heo [this message]
2006-03-13  9:56       ` Jeff Garzik
2006-03-13 10:14         ` Tejun Heo
2006-03-21  1:54           ` 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=20060313094401.GD2091@htj.dyndns.org \
    --to=htejun@gmail.com \
    --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).