diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1999-08-24 01:20:23 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1999-08-24 01:20:23 +0000 |
commit | b24f9df7ec3ec16be1cd52c9189217ab9af11311 (patch) | |
tree | 66ba79b8e8415341d8568978a4d07533f8fa5114 /sys/scsi/scsi_ioctl.c | |
parent | fab392781711b5f3ab639479a93d855b6c0e1dc3 (diff) |
Added type field to scsi_addr to reflect bus/device type (ATAPI or SCSI).
Updated ioctls to match
Minor patches in anticipation of wd->sd translation layer
Diffstat (limited to 'sys/scsi/scsi_ioctl.c')
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index dfe18a0ea49..80cdbbd4a83 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.9 1997/09/01 19:11:46 niklas Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.10 1999/08/24 01:20:22 csapuntz Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* @@ -347,6 +347,11 @@ scsi_do_ioctl(sc_link, dev, cmd, addr, flag, p) sc_link->flags |= SDEV_DB4; return 0; } + case OSCIOCREPROBE: { + struct oscsi_addr *sca = (struct oscsi_addr *)addr; + + return scsi_probe_busses(sca->scbus, sca->target, sca->lun); + } case SCIOCREPROBE: { struct scsi_addr *sca = (struct scsi_addr *)addr; @@ -383,9 +388,19 @@ scsi_do_safeioctl(sc_link, dev, cmd, addr, flag, p) SC_DEBUG(sc_link, SDEV_DB2, ("scsi_do_safeioctl(0x%lx)\n", cmd)); switch(cmd) { + case OSCIOCIDENTIFY: { + struct oscsi_addr *sca = (struct oscsi_addr *)addr; + + sca->scbus = sc_link->scsibus; + sca->target = sc_link->target; + sca->lun = sc_link->lun; + return 0; + } case SCIOCIDENTIFY: { struct scsi_addr *sca = (struct scsi_addr *)addr; + sca->type = (sc_link->flags & SDEV_ATAPI) + ? TYPE_ATAPI : TYPE_SCSI; sca->scbus = sc_link->scsibus; sca->target = sc_link->target; sca->lun = sc_link->lun; @@ -394,6 +409,7 @@ scsi_do_safeioctl(sc_link, dev, cmd, addr, flag, p) case SCIOCCOMMAND: case SCIOCDEBUG: case SCIOCREPROBE: + case OSCIOCREPROBE: case SCIOCRESET: return EBADF; case SCIOCRECONFIG: |