summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-27 06:11:10 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-27 06:11:10 +0000
commit4177bf456a7738295257313e1a42f6233d2553e6 (patch)
tree893ebf225848c3bb02a95ae689a334fd05ed7546 /sys
parent617b9204d0b61c24f1c430d0d271187effbd4db7 (diff)
use proper size for swapping
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2o/iop.c6
-rw-r--r--sys/dev/i2o/iopsp.c14
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/i2o/iop.c b/sys/dev/i2o/iop.c
index 78b1708579f..3cd484cc738 100644
--- a/sys/dev/i2o/iop.c
+++ b/sys/dev/i2o/iop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iop.c,v 1.14 2001/06/27 05:44:59 nate Exp $ */
+/* $OpenBSD: iop.c,v 1.15 2001/06/27 06:11:09 mickey Exp $ */
/* $NetBSD: iop.c,v 1.12 2001/03/21 14:27:05 ad Exp $ */
/*-
@@ -643,7 +643,7 @@ iop_reconfigure(struct iop_softc *sc, u_int chgind)
if ((letoh16(le->classid) & I2O_CLASS_MASK) !=
I2O_CLASS_BUS_ADAPTER_PORT)
continue;
- tid = letoh32(le->localtid) & I2O_CLASS_MASK;
+ tid = letoh16(le->localtid) & I2O_CLASS_MASK;
im = iop_msg_alloc(sc, NULL, IM_WAIT);
@@ -757,7 +757,7 @@ iop_configure_devices(struct iop_softc *sc, int mask, int maskval)
nent = sc->sc_nlctent;
for (i = 0, le = sc->sc_lct->entry; i < nent; i++, le++) {
sc->sc_tidmap[i].it_tid =
- letoh32(le->localtid) & I2O_LCT_ENTRY_TID_MASK;
+ letoh16(le->localtid) & I2O_LCT_ENTRY_TID_MASK;
/* Ignore the device if it's in use. */
usertid = letoh32(le->usertid) & I2O_LCT_ENTRY_TID_MASK;
diff --git a/sys/dev/i2o/iopsp.c b/sys/dev/i2o/iopsp.c
index a6cae9bbdf1..849c88cabb4 100644
--- a/sys/dev/i2o/iopsp.c
+++ b/sys/dev/i2o/iopsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iopsp.c,v 1.3 2001/06/27 02:15:41 niklas Exp $ */
+/* $OpenBSD: iopsp.c,v 1.4 2001/06/27 06:11:09 mickey Exp $ */
/* $NetBSD$ */
/*-
@@ -273,18 +273,18 @@ iopsp_reconfig(struct device *dv)
for (le = iop->sc_lct->entry; nent != 0; nent--, le++)
if ((letoh16(le->classid) & 4095) ==
I2O_CLASS_BUS_ADAPTER_PORT &&
- (letoh16(le->usertid) & 4095) == bptid) {
- bptid = letoh32(le->localtid) & 4095;
+ (letoh32(le->usertid) & 4095) == bptid) {
+ bptid = letoh16(le->localtid) & 4095;
break;
}
nent = iop->sc_nlctent;
for (i = 0, le = iop->sc_lct->entry; i < nent; i++, le++) {
- if ((letoh16(le->classid) & 4095) != I2O_CLASS_SCSI_PERIPHERAL)
+ if ((letoh16(le->classid) & I2O_CLASS_MASK) !=
+ I2O_CLASS_SCSI_PERIPHERAL ||
+ ((letoh32(le->usertid) >> 12) & 4095) != bptid)
continue;
- if (((letoh32(le->usertid) >> 12) & 4095) != bptid)
- continue;
- tid = letoh32(le->localtid) & 4095;
+ tid = letoh16(le->localtid) & I2O_LCT_ENTRY_TID_MASK;
rv = iop_param_op(iop, tid, NULL, 0, I2O_PARAM_SCSI_DEVICE_INFO,
&param, sizeof(param));