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 03:37:17 -0500 [thread overview]
Message-ID: <44152F3D.50307@pobox.com> (raw)
In-Reply-To: <11422375531645-git-send-email-htejun@gmail.com>
Tejun Heo wrote:
> Make ata_set_mode() responsible for determining whether to take port
> or device offline on failure. ata_dev_set_xfermode() and
> ata_dev_set_mode() indicate error to the caller instead of disabling
> port directly on failure. Also, for consistency, ata_dev_present()
> check is done in ata_set_mode() instead of ata_dev_set_mode().
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
>
> ---
>
> drivers/scsi/libata-core.c | 56 ++++++++++++++++++++++++++++----------------
> 1 files changed, 36 insertions(+), 20 deletions(-)
>
> 07934616ecb83d7bac2adfe9eb32f5173feb32ff
> diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
> index b7595bf..6826181 100644
> --- a/drivers/scsi/libata-core.c
> +++ b/drivers/scsi/libata-core.c
> @@ -64,7 +64,8 @@
> static unsigned int ata_dev_init_params(struct ata_port *ap,
> struct ata_device *dev);
> static void ata_set_mode(struct ata_port *ap);
> -static void ata_dev_set_xfermode(struct ata_port *ap, struct ata_device *dev);
> +static unsigned int ata_dev_set_xfermode(struct ata_port *ap,
> + struct ata_device *dev);
> static void ata_dev_xfermask(struct ata_port *ap, struct ata_device *dev);
>
> static unsigned int ata_unique_id = 1;
> @@ -1754,20 +1755,28 @@ int ata_timing_compute(struct ata_device
> return 0;
> }
ACK 1-4 in this patchset, but dropping due to dropped patches in
previous patchset.
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).
Jeff
next prev parent reply other threads:[~2006-03-13 8:37 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 [this message]
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
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=44152F3D.50307@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).