summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2002-09-22 03:56:08 +0000
committeroster <oster@NetBSD.org>2002-09-22 03:56:08 +0000
commit7264a7cc8cf3e65f75182d2c4c518917e5e29514 (patch)
treeff09b704b869e52bf8bcb04342d35c2e551d2f91 /sys/dev/raidframe
parentfe654a583aa9ceaaa9954b0959e6bc57e361b5fd (diff)
RAIDGETBUF and RAIDPUTBUF were #defines that were only used in
one place. Simplify things by removing them, and clean up more unneeded instances of 'unit' and 'rs'.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index d75e0aecbd9..9c406d9203a 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.135 2002/09/22 03:46:40 oster Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.136 2002/09/22 03:56:08 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -114,7 +114,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.135 2002/09/22 03:46:40 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.136 2002/09/22 03:56:08 oster Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -212,9 +212,6 @@ struct raidbuf {
/* component buffer pool */
struct pool raidframe_cbufpool;
-#define RAIDGETBUF(rs) pool_get(&raidframe_cbufpool, PR_NOWAIT)
-#define RAIDPUTBUF(rs, cbp) pool_put(&raidframe_cbufpool, cbp)
-
/* XXX Not sure if the following should be replacing the raidPtrs above,
or if it should be used in conjunction with that...
*/
@@ -1788,7 +1785,7 @@ rf_DispatchKernelIO(queue, req)
bp->b_error = 0;
}
#endif
- raidbp = RAIDGETBUF(rs);
+ raidbp = pool_get(&raidframe_cbufpool, PR_NOWAIT);
/*
* context for raidiodone
@@ -1866,8 +1863,6 @@ KernelWakeupFunc(vbp)
RF_DiskQueue_t *queue;
struct raidbuf *raidbp = (struct raidbuf *) vbp;
struct buf *bp;
- struct raid_softc *rs;
- int unit;
int s;
s = splbio();
@@ -1900,9 +1895,6 @@ KernelWakeupFunc(vbp)
}
bp->b_bcount = raidbp->rf_buf.b_bcount; /* XXXX ?? */
- unit = queue->raidPtr->raidid; /* *Much* simpler :-> */
-
-
/* XXX Ok, let's get aggressive... If B_ERROR is set, let's go
* ballistic, and mark the component as hosed... */
@@ -1912,7 +1904,8 @@ KernelWakeupFunc(vbp)
if (queue->raidPtr->Disks[queue->row][queue->col].status ==
rf_ds_optimal) {
printf("raid%d: IO Error. Marking %s as failed.\n",
- unit, queue->raidPtr->Disks[queue->row][queue->col].devname);
+ queue->raidPtr->raidid,
+ queue->raidPtr->Disks[queue->row][queue->col].devname);
queue->raidPtr->Disks[queue->row][queue->col].status =
rf_ds_failed;
queue->raidPtr->status[queue->row] = rf_rs_degraded;
@@ -1924,8 +1917,7 @@ KernelWakeupFunc(vbp)
}
- rs = &raid_softc[unit];
- RAIDPUTBUF(rs, raidbp);
+ pool_put(&raidframe_cbufpool, raidbp);
rf_DiskIOComplete(queue, req, (bp->b_flags & B_ERROR) ? 1 : 0);
(req->CompleteFunc) (req->argument, (bp->b_flags & B_ERROR) ? 1 : 0);