Commit 53d2a885 authored by Boaz Harrosh's avatar Boaz Harrosh Committed by James Bottomley

[SCSI] in2000: convert to accessors and !use_sg cleanup

 - convert to accessors and !use_sg cleanup
Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent dfb104ff
...@@ -369,16 +369,16 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) ...@@ -369,16 +369,16 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
* - SCp.phase records this command's SRCID_ER bit setting * - SCp.phase records this command's SRCID_ER bit setting
*/ */
if (cmd->use_sg) { if (scsi_bufflen(cmd)) {
cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; cmd->SCp.buffer = scsi_sglist(cmd);
cmd->SCp.buffers_residual = cmd->use_sg - 1; cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1;
cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); cmd->SCp.ptr = sg_virt(cmd->SCp.buffer);
cmd->SCp.this_residual = cmd->SCp.buffer->length; cmd->SCp.this_residual = cmd->SCp.buffer->length;
} else { } else {
cmd->SCp.buffer = NULL; cmd->SCp.buffer = NULL;
cmd->SCp.buffers_residual = 0; cmd->SCp.buffers_residual = 0;
cmd->SCp.ptr = (char *) cmd->request_buffer; cmd->SCp.ptr = NULL;
cmd->SCp.this_residual = cmd->request_bufflen; cmd->SCp.this_residual = 0;
} }
cmd->SCp.have_data_in = 0; cmd->SCp.have_data_in = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment