aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/wd33c93.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index fdbb92d1f722..f286c37da7e0 100644
--- a/drivers/scsi/wd33c93.c
+++ b/drivers/scsi/wd33c93.c
@@ -407,16 +407,16 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd,
407 * - SCp.phase records this command's SRCID_ER bit setting 407 * - SCp.phase records this command's SRCID_ER bit setting
408 */ 408 */
409 409
410 if (cmd->use_sg) { 410 if (scsi_bufflen(cmd)) {
411 cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; 411 cmd->SCp.buffer = scsi_sglist(cmd);
412 cmd->SCp.buffers_residual = cmd->use_sg - 1; 412 cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1;
413 cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); 413 cmd->SCp.ptr = sg_virt(cmd->SCp.buffer);
414 cmd->SCp.this_residual = cmd->SCp.buffer->length; 414 cmd->SCp.this_residual = cmd->SCp.buffer->length;
415 } else { 415 } else {
416 cmd->SCp.buffer = NULL; 416 cmd->SCp.buffer = NULL;
417 cmd->SCp.buffers_residual = 0; 417 cmd->SCp.buffers_residual = 0;
418 cmd->SCp.ptr = (char *) cmd->request_buffer; 418 cmd->SCp.ptr = NULL;
419 cmd->SCp.this_residual = cmd->request_bufflen; 419 cmd->SCp.this_residual = 0;
420 } 420 }
421 421
422/* WD docs state that at the conclusion of a "LEVEL2" command, the 422/* WD docs state that at the conclusion of a "LEVEL2" command, the