All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Ed Lin <ed.lin@promise.com>
Cc: "james.Bottomley" <james.Bottomley@SteelEye.com>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] stex: use resid for xfer len information
Date: Sun, 08 Jul 2007 15:44:28 +0300	[thread overview]
Message-ID: <4690DC2C.6040006@panasas.com> (raw)
In-Reply-To: <NONAMEBYIqAFoXu4S910000013c@nonameb.ptu.promise.com>

Ed Lin wrote:
> The original implementation in stex_ys_commands() is inappropriate.
> For xfer len information, we should use resid instead.
> 
> Signed-off-by: Ed Lin <ed.lin@promise.com>
> ---
> diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
> index adda296..72f6d80 100644
> --- a/drivers/scsi/stex.c
> +++ b/drivers/scsi/stex.c
> @@ -719,8 +719,8 @@ static void stex_ys_commands(struct st_h
>  
>  	if (ccb->cmd->cmnd[0] == MGT_CMD &&
>  		resp->scsi_status != SAM_STAT_CHECK_CONDITION) {
> -		scsi_bufflen(ccb->cmd) =
> -			le32_to_cpu(*(__le32 *)&resp->variable[0]);
> +		scsi_set_resid(ccb->cmd, scsi_bufflen(ccb->cmd) -
> +			le32_to_cpu(*(__le32 *)&resp->variable[0]));
>  		return;
>  	}
>  
> 
> 
> -

Thanks Ed Lin

This looks perfect to me. I was hoping for such a solution.
Thank you for looking into it.

Boaz


      reply	other threads:[~2007-07-08 12:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05 19:09 [PATCH] stex: use resid for xfer len information Ed Lin
2007-07-08 12:44 ` Boaz Harrosh [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=4690DC2C.6040006@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=ed.lin@promise.com \
    --cc=james.Bottomley@SteelEye.com \
    --cc=linux-scsi@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 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.