summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/stand
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-11-23 07:15:59 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-11-23 07:15:59 +0000
commit2609c36d428c78eda3c28cef167ca0374334ebe7 (patch)
tree51f8af6dbf8d71286ae33fcbc8fd877e80f351ef /sys/arch/hp300/stand
parentd770c0144b052d846889a0e2bf14814e788fce8a (diff)
Pick HP-IB describe structures changes from main kernel code here as well.
Diffstat (limited to 'sys/arch/hp300/stand')
-rw-r--r--sys/arch/hp300/stand/common/ct.c7
-rw-r--r--sys/arch/hp300/stand/common/hd.c7
-rw-r--r--sys/arch/hp300/stand/include/hpibvar.h30
3 files changed, 37 insertions, 7 deletions
diff --git a/sys/arch/hp300/stand/common/ct.c b/sys/arch/hp300/stand/common/ct.c
index bda4470b65e..181be709ef8 100644
--- a/sys/arch/hp300/stand/common/ct.c
+++ b/sys/arch/hp300/stand/common/ct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ct.c,v 1.3 2005/04/22 00:42:16 miod Exp $ */
+/* $OpenBSD: ct.c,v 1.4 2005/11/23 07:15:57 miod Exp $ */
/* $NetBSD: ct.c,v 1.9 1996/10/14 07:29:57 thorpej Exp $ */
/*
@@ -38,6 +38,7 @@
#include <sys/param.h>
#include <hp300/dev/ctreg.h>
+#include "hpibvar.h"
#include <lib/libsa/stand.h>
@@ -104,7 +105,7 @@ int
ctident(ctlr, unit)
int ctlr, unit;
{
- struct ct_describe desc;
+ struct cs80_describe desc;
u_char stat, cmd[3];
char name[7];
int id, i;
@@ -129,7 +130,7 @@ ctident(ctlr, unit)
cmd[1] = C_SVOL(0);
cmd[2] = C_DESC;
hpibsend(ctlr, unit, C_CMD, cmd, sizeof(cmd));
- hpibrecv(ctlr, unit, C_EXEC, &desc, 37);
+ hpibrecv(ctlr, unit, C_EXEC, &desc, sizeof(desc));
hpibrecv(ctlr, unit, C_QSTAT, &stat, sizeof(stat));
bzero(name, sizeof(name));
if (!stat) {
diff --git a/sys/arch/hp300/stand/common/hd.c b/sys/arch/hp300/stand/common/hd.c
index b1c8cc1ee54..4419b9ae611 100644
--- a/sys/arch/hp300/stand/common/hd.c
+++ b/sys/arch/hp300/stand/common/hd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hd.c,v 1.4 2005/09/06 19:01:01 miod Exp $ */
+/* $OpenBSD: hd.c,v 1.5 2005/11/23 07:15:57 miod Exp $ */
/* $NetBSD: rd.c,v 1.11 1996/12/21 21:34:40 thorpej Exp $ */
/*
@@ -50,6 +50,7 @@
#include "samachdep.h"
#include <hp300/dev/hdreg.h>
+#include "hpibvar.h"
struct hd_iocmd hd_ioc;
struct hd_rscmd hd_rsc;
@@ -136,7 +137,7 @@ int
hdident(ctlr, unit)
register int ctlr, unit;
{
- struct hd_describe desc;
+ struct cs80_describe desc;
u_char stat, cmd[3];
char name[7];
register int id, i;
@@ -155,7 +156,7 @@ hdident(ctlr, unit)
cmd[1] = C_SVOL(0);
cmd[2] = C_DESC;
hpibsend(ctlr, unit, C_CMD, cmd, sizeof(cmd));
- hpibrecv(ctlr, unit, C_EXEC, &desc, 37);
+ hpibrecv(ctlr, unit, C_EXEC, &desc, sizeof(desc));
hpibrecv(ctlr, unit, C_QSTAT, &stat, sizeof(stat));
bzero(name, sizeof(name));
if (!stat) {
diff --git a/sys/arch/hp300/stand/include/hpibvar.h b/sys/arch/hp300/stand/include/hpibvar.h
index 31678951490..cc2707d9580 100644
--- a/sys/arch/hp300/stand/include/hpibvar.h
+++ b/sys/arch/hp300/stand/include/hpibvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpibvar.h,v 1.2 2003/06/02 23:27:46 millert Exp $ */
+/* $OpenBSD: hpibvar.h,v 1.3 2005/11/23 07:15:58 miod Exp $ */
/* $NetBSD: hpibvar.h,v 1.4 1994/10/26 07:27:24 cgd Exp $ */
/*
@@ -56,3 +56,31 @@ struct hpib_softc {
};
extern struct hpib_softc hpib_softc[];
+
+/*
+ * Description structure for CS/80 devices.
+ */
+
+struct cs80_describe {
+ u_int d_iuw:16, /* controller: installed unit word */
+ d_cmaxxfr:16, /* controller: max transfer rate (Kb) */
+ d_ctype:8, /* controller: controller type */
+ d_utype:8, /* unit: unit type */
+ d_name:24, /* unit: name (6 BCD digits) */
+ d_sectsize:16, /* unit: # of bytes per block (sector) */
+ d_blkbuf:8, /* unit: # of blocks which can be buffered */
+ d_burstsize:8, /* unit: recommended burst size */
+ d_blocktime:16, /* unit: block time (u-sec) */
+ d_uavexfr:16, /* unit: average transfer rate (Kb) */
+ d_retry:16, /* unit: optimal retry time (1/100-sec) */
+ d_access:16, /* unit: access time param (1/100-sec) */
+ d_maxint:8, /* unit: maximum interleave */
+ d_fvbyte:8, /* unit: fixed volume byte */
+ d_rvbyte:8, /* unit: removable volume byte */
+ d_maxcyl:24, /* volume: maximum cylinder */
+ d_maxhead:8, /* volume: maximum head */
+ d_maxsect:16, /* volume: maximum sector on track */
+ d_maxvsecth:16, /* volume: maximum sector on volume (MSW) */
+ d_maxvsectl:32, /* volume: maximum sector on volume (LSWs) */
+ d_interleave:8; /* volume: current interleave */
+} __packed;