From: Tejun Heo <htejun@gmail.com>
To: "zhao, forrest" <forrest.zhao@intel.com>
Cc: jeff@garzik.org, liml@rtr.ca, ric@emc.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH v2] Snoop SET FEATURES - WRITE CACHE ENABLE/DISABLE command
Date: Wed, 31 May 2006 19:09:13 +0900 [thread overview]
Message-ID: <447D6B49.5020103@gmail.com> (raw)
In-Reply-To: <1148980614.3466.52.camel@forrest26.sh.intel.com>
Hello, Zhao.
zhao, forrest wrote:
[--snip--]
> diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
> index 9e5cb9f..810f42e 100644
> --- a/drivers/scsi/libata-scsi.c
> +++ b/drivers/scsi/libata-scsi.c
> @@ -1269,6 +1269,17 @@ static void ata_scsi_qc_complete(struct
> u8 *cdb = cmd->cmnd;
> int need_sense = (qc->err_mask != 0);
>
> + /* We snoop the SET_FEATURES - Write Cache ON/OFF command, and
> + * schedule EH_REVALIDATE operation to update the IDENTIFY DEVICE
> + * cache
> + */
> + if ((!(cdb[2] & 0x20)) && (qc->tf.command == ATA_CMD_SET_FEATURES) &&
!(cdb[2] & 0x20) seems out of place, and revalidation should be
scheduled only when the qc is completing successfully. ie. !need_sense,
but if used that way the variable name doesn't make much sense. IMHO,
renaming it to something like failed would be better.
> + ((qc->tf.feature == SETFEATURES_WC_ON) ||
> + (qc->tf.feature == SETFEATURES_WC_OFF))) {
> + qc->ap->eh_info.action = ATA_EH_REVALIDATE;
Please do action |= ATA_EH_REVALIDATE. Also, above schedules
revalidation for both devices for a PATA port. Currently, there is no
way to specify which device is offending from qc completion path. I'll
submit a patch to allow it. After the patch, please add
qc->ap->eh_info.dev = qc->dev such that only the affected device is
revalidated.
Thanks.
--
tejun
next prev parent reply other threads:[~2006-05-31 10:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-30 9:16 [PATCH v2] Snoop SET FEATURES - WRITE CACHE ENABLE/DISABLE command zhao, forrest
2006-05-31 10:09 ` Tejun Heo [this message]
2006-05-31 10:11 ` 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=447D6B49.5020103@gmail.com \
--to=htejun@gmail.com \
--cc=forrest.zhao@intel.com \
--cc=jeff@garzik.org \
--cc=liml@rtr.ca \
--cc=linux-ide@vger.kernel.org \
--cc=ric@emc.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.