All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] don't set underflow for REQ_BLOCK_PC
@ 2003-09-22 19:50 Patrick Mansfield
  2003-09-24 12:27 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Mansfield @ 2003-09-22 19:50 UTC (permalink / raw)
  To: James Bottomley, linux-scsi; +Cc: axboe

I got underflow warnings and failures when sending an INQUIRY page 0x83
via the SG_IO REQ_BLOCK_PC interface.

The underflow field should only be set if we know for certain the size of
the data being transfered, so fix this by leaving it at zero for scsi
REQ_BLOCK_PC cases.

diff -uprN -X /home/patman/dontdiff bl-25/drivers/scsi/sd.c bl-25-sd_underflow-fix/drivers/scsi/sd.c
--- bl-25/drivers/scsi/sd.c	Mon Sep  8 14:50:56 2003
+++ bl-25-sd_underflow-fix/drivers/scsi/sd.c	Tue Sep 16 16:58:14 2003
@@ -174,7 +174,6 @@ static int sd_init_command(struct scsi_c
 			timeout = rq->timeout;
 
 		SCpnt->transfersize = rq->data_len;
-		SCpnt->underflow = rq->data_len;
 		goto queue;
 	}
 
diff -uprN -X /home/patman/dontdiff bl-25/drivers/scsi/sr.c bl-25-sd_underflow-fix/drivers/scsi/sr.c
--- bl-25/drivers/scsi/sr.c	Mon Sep  8 14:50:56 2003
+++ bl-25-sd_underflow-fix/drivers/scsi/sr.c	Tue Sep 16 16:58:27 2003
@@ -301,7 +301,6 @@ static int sr_init_command(struct scsi_c
 			timeout = rq->timeout;
 
 		SCpnt->transfersize = rq->data_len;
-		SCpnt->underflow = rq->data_len;
 		goto queue;
 	}
 
-- Patrick Mansfield

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] don't set underflow for REQ_BLOCK_PC
  2003-09-22 19:50 [PATCH] don't set underflow for REQ_BLOCK_PC Patrick Mansfield
@ 2003-09-24 12:27 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2003-09-24 12:27 UTC (permalink / raw)
  To: Patrick Mansfield; +Cc: James Bottomley, linux-scsi

On Mon, Sep 22 2003, Patrick Mansfield wrote:
> I got underflow warnings and failures when sending an INQUIRY page 0x83
> via the SG_IO REQ_BLOCK_PC interface.
> 
> The underflow field should only be set if we know for certain the size of
> the data being transfered, so fix this by leaving it at zero for scsi
> REQ_BLOCK_PC cases.
> 
> diff -uprN -X /home/patman/dontdiff bl-25/drivers/scsi/sd.c bl-25-sd_underflow-fix/drivers/scsi/sd.c
> --- bl-25/drivers/scsi/sd.c	Mon Sep  8 14:50:56 2003
> +++ bl-25-sd_underflow-fix/drivers/scsi/sd.c	Tue Sep 16 16:58:14 2003
> @@ -174,7 +174,6 @@ static int sd_init_command(struct scsi_c
>  			timeout = rq->timeout;
>  
>  		SCpnt->transfersize = rq->data_len;
> -		SCpnt->underflow = rq->data_len;
>  		goto queue;
>  	}
>  
> diff -uprN -X /home/patman/dontdiff bl-25/drivers/scsi/sr.c bl-25-sd_underflow-fix/drivers/scsi/sr.c
> --- bl-25/drivers/scsi/sr.c	Mon Sep  8 14:50:56 2003
> +++ bl-25-sd_underflow-fix/drivers/scsi/sr.c	Tue Sep 16 16:58:27 2003
> @@ -301,7 +301,6 @@ static int sr_init_command(struct scsi_c
>  			timeout = rq->timeout;
>  
>  		SCpnt->transfersize = rq->data_len;
> -		SCpnt->underflow = rq->data_len;
>  		goto queue;
>  	}

Agree, looks fine.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-24 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-22 19:50 [PATCH] don't set underflow for REQ_BLOCK_PC Patrick Mansfield
2003-09-24 12:27 ` Jens Axboe

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.