/* Set up the internal fields in the SCSI command.  */
static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
/* Set up the internal fields in the SCSI command.  */
static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
{
	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 = NULL;
		cmd->SCp.this_residual = 0;
	}
}