diff options
Diffstat (limited to 'drivers/scsi/in2000.c')
-rw-r--r-- | drivers/scsi/in2000.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c index c8b452f2878c..8053b1e86ccb 100644 --- a/drivers/scsi/in2000.c +++ b/drivers/scsi/in2000.c | |||
@@ -369,16 +369,16 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) | |||
369 | * - SCp.phase records this command's SRCID_ER bit setting | 369 | * - SCp.phase records this command's SRCID_ER bit setting |
370 | */ | 370 | */ |
371 | 371 | ||
372 | if (cmd->use_sg) { | 372 | if (scsi_bufflen(cmd)) { |
373 | cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; | 373 | cmd->SCp.buffer = scsi_sglist(cmd); |
374 | cmd->SCp.buffers_residual = cmd->use_sg - 1; | 374 | cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1; |
375 | cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); | 375 | cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); |
376 | cmd->SCp.this_residual = cmd->SCp.buffer->length; | 376 | cmd->SCp.this_residual = cmd->SCp.buffer->length; |
377 | } else { | 377 | } else { |
378 | cmd->SCp.buffer = NULL; | 378 | cmd->SCp.buffer = NULL; |
379 | cmd->SCp.buffers_residual = 0; | 379 | cmd->SCp.buffers_residual = 0; |
380 | cmd->SCp.ptr = (char *) cmd->request_buffer; | 380 | cmd->SCp.ptr = NULL; |
381 | cmd->SCp.this_residual = cmd->request_bufflen; | 381 | cmd->SCp.this_residual = 0; |
382 | } | 382 | } |
383 | cmd->SCp.have_data_in = 0; | 383 | cmd->SCp.have_data_in = 0; |
384 | 384 | ||