lkml.org 
[lkml]   [2009]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/14] ide-atapi: switch to rq->resid_len
Hello.

Borislav Petkov wrote:

> Now that we have rq->resid_len, use it to account partial completion
> amount during the lifetime of an rq, decrementing it on each successful
> transfer. As a result, get rid of now unused pc->xferred.

> While at it, remove noisy debug call in ide_prep_sense.

> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>

> diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> index cacffd4..1f2af8b 100644
> --- a/drivers/ide/ide-atapi.c
> +++ b/drivers/ide/ide-atapi.c

[...]

> @@ -633,8 +631,6 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
> } else {
> pc = drive->pc;
>
> - /* We haven't transferred any data yet */
> - pc->xferred = 0;
>
> valid_tf = IDE_VALID_DEVICE;
> bytes = blk_rq_bytes(rq);

You forgot to kill the empty line too...

> @@ -643,6 +639,9 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
> : min_t(unsigned int,
> bytes, 63 * 1024));
>
> + /* We haven't transferred any data yet */
> + rq->resid_len = bcount;
> +
> if (pc->flags & PC_FLAG_DMA_ERROR) {
> pc->flags &= ~PC_FLAG_DMA_ERROR;
> ide_dma_off(drive);

MBR, Sergei


\
 
 \ /
  Last update: 2009-05-12 16:41    [W:0.136 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site