summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2o/iopsp.c
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2001-06-27 06:11:09 +0000
committermickey <mickey@openbsd.org>2001-06-27 06:11:09 +0000
commit079b3e465e90af075ff32aa2290fd2c1dd499dd7 (patch)
treefd5fc434f16bd290bf694edf84c23f56bd72001f /sys/dev/i2o/iopsp.c
parentintroduce the ALTQ queue macros into sys/net files. (diff)
downloadwireguard-openbsd-079b3e465e90af075ff32aa2290fd2c1dd499dd7.tar.xz
wireguard-openbsd-079b3e465e90af075ff32aa2290fd2c1dd499dd7.zip
use proper size for swapping
Diffstat (limited to '')
-rw-r--r--sys/dev/i2o/iopsp.c14
1 files changed, 7 insertions, 7 deletions
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));