/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident	"$Header: tg_space.c 1.5 90/01/25 $"

/*
 * tg_space.c 
 * 	HP 88780 SCSI tape device driver configuration file.
 */

/* $Log:	tg_space.c,v $
 */

#include "sys/types.h"
#include "sys/devsw.h"
#include "sys/param.h"
#include "sys/buf.h"
#include "sys/autoconf.h"
#include "sys/scsi.h"
#include "sys/scsi_adapter.h"
#include "sys/tg_device.h"
#include "sys/mtio.h"
#include "sys/tg.h"			/* driver local structures */
#include "config.h"

/*
 * Host interrupt priority for tg devices.
 */
unchar tg_bin = 5;

/*
 * Configure the device's tuning parameters.
 *
 * The number to the far right will be the unit 
 * number portion of the devices major/minor pair.
 *
 * Currently each entry consists of one field.  A
 * structure was used for flexibility in event of
 * future expansion.  The 'cflags' field contains
 * flags that configure the behavior of a particular
 * drive unit.  They are described in the manual
 * page for this device driver.
 */
struct tg_bconf tg_bconf[] = {
	/* cflags */
	{ 0 }, 	/*0*/
	{ 0 }, 	/*1*/
	{ 0 }, 	/*2*/
	{ 0 }, 	/*3*/
	{ 0 }, 	/*4*/
	{ 0 }, 	/*5*/
	{ 0 }, 	/*6*/
	{ 0 }, 	/*7*/
};

/* 
 * There should be no need to alter 
 * the following declaration/assignment.
 */
int tg_max_ndevs = sizeof(tg_bconf) / sizeof(struct tg_bconf);

/*
 * THIS TABLE MUST NOT BE ALTERED EXCEPT TO ADD OR DELETE
 * SUPPORT FOR A SPECIFIC DRIVE PRODUCT.
 *
 * It table is used in determining which tape devices
 * this driver should control (to resolve conflicts with
 * 1/4" SCSI tape) and provides indirect references to
 * vendor specific functions and/or data required by the
 * driver for multiple products.
 */
struct tg_drive_info tg_drives[] = {
	/*
	 * Vendor i.d., product i.d., 	   target type, slen, mlen,
	 *	drive dependent functions
	 */
	{  "HP",           "88780", 	   TGD_EMBED,     28,  12,
		0, 0},
};

/* 
 * There should be no need to alter 
 * the following declaration/assignment.
 */
int tg_drives_len = sizeof(tg_drives) / sizeof(struct tg_drive_info);

#ifndef i386
gate_t tg_gate = 57;			/* Gate for this device driver */
#endif

/* table of possible minor device number permutations per unit */
int tg_minor[] = {
	MTD_NONE,
	MTD_NONE | MTF_NOREWFLAG,
	MTD_MED,
	MTD_MED | MTF_NOREWFLAG,
	MTD_HIGH,
	MTD_HIGH | MTF_NOREWFLAG
};
int tg_num_minor = sizeof(tg_minor) / sizeof(int);

/* All ssm_scsi devices use the same configuration */
extern struct device_config ssm_scsi_config[];

/* autoconfig structure linking device configuration with busses */
struct dev_on_bus tg_on_busses[] = {
	{ SSM_SCSI, 1, ssm_scsi_config }, 
	{ NOBUS,},
};


/* device operations */

extern	int	tgopen();
extern	int	tgclose();
extern	int	tgstrat();
extern	int	tgminphys();
extern	int	tgread();
extern	int	tgwrite();
extern	int	tgioctl();
extern	int	nulldev();
extern	int	nostrmsgio();
extern	int	nostrpoll();

struct	devops	tgdevops = {
	tgopen,			/* d_open */
	tgclose,		/* d_close */
	tgstrat,		/* d_strategy */
	tgminphys,		/* d_minphys */
	nulldev,		/* d_size */
	nulldev,		/* d_print */
	tgread,			/* d_read */
	tgwrite,		/* d_write */
	tgioctl,		/* d_ioctl */
	nulldev,		/* d_mmap */
	nulldev,		/* d_intr */
	NULL,			/* d_str */
	nostrmsgio,		/* d_strmsgio */
	nostrpoll		/* d_strpoll */
};
