/* Inputs : cmd - struct scsi_cmnd structure to have pointers reset.  */
static __inline__ void initialize_SCp(struct scsi_cmnd *cmd)
/* Inputs : cmd - struct scsi_cmnd structure to have pointers reset.  */
static __inline__ void initialize_SCp(struct 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 = (char *) SGADDR(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;
    }
}