* [PATCH] stex: use resid for xfer len information
@ 2007-07-05 19:09 Ed Lin
2007-07-08 12:44 ` Boaz Harrosh
0 siblings, 1 reply; 2+ messages in thread
From: Ed Lin @ 2007-07-05 19:09 UTC (permalink / raw)
To: james.Bottomley, linux-scsi
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] stex: use resid for xfer len information
2007-07-05 19:09 [PATCH] stex: use resid for xfer len information Ed Lin
@ 2007-07-08 12:44 ` Boaz Harrosh
0 siblings, 0 replies; 2+ messages in thread
From: Boaz Harrosh @ 2007-07-08 12:44 UTC (permalink / raw)
To: Ed Lin; +Cc: james.Bottomley, linux-scsi
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-08 12:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 19:09 [PATCH] stex: use resid for xfer len information Ed Lin
2007-07-08 12:44 ` Boaz Harrosh
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.