From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.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, 20 Mar 2006 20:54:58 -0500 [thread overview]
Message-ID: <441F5CF2.4080108@pobox.com> (raw)
In-Reply-To: <20060313101434.GF2091@htj.dyndns.org>
Tejun Heo wrote:
> On Mon, Mar 13, 2006 at 04:56:14AM -0500, Jeff Garzik wrote:
>
>>Tejun Heo wrote:
>>
>>>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.
>>
>>Long term that plan is fine, but you still have to deal with the
>>existing API one way or another. ata_port_disable() is called directly
>>by a bunch of Alan's PATA drivers, and by ata_piix and sata_mv.
>>
>>Thus you would either need to keep the PORT_DISABLED checks or convert
>>the drivers in question to a better API.
>>
>>So just check those ata_port_disable() cases...
>>
>
>
> AFAICS, ata_piix doesn't call ata_port_disable() directly, but
> sata_mv() does, through mv_host_intr() -> mv_err_intr()
> ->mv_stop_and_reset() -> __mv_phy_reset(). I'll check the code path
> such that disabled ports are handled properly. Thanks for pointing
> out.
Yeah, sorry, for ata_piix I was looking at vanilla linux-2.6.git rather
than libata-dev.git#upstream... :)
Jeff
prev parent reply other threads:[~2006-03-21 1:55 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 4/4] libata: add @disable_on_err argument " 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 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
2006-03-13 9:56 ` Jeff Garzik
2006-03-13 10:14 ` Tejun Heo
2006-03-21 1:54 ` 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=441F5CF2.4080108@pobox.com \
--to=jgarzik@pobox.com \
--cc=albertcc@tw.ibm.com \
--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).