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, 13 Mar 2006 04:56:14 -0500 [thread overview]
Message-ID: <441541BE.80505@pobox.com> (raw)
In-Reply-To: <20060313094401.GD2091@htj.dyndns.org>
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...
Jeff
next prev parent reply other threads:[~2006-03-13 9:56 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 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 [this message]
2006-03-13 10:14 ` Tejun Heo
2006-03-21 1:54 ` Jeff Garzik
2006-03-13 8:12 ` [PATCH 1/4] 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=441541BE.80505@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).