1995-05-30 08:16:23 +00:00
|
|
|
/*
|
1995-03-01 22:24:47 +00:00
|
|
|
* Driver for a device we can't identify.
|
1993-11-18 05:03:27 +00:00
|
|
|
* by Julian Elischer (julian@tfs.com)
|
|
|
|
*
|
1995-12-08 11:19:42 +00:00
|
|
|
* $Id: uk.c,v 1.11 1995/11/29 14:41:07 julian Exp $
|
1995-03-04 20:51:10 +00:00
|
|
|
*
|
|
|
|
* If you find that you are adding any code to this file look closely
|
|
|
|
* at putting it in "scsi_driver.c" instead.
|
1993-11-18 05:03:27 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/param.h>
|
1995-11-29 14:41:20 +00:00
|
|
|
#include <sys/systm.h>
|
1995-11-29 10:49:16 +00:00
|
|
|
#include <sys/conf.h>
|
|
|
|
#include <sys/kernel.h>
|
|
|
|
#ifdef DEVFS
|
|
|
|
#include <sys/devfsext.h>
|
|
|
|
#endif /*DEVFS*/
|
1995-12-08 11:19:42 +00:00
|
|
|
#include <scsi/scsi_all.h>
|
|
|
|
#include <scsi/scsiconf.h>
|
1995-11-29 10:49:16 +00:00
|
|
|
|
1993-11-18 05:03:27 +00:00
|
|
|
|
1995-12-08 11:19:42 +00:00
|
|
|
static d_open_t ukopen;
|
|
|
|
static d_close_t ukclose;
|
|
|
|
static d_ioctl_t ukioctl;
|
|
|
|
|
|
|
|
#define CDEV_MAJOR 31
|
|
|
|
struct cdevsw uk_cdevsw =
|
|
|
|
{ ukopen, ukclose, noread, nowrite, /*31*/
|
|
|
|
ukioctl, nostop, nullreset, nodevtotty,/* unknown */
|
|
|
|
seltrue, nommap, NULL, "uk" ,NULL, -1 };
|
|
|
|
|
1995-03-01 22:24:47 +00:00
|
|
|
SCSI_DEVICE_ENTRIES(uk)
|
|
|
|
|
1993-11-18 05:03:27 +00:00
|
|
|
struct scsi_device uk_switch =
|
|
|
|
{
|
1995-12-08 11:19:42 +00:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
"uk",
|
|
|
|
0,
|
1995-03-01 22:24:47 +00:00
|
|
|
{0, 0},
|
|
|
|
SDEV_ONCE_ONLY, /* Only one open allowed */
|
1995-03-04 20:51:10 +00:00
|
|
|
0,
|
|
|
|
"Unknown",
|
1995-03-01 22:24:47 +00:00
|
|
|
ukopen,
|
1995-12-08 11:19:42 +00:00
|
|
|
0,
|
1995-03-01 22:24:47 +00:00
|
|
|
T_UNKNOWN,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
1994-12-16 06:03:28 +00:00
|
|
|
};
|
1995-11-29 10:49:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
static uk_devsw_installed = 0;
|
|
|
|
|
|
|
|
static void uk_drvinit(void *unused)
|
|
|
|
{
|
|
|
|
dev_t dev;
|
|
|
|
|
|
|
|
if( ! uk_devsw_installed ) {
|
1995-12-08 11:19:42 +00:00
|
|
|
dev = makedev(CDEV_MAJOR, 0);
|
|
|
|
cdevsw_add(&dev,&uk_cdevsw, NULL);
|
1995-11-29 10:49:16 +00:00
|
|
|
uk_devsw_installed = 1;
|
1995-11-29 14:41:20 +00:00
|
|
|
}
|
1995-11-29 10:49:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SYSINIT(ukdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,uk_drvinit,NULL)
|
|
|
|
|
|
|
|
|