From ee0ae927937ac8a30350cca1a7a75efafb13976e Mon Sep 17 00:00:00 2001 From: Boaz Harrosh <bharrosh@panasas.com> Date: Sun, 9 Sep 2007 21:25:11 +0300 Subject: [SCSI] wd33c93: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> --- drivers/scsi/wd33c93.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/scsi/wd33c93.c') diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index fdbb92d1f72..f286c37da7e 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c @@ -407,16 +407,16 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd, * - SCp.phase records this command's SRCID_ER bit setting */ - if (cmd->use_sg) { - cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; - cmd->SCp.buffers_residual = cmd->use_sg - 1; + if (scsi_bufflen(cmd)) { + cmd->SCp.buffer = scsi_sglist(cmd); + cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1; cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); cmd->SCp.this_residual = cmd->SCp.buffer->length; } else { cmd->SCp.buffer = NULL; cmd->SCp.buffers_residual = 0; - cmd->SCp.ptr = (char *) cmd->request_buffer; - cmd->SCp.this_residual = cmd->request_bufflen; + cmd->SCp.ptr = NULL; + cmd->SCp.this_residual = 0; } /* WD docs state that at the conclusion of a "LEVEL2" command, the -- cgit v1.2.3-18-g5258