summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-05-20 16:43:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-05-20 16:43:52 +0000
commit91baecc933ea55719a96d5820bb4123c1d44ee65 (patch)
tree0a4dabf1bee3b2f313f4932676288e02984d612b /sys/arch
parente5bc5cc92ea719bf878dbde3c46db4e48fae425e (diff)
Fix arithmetic in vs_getiopb(), from mvme88k.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme68k/dev/vs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/mvme68k/dev/vs.c b/sys/arch/mvme68k/dev/vs.c
index d3d31f4fc59..b4aeabfb565 100644
--- a/sys/arch/mvme68k/dev/vs.c
+++ b/sys/arch/mvme68k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.15 2004/05/09 05:34:00 krw Exp $ */
+/* $OpenBSD: vs.c,v 1.16 2004/05/20 16:43:51 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -296,12 +296,12 @@ vs_scsicmd(xs)
iopb = miopb;
} else {
cqep = vs_getcqe(sc);
+ if (cqep == NULL) {
+ xs->error = XS_DRIVER_STUFFUP;
+ return (TRY_AGAIN_LATER);
+ }
iopb = vs_getiopb(sc);
}
- if (cqep == NULL) {
- xs->error = XS_DRIVER_STUFFUP;
- return (TRY_AGAIN_LATER);
- }
/* s = splbio();*/
iopb_len = sizeof(M328_short_IOPB) + xs->cmdlen;
@@ -474,7 +474,7 @@ vs_getiopb(sc)
int slot;
if (mcsb->mcsb_QHDP == 0) {
- slot = NUM_CQE;
+ slot = NUM_CQE - 1;
} else {
slot = mcsb->mcsb_QHDP - 1;
}