diff options
author | dufault <dufault@FreeBSD.org> | 1995-01-08 13:38:38 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 1995-01-08 13:38:38 +0000 |
commit | 3cf1ff13e332d0b753ba08fe1e3ad5b994f1ac6c (patch) | |
tree | 273bcb9e1be1a1dad1080681ddc7edafb2c2060a /sys/scsi/uk.c | |
parent | c280bae2f039222946dd53421445e050d5f7d844 (diff) | |
download | FreeBSD-src-3cf1ff13e332d0b753ba08fe1e3ad5b994f1ac6c.zip FreeBSD-src-3cf1ff13e332d0b753ba08fe1e3ad5b994f1ac6c.tar.gz |
Reviewed by: gibbs@estienne.CS.Berkeley.EDU
Reenabled "SCIOCOMAND" ioctl.
Restructured so low level drivers can easily request retries.
Added preliminary fixed SCSI devices (should be revisited before 2.1)
Added "ssc" device that can have its' (HBA, ID, LUN) set via ioctl.
Diffstat (limited to 'sys/scsi/uk.c')
-rw-r--r-- | sys/scsi/uk.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/scsi/uk.c b/sys/scsi/uk.c index f09fbbf..7544d1e 100644 --- a/sys/scsi/uk.c +++ b/sys/scsi/uk.c @@ -2,7 +2,7 @@ * Dummy driver for a device we can't identify. * by Julian Elischer (julian@tfs.com) * - * $Id: uk.c,v 1.4 1994/08/13 03:50:31 wollman Exp $ + * $Id: uk.c,v 1.5 1994/12/16 06:03:28 phk Exp $ */ #include <sys/param.h> @@ -40,6 +40,7 @@ struct uk_driver { static u_int32 next_uk_unit = 0; +errval ukopen(); /* * The routine called by the low level scsi routine when it discovers * a device suitable for this driver. @@ -107,6 +108,7 @@ ukattach(sc_link) uk->sc_link = sc_link; sc_link->device = &uk_switch; sc_link->dev_unit = unit; + sc_link->dev = UKSETUNIT(scsi_dev_lookup(ukopen), unit); printf("uk%d: unknown device\n", unit); uk->flags = UK_KNOWN; @@ -125,7 +127,7 @@ ukopen(dev) u_int32 unit, mode; struct uk_data *uk; struct scsi_link *sc_link; - unit = minor(dev); + unit = UKUNIT(dev); /* * Check the unit is legal @@ -200,9 +202,9 @@ ukioctl(dev, cmd, arg, mode) /* * Find the device that the user is talking about */ - unit = minor(dev); + unit = UKUNIT(dev); uk = uk_driver.uk_data[unit]; sc_link = uk->sc_link; - return(scsi_do_ioctl(sc_link,cmd,arg,mode)); + return(scsi_do_ioctl(dev,sc_link,cmd,arg,mode)); } |