Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee0ae927 authored by Boaz Harrosh's avatar Boaz Harrosh Committed by James Bottomley
Browse files

[SCSI] wd33c93: 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 8e31f1f4
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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