diff options
author | Christoph Hellwig <hch@lst.de> | 2006-06-03 07:21:13 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-06 11:07:25 -0400 |
commit | 5d5ff44fe6775ccb922fd1f7d478b2ba9ca95068 (patch) | |
tree | d8569caefe1cb5ecced30929ef98d3e1fe642425 /drivers/scsi/in2000.c | |
parent | e4a082c7c1f9a7b11fece6918e7ee5519b39ac46 (diff) |
[SCSI] fix up request buffer reference in various scsi drivers
Various scsi drivers use scsi_cmnd.buffer and scsi_cmnd.bufflen in their
queuecommand functions. Those fields are internal storage for the
midlayer only and are used to restore the original payload after
request_buffer and request_bufflen have been overwritten for EH. Using
the buffer and bufflen fields means they do very broken things in error
handling.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/in2000.c')
-rw-r--r-- | drivers/scsi/in2000.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c index 9c519876f8a0..89a57a62e8ca 100644 --- a/drivers/scsi/in2000.c +++ b/drivers/scsi/in2000.c | |||
@@ -370,7 +370,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) | |||
370 | */ | 370 | */ |
371 | 371 | ||
372 | if (cmd->use_sg) { | 372 | if (cmd->use_sg) { |
373 | cmd->SCp.buffer = (struct scatterlist *) cmd->buffer; | 373 | cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; |
374 | cmd->SCp.buffers_residual = cmd->use_sg - 1; | 374 | cmd->SCp.buffers_residual = cmd->use_sg - 1; |
375 | cmd->SCp.ptr = (char *) page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset; | 375 | cmd->SCp.ptr = (char *) page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset; |
376 | cmd->SCp.this_residual = cmd->SCp.buffer->length; | 376 | cmd->SCp.this_residual = cmd->SCp.buffer->length; |